Skip to content

Commit 0849e93

Browse files
committed
Merge remote-tracking branch 'origin/9345-sm-restructure-phase-1' into sm-restructure-phase1-batch3-manage
2 parents a127d6e + a016aa6 commit 0849e93

38 files changed

Lines changed: 2591 additions & 1020 deletions

File tree

.github/workflows/claude-review.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,17 @@ jobs:
1010
claude-review:
1111
if: |
1212
(github.event_name == 'pull_request_review_comment' &&
13-
contains(github.event.comment.body, '@claude')) ||
13+
contains(github.event.comment.body, '@claude') &&
14+
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)) ||
1415
(github.event_name == 'issue_comment' &&
1516
github.event.issue.pull_request != null &&
16-
contains(github.event.comment.body, '@claude'))
17+
contains(github.event.comment.body, '@claude') &&
18+
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association))
1719
runs-on: ubuntu-latest
1820
permissions:
19-
contents: read
21+
contents: write
2022
pull-requests: write
23+
issues: write
2124
steps:
2225
- uses: actions/checkout@v7
2326

@@ -36,13 +39,22 @@ jobs:
3639
with:
3740
anthropic_api_key: ${{ steps.secrets.outputs.ANTHROPIC_API_KEY }}
3841
github_token: ${{ secrets.GITHUB_TOKEN }}
39-
direct_prompt: |
40-
Review this pull request against the Camunda docs contribution standards referenced from AGENTS.md.
42+
prompt: |
43+
A commenter left this message on this pull request:
4144
42-
Post inline review comments on the specific lines where issues are found. For each issue, include a concrete fix using GitHub's suggestion block format so the author can apply it directly:
45+
"${{ github.event.comment.body }}"
46+
47+
If the message is just the "@claude" mention on its own, or a generic ask like "review this" or "please review", perform a full review of this pull request against the Camunda docs contribution standards referenced from AGENTS.md. Post inline review comments on the specific lines where issues are found. For each issue, include a concrete fix using GitHub's suggestion block format so the author can apply it directly:
4348
4449
```suggestion
4550
<replacement text here>
4651
```
4752
4853
Use suggestion blocks whenever a fix can be expressed as a direct text replacement on the commented line(s).
54+
55+
Otherwise, address the specific request directly instead of doing a general review. Depending on what is being asked, this may mean:
56+
- Answering a question about the code or documentation in a reply comment.
57+
- Making the requested changes and pushing them as a new commit to this PR's branch.
58+
- Opening a new pull request if the request is out of scope for this PR.
59+
60+
Follow the Camunda docs contribution standards referenced from AGENTS.md for any content changes.
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: update-postman
2+
3+
on:
4+
push:
5+
tags:
6+
- "[0-9]+.[0-9]+.[0-9]+"
7+
- "!0.25.[0-9]+"
8+
- "!0.26.[0-9]+"
9+
- "!1.0.[0-9]+"
10+
- "!1.1.[0-9]+"
11+
- "!1.2.[0-9]+"
12+
- "!1.3.[0-9]+"
13+
- "!8.0.[0-9]+"
14+
- "!8.1.[0-9]+"
15+
- "!8.2.[0-9]+"
16+
- "!8.3.[0-9]+"
17+
- "!8.4.[0-9]+"
18+
- "!8.5.[0-9]+"
19+
- "!8.6.[0-9]+"
20+
21+
jobs:
22+
update-postman:
23+
runs-on: ubuntu-latest
24+
25+
steps:
26+
- uses: actions/checkout@v7
27+
- uses: actions/setup-node@v7
28+
with:
29+
node-version: 24
30+
- name: Import Secrets
31+
id: secrets
32+
uses: hashicorp/vault-action@79632e33d6953d190b940ffa440bf97821cabd80
33+
with:
34+
url: ${{ secrets.VAULT_ADDR }}
35+
method: approle
36+
roleId: ${{ secrets.VAULT_ROLE_ID }}
37+
secretId: ${{ secrets.VAULT_SECRET_ID }}
38+
exportEnv: false
39+
secrets: |
40+
secret/data/products/camunda-docs/ci/postman API_KEY;
41+
secret/data/products/camunda-docs/ci/postman WORKSPACE_ID;
42+
- name: Install dependencies
43+
run: npm ci
44+
- name: Sync Hub API SM
45+
env:
46+
POSTMAN_API_KEY: ${{ steps.secrets.outputs.API_KEY }}
47+
WORKSPACE_ID: ${{ steps.secrets.outputs.WORKSPACE_ID }}
48+
run: node ./hacks/postman/sync-hub-api.js hubsm
49+
- name: Sync Hub API SaaS
50+
env:
51+
POSTMAN_API_KEY: ${{ steps.secrets.outputs.API_KEY }}
52+
WORKSPACE_ID: ${{ steps.secrets.outputs.WORKSPACE_ID }}
53+
run: node ./hacks/postman/sync-hub-api.js hubsaas
54+
notify-failure:
55+
needs:
56+
- update-postman
57+
if: failure() || (success() && fromJSON(github.run_attempt) > 1)
58+
uses: ./.github/workflows/notify-failure.yml
59+
with:
60+
# If any dependent job fails, set the dependency_status to 'failure',
61+
# otherwise set it to 'success'.
62+
dependency_status: ${{ contains(needs.*.result, 'failure') && 'failure' || 'success' }}
63+
secrets:
64+
VAULT_ADDR: ${{ secrets.VAULT_ADDR }}
65+
VAULT_ROLE_ID: ${{ secrets.VAULT_ROLE_ID }}
66+
VAULT_SECRET_ID: ${{ secrets.VAULT_SECRET_ID }}

.sdk-repos/orchestration-cluster-api-csharp/examples/BatchOperation.cs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,4 +208,40 @@ public static async Task UpdateJobsBatchOperationExample()
208208
}
209209
// </UpdateJobsBatchOperation>
210210
#endregion UpdateJobsBatchOperation
211+
212+
#region SuspendProcessInstancesBatchOperation
213+
214+
// <SuspendProcessInstancesBatchOperation>
215+
public static async Task SuspendProcessInstancesBatchOperationExample()
216+
{
217+
using var client = CamundaClient.Create();
218+
219+
var result = await client.SuspendProcessInstancesBatchOperationAsync(
220+
new ProcessInstanceSuspensionBatchOperationRequest
221+
{
222+
Filter = new ProcessInstanceFilter(),
223+
});
224+
225+
Console.WriteLine($"Batch operation key: {result.BatchOperationKey}");
226+
}
227+
// </SuspendProcessInstancesBatchOperation>
228+
#endregion SuspendProcessInstancesBatchOperation
229+
230+
#region ResumeProcessInstancesBatchOperation
231+
232+
// <ResumeProcessInstancesBatchOperation>
233+
public static async Task ResumeProcessInstancesBatchOperationExample()
234+
{
235+
using var client = CamundaClient.Create();
236+
237+
var result = await client.ResumeProcessInstancesBatchOperationAsync(
238+
new ProcessInstanceResumptionBatchOperationRequest
239+
{
240+
Filter = new ProcessInstanceFilter(),
241+
});
242+
243+
Console.WriteLine($"Batch operation key: {result.BatchOperationKey}");
244+
}
245+
// </ResumeProcessInstancesBatchOperation>
246+
#endregion ResumeProcessInstancesBatchOperation
211247
}

.sdk-repos/orchestration-cluster-api-csharp/examples/Client.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,29 @@ public static async Task ChangeClusterModeExample()
4949
}
5050
// </ChangeClusterMode>
5151
#endregion ChangeClusterMode
52+
53+
#region Restore
54+
55+
// <Restore>
56+
public static async Task RestoreExample()
57+
{
58+
using var client = CamundaClient.Create();
59+
60+
// The cluster must be in recovery mode before a restore is accepted.
61+
// Provide either a list of backup IDs (one per partition) or a time
62+
// range (From/To) that selects the backups to restore, but not both.
63+
var change = await client.RestoreAsync(new RestoreRequest
64+
{
65+
BackupIds = new List<long> { 100, 101 },
66+
});
67+
68+
Console.WriteLine($"Cluster change {change.ChangeId}:");
69+
foreach (var operation in change.PlannedChanges)
70+
{
71+
var suffix = operation.Mode is null ? "" : $" -> {operation.Mode}";
72+
Console.WriteLine($" {operation.Operation}{suffix}");
73+
}
74+
}
75+
// </Restore>
76+
#endregion Restore
5277
}

.sdk-repos/orchestration-cluster-api-csharp/examples/ProcessDefinition.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,25 @@ public static async Task SearchProcessDefinitionsExample()
5151
// </SearchProcessDefinitions>
5252
#endregion SearchProcessDefinitions
5353

54+
#region SearchProcessDefinitionVariableNames
55+
56+
// <SearchProcessDefinitionVariableNames>
57+
public static async Task SearchProcessDefinitionVariableNamesExample(ProcessDefinitionKey processDefinitionKey)
58+
{
59+
using var client = CamundaClient.Create();
60+
61+
var result = await client.SearchProcessDefinitionVariableNamesAsync(
62+
processDefinitionKey,
63+
new ProcessDefinitionVariableNameSearchQuery());
64+
65+
foreach (var variable in result.Items)
66+
{
67+
Console.WriteLine($"Variable name: {variable.Name}");
68+
}
69+
}
70+
// </SearchProcessDefinitionVariableNames>
71+
#endregion SearchProcessDefinitionVariableNames
72+
5473
#region GetProcessDefinitionStatistics
5574

5675
// <GetProcessDefinitionStatistics>

.sdk-repos/orchestration-cluster-api-csharp/examples/ProcessInstance.cs

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,4 +228,49 @@ public static async Task ResolveProcessInstanceIncidentsExample(ProcessInstanceK
228228
}
229229
// </ResolveProcessInstanceIncidents>
230230
#endregion ResolveProcessInstanceIncidents
231+
232+
#region SuspendProcessInstance
233+
234+
// <SuspendProcessInstance>
235+
public static async Task SuspendProcessInstanceExample(ProcessInstanceKey processInstanceKey)
236+
{
237+
using var client = CamundaClient.Create();
238+
239+
await client.SuspendProcessInstanceAsync(
240+
processInstanceKey,
241+
new SuspendProcessInstanceRequest());
242+
}
243+
// </SuspendProcessInstance>
244+
#endregion SuspendProcessInstance
245+
246+
#region ResumeProcessInstance
247+
248+
// <ResumeProcessInstance>
249+
public static async Task ResumeProcessInstanceExample(ProcessInstanceKey processInstanceKey)
250+
{
251+
using var client = CamundaClient.Create();
252+
253+
await client.ResumeProcessInstanceAsync(
254+
processInstanceKey,
255+
new ResumeProcessInstanceRequest());
256+
}
257+
// </ResumeProcessInstance>
258+
#endregion ResumeProcessInstance
259+
260+
#region AssignProcessInstanceBusinessId
261+
262+
// <AssignProcessInstanceBusinessId>
263+
public static async Task AssignProcessInstanceBusinessIdExample(ProcessInstanceKey processInstanceKey, BusinessId businessId)
264+
{
265+
using var client = CamundaClient.Create();
266+
267+
await client.AssignProcessInstanceBusinessIdAsync(
268+
processInstanceKey,
269+
new ProcessInstanceBusinessIdAssignmentInstruction
270+
{
271+
BusinessId = businessId,
272+
});
273+
}
274+
// </AssignProcessInstanceBusinessId>
275+
#endregion AssignProcessInstanceBusinessId
231276
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// Compilable usage examples for secret operations.
2+
// These examples are type-checked during build to guard against API regressions.
3+
using Camunda.Orchestration.Sdk;
4+
5+
public static class SecretExamples
6+
{
7+
#region ResolveSecrets
8+
// <ResolveSecrets>
9+
public static async Task ResolveSecretsExample()
10+
{
11+
using var client = CamundaClient.Create();
12+
13+
var result = await client.ResolveSecretsAsync(new SecretResolveRequest
14+
{
15+
References = new List<string>
16+
{
17+
"camunda.secrets.myApiToken",
18+
"camunda.secrets.dbPassword",
19+
},
20+
});
21+
22+
// Successfully resolved references are returned in Resolved; references that
23+
// could not be resolved are returned in Errors, each with a typed error code.
24+
// Never log resolved.Value — it holds secret material. Pass it directly to the
25+
// consumer that needs it (HTTP client, DB driver, ...) instead.
26+
foreach (var resolved in result.Resolved)
27+
{
28+
Console.WriteLine($"Resolved {resolved.Reference} (value redacted)");
29+
UseSecret(resolved.Value);
30+
}
31+
32+
foreach (var error in result.Errors)
33+
{
34+
Console.WriteLine($"Failed to resolve {error.Reference}: {error.Code} - {error.Message}");
35+
}
36+
}
37+
38+
// Hands the resolved secret to whatever needs it, without logging it.
39+
private static void UseSecret(string value) { }
40+
// </ResolveSecrets>
41+
#endregion ResolveSecrets
42+
}

.sdk-repos/orchestration-cluster-api-csharp/examples/operation-map.json

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@
5555
"label": "Change cluster mode"
5656
}
5757
],
58+
"restore": [
59+
{
60+
"file": "Client.cs",
61+
"region": "Restore",
62+
"label": "Restore from a backup"
63+
}
64+
],
5865
"createProcessInstance": [
5966
{
6067
"file": "ProcessInstance.cs",
@@ -151,6 +158,27 @@
151158
"label": "Resolve process instance incidents"
152159
}
153160
],
161+
"suspendProcessInstance": [
162+
{
163+
"file": "ProcessInstance.cs",
164+
"region": "SuspendProcessInstance",
165+
"label": "Suspend a process instance"
166+
}
167+
],
168+
"resumeProcessInstance": [
169+
{
170+
"file": "ProcessInstance.cs",
171+
"region": "ResumeProcessInstance",
172+
"label": "Resume a process instance"
173+
}
174+
],
175+
"assignProcessInstanceBusinessId": [
176+
{
177+
"file": "ProcessInstance.cs",
178+
"region": "AssignProcessInstanceBusinessId",
179+
"label": "Assign a business ID to a process instance"
180+
}
181+
],
154182
"getProcessDefinition": [
155183
{
156184
"file": "ProcessDefinition.cs",
@@ -172,6 +200,13 @@
172200
"label": "Search process definitions"
173201
}
174202
],
203+
"searchProcessDefinitionVariableNames": [
204+
{
205+
"file": "ProcessDefinition.cs",
206+
"region": "SearchProcessDefinitionVariableNames",
207+
"label": "Search process definition variable names"
208+
}
209+
],
175210
"getProcessDefinitionStatistics": [
176211
{
177212
"file": "ProcessDefinition.cs",
@@ -1066,6 +1101,20 @@
10661101
"label": "Update jobs in batch"
10671102
}
10681103
],
1104+
"suspendProcessInstancesBatchOperation": [
1105+
{
1106+
"file": "BatchOperation.cs",
1107+
"region": "SuspendProcessInstancesBatchOperation",
1108+
"label": "Suspend process instances in batch"
1109+
}
1110+
],
1111+
"resumeProcessInstancesBatchOperation": [
1112+
{
1113+
"file": "BatchOperation.cs",
1114+
"region": "ResumeProcessInstancesBatchOperation",
1115+
"label": "Resume process instances in batch"
1116+
}
1117+
],
10691118
"getVariable": [
10701119
{
10711120
"file": "VariableElement.cs",
@@ -1380,5 +1429,12 @@
13801429
"region": "SearchUserTaskEffectiveVariables",
13811430
"label": "Search user task effective variables"
13821431
}
1432+
],
1433+
"resolveSecrets": [
1434+
{
1435+
"file": "Secret.cs",
1436+
"region": "ResolveSecrets",
1437+
"label": "Resolve secrets"
1438+
}
13831439
]
13841440
}

0 commit comments

Comments
 (0)