openxiangda 1.0.116 → 1.0.118
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/openxiangda-skills/SKILL.md +1 -1
- package/openxiangda-skills/references/workflow-v3.md +171 -0
- package/openxiangda-skills/skills/openxiangda-workflow-automation/SKILL.md +2 -1
- package/package.json +1 -1
- package/packages/sdk/dist/runtime/index.cjs +40 -4
- package/packages/sdk/dist/runtime/index.cjs.map +1 -1
- package/packages/sdk/dist/runtime/index.mjs +40 -4
- package/packages/sdk/dist/runtime/index.mjs.map +1 -1
- package/packages/sdk/dist/runtime/react.cjs +38 -2
- package/packages/sdk/dist/runtime/react.cjs.map +1 -1
- package/packages/sdk/dist/runtime/react.d.mts +1 -0
- package/packages/sdk/dist/runtime/react.d.ts +1 -0
- package/packages/sdk/dist/runtime/react.mjs +38 -2
- package/packages/sdk/dist/runtime/react.mjs.map +1 -1
package/README.md
CHANGED
|
@@ -315,6 +315,7 @@ AI-authored workflows can use compile-time SDK resources:
|
|
|
315
315
|
- Local check: `openxiangda workflow compile src/workflows/<resourceCode>/workflow.ts --check`
|
|
316
316
|
- Runtime operations: use `sdk.process.resolveCapabilities(...)` or `ProcessActionBar` / `ProcessTimeline` from `openxiangda/runtime/react` instead of hard-coded workflow buttons.
|
|
317
317
|
- Delayed approval start: save a process-form draft without starting workflow via `StandardFormPage submitBehavior="save-draft"` or `sdk.form.create({ formUuid, data, saveAsDraft: true, startProcess: false })`; later call `sdk.process.startFromExistingInstance({ formUuid, formInstId })` or render `StandardFormPage` with `submitBehavior="start-existing-process"` to start approval in place. Do not create a second process instance and delete the draft.
|
|
318
|
+
- AI workflow cookbook and action payload table: read `openxiangda-skills/references/workflow-v3.md` for the draft -> start existing instance -> return to initiator -> resubmit flow, and for operation payload details such as `approve` using process `instanceId` while `transfer` / `return` / `resubmit` use `taskId`.
|
|
318
319
|
|
|
319
320
|
Resource and connector manifest guide: [docs/openxiangda-resources-and-connectors.md](docs/openxiangda-resources-and-connectors.md).
|
|
320
321
|
|
|
@@ -162,7 +162,7 @@ When the user provides a root domain such as `https://yida.wisejob.cn/`, use it
|
|
|
162
162
|
- Use JS_CODE for node-local cross-form data queries, create/update/batch update operations, process termination, platform API calls, external HTTP calls, and backend trigger orchestration. For logic that pages, automations, and workflows should reuse through a stable backend entry, prefer App Function. Do not use JS_CODE for simple UI interactions, ordinary form validation, or display-only page behavior.
|
|
163
163
|
- For workflow/automation JS_CODE nodes, prefer V2 `runtimeMode: "trusted_node"`. AI-authored source must be TypeScript under `src/js-code-nodes/<scriptCode>/index.ts`, `src/automations/<resourceCode>/index.ts`, or `src/functions/<functionCode>/index.ts`. `pnpm build-js-code --script <scriptCode>` runs TypeScript validation before bundling, and `sourceFile.localPath` should point to the TS source; the CLI builds, uploads, and replaces it with snapshot metadata during validate/create.
|
|
164
164
|
- Form permission group resources must have stable local codes. Use unique `code` values such as `ticket_reporter_view` and `ticket_repairer_view`; do not rely on the form code when one form has multiple groups.
|
|
165
|
-
- Workflow resources should prefer `workflowFile` + `defineWorkflow` semantic DSL over hand-written raw JSON. For workflows bound by `formCode`, run `openxiangda workspace publish --form <formCode>` first so the process form schema/table is initialized, then run `openxiangda workflow compile <workflow.ts> --check` and `openxiangda resource publish --dry-run --profile <name>` before publish; use `sdk.process.resolveCapabilities(...)` or `ProcessActionBar` / `ProcessTimeline` from `openxiangda/runtime/react` for runtime buttons and timelines instead of hard-coded operation lists. For delayed approval start from an existing saved draft, first save without starting workflow via `StandardFormPage submitBehavior="save-draft"` or `sdk.form.create({ formUuid, data, saveAsDraft: true, startProcess: false })`; later use `sdk.process.startFromExistingInstance({ formUuid, formInstId })` or `StandardFormPage submitBehavior="start-existing-process"`; do not create a duplicate process instance and delete the draft.
|
|
165
|
+
- Workflow resources should prefer `workflowFile` + `defineWorkflow` semantic DSL over hand-written raw JSON. For workflows bound by `formCode`, run `openxiangda workspace publish --form <formCode>` first so the process form schema/table is initialized, then run `openxiangda workflow compile <workflow.ts> --check` and `openxiangda resource publish --dry-run --profile <name>` before publish; use `sdk.process.resolveCapabilities(...)` or `ProcessActionBar` / `ProcessTimeline` from `openxiangda/runtime/react` for runtime buttons and timelines instead of hard-coded operation lists. For delayed approval start from an existing saved draft, first save without starting workflow via `StandardFormPage submitBehavior="save-draft"` or `sdk.form.create({ formUuid, data, saveAsDraft: true, startProcess: false })`; later use `sdk.process.startFromExistingInstance({ formUuid, formInstId })` or `StandardFormPage submitBehavior="start-existing-process"`; do not create a duplicate process instance and delete the draft. For custom workflow UI, return-to-initiator, resubmit, and action payload details, read `references/workflow-v3.md` sections `Cookbook: draft, start, return, resubmit` and `Capability action reference`.
|
|
166
166
|
- Workflow resources can be created as drafts. After resource publish, verify `openxiangda workflow list --profile <name> --json` and run `openxiangda workflow publish <workflowCode> --profile <name>` until `isPublished: true` is visible. `workflow list` hides platform shell workflows with empty `resourceCode` by default; pass `--all` only when diagnosing raw platform rows.
|
|
167
167
|
|
|
168
168
|
## Subskills
|
|
@@ -110,6 +110,177 @@ For delayed approval start, do not submit a process form and then delete/recreat
|
|
|
110
110
|
|
|
111
111
|
For return-to-initiator workflows, prefer `returnPolicy: { scopeType: "initiator", resubmitMode: "resume_current" }` or `flow.action.returnToInitiator()`. The runtime capabilities protocol exposes `resubmit` only on pending `originator_return` tasks. If a user returns to a previous approval node, continuing the flow is a normal `approve` action on that returned approval task.
|
|
112
112
|
|
|
113
|
+
## Cookbook: draft, start, return, resubmit
|
|
114
|
+
|
|
115
|
+
Use this pattern when the business user creates real data first and starts approval later from the same form instance. Do not copy the draft into a new process record.
|
|
116
|
+
|
|
117
|
+
1. Define a semantic workflow with an approval node that can save, return to the initiator, and resume the current approval after resubmission:
|
|
118
|
+
|
|
119
|
+
```ts
|
|
120
|
+
import { defineWorkflow } from "openxiangda/workflow";
|
|
121
|
+
|
|
122
|
+
export default defineWorkflow({
|
|
123
|
+
build(flow) {
|
|
124
|
+
const start = flow.start();
|
|
125
|
+
const approval = flow.approval("manager_approval", {
|
|
126
|
+
label: "Manager approval",
|
|
127
|
+
approverType: "ext_target_approval",
|
|
128
|
+
approvals: ["USER_MANAGER"],
|
|
129
|
+
approvalNames: ["Manager"],
|
|
130
|
+
actions: [
|
|
131
|
+
flow.action.approve("Approve"),
|
|
132
|
+
flow.action.reject("Reject"),
|
|
133
|
+
flow.action.save("Save"),
|
|
134
|
+
flow.action.transfer("Transfer"),
|
|
135
|
+
flow.action.returnToInitiator("Return to initiator", {
|
|
136
|
+
resubmitMode: "resume_current",
|
|
137
|
+
}),
|
|
138
|
+
],
|
|
139
|
+
returnPolicy: {
|
|
140
|
+
scopeType: "initiator",
|
|
141
|
+
resubmitMode: "resume_current",
|
|
142
|
+
},
|
|
143
|
+
});
|
|
144
|
+
flow.sequence(start, approval, flow.end());
|
|
145
|
+
},
|
|
146
|
+
});
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
2. Publish the process form before publishing the workflow resource. The form publish initializes the process-form storage table used by delayed starts:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
openxiangda workspace publish --form expense --profile dev
|
|
153
|
+
openxiangda workflow compile src/workflows/expense_approval/workflow.ts --check
|
|
154
|
+
openxiangda resource publish --profile dev --dry-run
|
|
155
|
+
openxiangda resource publish --profile dev
|
|
156
|
+
openxiangda workflow list --profile dev --json
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
If the target workflow is a draft after resource publish, run `openxiangda workflow publish <workflowCode> --profile dev` until `isPublished: true` is visible.
|
|
160
|
+
|
|
161
|
+
3. Save the process-form record without starting approval:
|
|
162
|
+
|
|
163
|
+
```tsx
|
|
164
|
+
await sdk.form.create({
|
|
165
|
+
formUuid,
|
|
166
|
+
data: draftValues,
|
|
167
|
+
saveAsDraft: true,
|
|
168
|
+
startProcess: false,
|
|
169
|
+
});
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Standard form pages can use the built-in behavior:
|
|
173
|
+
|
|
174
|
+
```tsx
|
|
175
|
+
<StandardFormPage
|
|
176
|
+
schema={schema}
|
|
177
|
+
mode="submit"
|
|
178
|
+
submitBehavior="save-draft"
|
|
179
|
+
/>
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
4. Later, start approval on the same `formInstId`. The current operator becomes the workflow initiator by default:
|
|
183
|
+
|
|
184
|
+
```tsx
|
|
185
|
+
await sdk.process.startFromExistingInstance({
|
|
186
|
+
formUuid,
|
|
187
|
+
formInstId,
|
|
188
|
+
updateFormDataJson: JSON.stringify(finalValues),
|
|
189
|
+
submissionDepartmentId,
|
|
190
|
+
selectedApprovers,
|
|
191
|
+
});
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Standard form pages can start approval in place:
|
|
195
|
+
|
|
196
|
+
```tsx
|
|
197
|
+
<StandardFormPage
|
|
198
|
+
schema={schema}
|
|
199
|
+
mode="submit"
|
|
200
|
+
formInstanceId={formInstId}
|
|
201
|
+
submitBehavior="start-existing-process"
|
|
202
|
+
/>
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
5. In a custom detail page, render operations from capabilities instead of hard-coded buttons:
|
|
206
|
+
|
|
207
|
+
```tsx
|
|
208
|
+
import {
|
|
209
|
+
ProcessActionBar,
|
|
210
|
+
ProcessTimeline,
|
|
211
|
+
useProcessCapabilities,
|
|
212
|
+
} from "openxiangda/runtime/react";
|
|
213
|
+
|
|
214
|
+
export function ContractApprovalPanel({ formUuid, formInstId, getValues }) {
|
|
215
|
+
const capabilityParams = { formUuid, formInstId };
|
|
216
|
+
const process = useProcessCapabilities(capabilityParams);
|
|
217
|
+
|
|
218
|
+
return (
|
|
219
|
+
<>
|
|
220
|
+
<ProcessActionBar
|
|
221
|
+
capabilities={process.capabilities}
|
|
222
|
+
formUuid={formUuid}
|
|
223
|
+
getFormValues={getValues}
|
|
224
|
+
onRefreshCapabilities={process.refresh}
|
|
225
|
+
/>
|
|
226
|
+
<ProcessTimeline capabilities={process.capabilities} />
|
|
227
|
+
</>
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
6. Return-to-initiator flow:
|
|
233
|
+
|
|
234
|
+
- Approver executes the `return` operation. For initiator return, the return candidate normally has `nodeId: "__originator__"` or equivalent initiator metadata.
|
|
235
|
+
- Initiator resolves capabilities for the same `formInstId` or returned `taskId`; the current task should be `nodeType: "originator_return"`.
|
|
236
|
+
- Initiator executes `resubmit` with updated form data.
|
|
237
|
+
- With `resubmitMode: "resume_current"`, the engine restores the source approval task. The next capabilities response should show an approval task again, often with `taskKind: "resume"`.
|
|
238
|
+
- The approver then uses the normal `approve` action. Final form search snapshots should show `processInstanceStatus: "completed"` and `approvalResult: "approved"`.
|
|
239
|
+
|
|
240
|
+
## Capability action reference
|
|
241
|
+
|
|
242
|
+
Always call `sdk.process.resolveCapabilities(...)` first. It returns instance state, current task, field permissions, timeline, and `operations`. Each operation includes `key`, `label`, `visible`, `enabled`, `disabledReason`, `taskId`, `instanceId`, `nodeId`, `paramsSchema`, `uiSchema`, `returnableNodes`, and `refreshHints`. Render only operations where `visible !== false`; if `enabled === false`, show `disabledReason`.
|
|
243
|
+
|
|
244
|
+
Use `paramsSchema` and `uiSchema` as the source of truth for dialogs. Do not hard-code which operation needs a modal or which fields are required.
|
|
245
|
+
|
|
246
|
+
| Operation | When it appears | SDK method | Required IDs | Common params |
|
|
247
|
+
| --- | --- | --- | --- | --- |
|
|
248
|
+
| `startProcess` | Saved process-form instance that has no workflow instance yet | `sdk.process.startFromExistingInstance` | `formUuid`, `formInstId` / `formInstanceId` | `updateFormDataJson`, `submissionDepartmentId`, `selectedApprovers`, `initiatorSelectedApprovers` |
|
|
249
|
+
| `approve` | Current user has a pending approval task | `sdk.process.approve` | `instanceId` (process instance ID, not task ID) | `comments`, `updateFormDataJson` |
|
|
250
|
+
| `reject` | Current user can reject the pending approval task | `sdk.process.reject` | `instanceId` (process instance ID, not task ID) | `comments`, `updateFormDataJson` |
|
|
251
|
+
| `save` | Current task allows editing without advancing the workflow | `sdk.process.saveTask` | `instanceId`, `formUuid` | `updateFormDataJson`, `comments` |
|
|
252
|
+
| `transfer` | Current user can transfer the current task | `sdk.process.transferTask` | `taskId` | `newAssignee`, `reason` |
|
|
253
|
+
| `return` | Current approval task has return candidates | `sdk.process.returnTask` | `taskId`, `targetNodeId` | `reason`; choose `targetNodeId` from `operation.returnableNodes` |
|
|
254
|
+
| `withdraw` | Initiator can withdraw a running process | `sdk.process.withdraw` | `instanceId` | `reason` |
|
|
255
|
+
| `resubmit` | Initiator is handling an `originator_return` task | `sdk.process.resubmitTask` | `taskId`, `formUuid` | `updateFormDataJson`, `comments`, `selectedApprovers`, `initiatorSelectedApprovers` |
|
|
256
|
+
| `callback` | Process is waiting on a callback task | `sdk.process.triggerCallback` | `taskId` | `payload` |
|
|
257
|
+
| `retryException` | Process instance is in exception state and user can retry | `sdk.process.retryException` | `instanceId` | none |
|
|
258
|
+
| `adminTransfer` | App/platform admin can reassign a task | `sdk.process.adminTransferTask` | `taskId` | `newAssignee`, `reason` |
|
|
259
|
+
|
|
260
|
+
Recommended custom dispatcher:
|
|
261
|
+
|
|
262
|
+
```ts
|
|
263
|
+
const caps = await sdk.process.resolveCapabilities({ formUuid, formInstId });
|
|
264
|
+
const op = caps.result.operations.find((item) => item.key === "return");
|
|
265
|
+
if (!op?.enabled) throw new Error(op?.disabledReason || "return unavailable");
|
|
266
|
+
|
|
267
|
+
await sdk.process.returnTask({
|
|
268
|
+
taskId: String(op.taskId),
|
|
269
|
+
targetNodeId: String(op.returnableNodes?.[0]?.nodeId),
|
|
270
|
+
reason: "Need more information",
|
|
271
|
+
});
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
After every successful action, refresh the surfaces listed by `operation.refreshHints`. In most pages this means reloading capabilities, process basic/progress, timeline, and form data. `ProcessActionBar` does this when `onRefreshCapabilities` or `capabilityParams` is provided.
|
|
275
|
+
|
|
276
|
+
Troubleshooting:
|
|
277
|
+
|
|
278
|
+
- If `approve` or `reject` returns "process instance not found", check that the request used `instanceId`, not `taskId`.
|
|
279
|
+
- If `return` has no valid target, inspect `operation.returnableNodes` and the workflow node `returnPolicy`; do not invent a node ID.
|
|
280
|
+
- If `resubmit` is missing, make sure the active task is `originator_return`; a task returned to a previous approval node continues with normal `approve`.
|
|
281
|
+
- If a workflow created by `resource publish` is not active, run `openxiangda workflow list --profile <name> --json` and publish the workflow until `isPublished: true`.
|
|
282
|
+
- If `workflow list` shows a row with empty `resourceCode`, it is a platform shell workflow. The default list hides those rows; use `--all` only for raw diagnostics.
|
|
283
|
+
|
|
113
284
|
Minimum shape:
|
|
114
285
|
|
|
115
286
|
```json
|
|
@@ -24,6 +24,7 @@ Create a workflow only when the scenario has **real approval semantics**: approv
|
|
|
24
24
|
- ✅ New AI-authored automations: prefer **code-first** `automation_code_ts` (`src/automations/<code>/index.ts` + `definition.code.json` + `preview.json`).
|
|
25
25
|
- ✅ New AI-authored workflows: prefer **semantic DSL** `src/workflows/<code>/workflow.ts` using `defineWorkflow`; compile it to v3 designer JSON with `openxiangda workflow compile`.
|
|
26
26
|
- ✅ Runtime workflow pages: use `sdk.process.resolveCapabilities(...)` or `ProcessActionBar` / `ProcessTimeline` from `openxiangda/runtime/react`; do not hard-code buttons.
|
|
27
|
+
- ✅ Before custom workflow UI or delayed approval work, read `references/workflow-v3.md` sections **Cookbook: draft, start, return, resubmit** and **Capability action reference** for payloads, required IDs, and refresh rules.
|
|
27
28
|
- ✅ Delayed approval start: save the process-form record first with `StandardFormPage submitBehavior="save-draft"` or `sdk.form.create({ formUuid, data, saveAsDraft: true, startProcess: false })`, then start approval in place with `sdk.process.startFromExistingInstance({ formUuid, formInstId })` or `StandardFormPage submitBehavior="start-existing-process"`.
|
|
28
29
|
- ✅ Return-to-initiator flows: use `returnPolicy: { scopeType: "initiator", resubmitMode: "resume_current" | "replay" }` or `flow.action.returnToInitiator()`. The runtime capabilities protocol exposes `resubmit` only for pending `originator_return` tasks; return to a previous approval node continues through the normal `approve` action.
|
|
29
30
|
- ✅ Reusable backend business logic: prefer **App Function** (`src/functions/<functionCode>/index.ts` + `src/resources/functions/<functionCode>.json`), then call it from page `sdk.function.invoke` or automation/workflow `function_call`.
|
|
@@ -190,7 +191,7 @@ Use `automation disable` before risky edits. Published automations create a draf
|
|
|
190
191
|
## References
|
|
191
192
|
|
|
192
193
|
- Best-practice architecture and status-flow boundary: `references/best-practices.md`
|
|
193
|
-
- Workflow v3 JSON: `references/workflow-v3.md`
|
|
194
|
+
- Workflow v3 JSON, semantic DSL, delayed-start cookbook, and capability action payloads: `references/workflow-v3.md`
|
|
194
195
|
- Automation v3 JSON and triggers: `references/automation-v3.md`
|
|
195
196
|
- Notification resources and runtime calls: `references/notifications.md`
|
|
196
197
|
- API fields: `references/openxiangda-api.md`
|
package/package.json
CHANGED
|
@@ -2560,6 +2560,33 @@ init_cjs_shims();
|
|
|
2560
2560
|
|
|
2561
2561
|
// packages/sdk/src/runtime/core/fetch.ts
|
|
2562
2562
|
init_cjs_shims();
|
|
2563
|
+
var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
2564
|
+
var isTransientFetchError = (error) => {
|
|
2565
|
+
const anyError = error;
|
|
2566
|
+
const message7 = String(anyError?.message || error || "").toLowerCase();
|
|
2567
|
+
const causeCode = String(anyError?.cause?.code || "").toLowerCase();
|
|
2568
|
+
return causeCode === "und_err_connect_timeout" || message7.includes("und_err_connect_timeout") || message7.includes("connect_timeout") || message7.includes("econnreset") || message7.includes("socket hang up") || message7.includes("network socket disconnected") || message7.includes("fetch failed");
|
|
2569
|
+
};
|
|
2570
|
+
var fetchWithTransientRetry = async (fetchImpl, input, init, options = {}) => {
|
|
2571
|
+
if (!options.enabled) {
|
|
2572
|
+
return fetchImpl(input, init);
|
|
2573
|
+
}
|
|
2574
|
+
const retries = Number.isFinite(Number(options.retries)) ? Number(options.retries) : 2;
|
|
2575
|
+
const baseDelayMs = Number.isFinite(Number(options.baseDelayMs)) ? Number(options.baseDelayMs) : 250;
|
|
2576
|
+
let lastError;
|
|
2577
|
+
for (let attempt = 0; attempt <= retries; attempt += 1) {
|
|
2578
|
+
try {
|
|
2579
|
+
return await fetchImpl(input, init);
|
|
2580
|
+
} catch (error) {
|
|
2581
|
+
lastError = error;
|
|
2582
|
+
if (attempt >= retries || !isTransientFetchError(error)) {
|
|
2583
|
+
throw error;
|
|
2584
|
+
}
|
|
2585
|
+
await sleep(Math.min(baseDelayMs * Math.pow(2, attempt), 2e3));
|
|
2586
|
+
}
|
|
2587
|
+
}
|
|
2588
|
+
throw lastError;
|
|
2589
|
+
};
|
|
2563
2590
|
var createBoundFetch = (fetchImpl) => {
|
|
2564
2591
|
const baseFetch = fetchImpl || globalThis.fetch;
|
|
2565
2592
|
return ((input, init) => baseFetch.call(globalThis, input, init));
|
|
@@ -28079,7 +28106,7 @@ var import_react162 = __toESM(require("react"));
|
|
|
28079
28106
|
|
|
28080
28107
|
// node_modules/antd-mobile/es/utils/sleep.js
|
|
28081
28108
|
init_cjs_shims();
|
|
28082
|
-
var
|
|
28109
|
+
var sleep2 = (time) => new Promise((resolve) => setTimeout(resolve, time));
|
|
28083
28110
|
|
|
28084
28111
|
// node_modules/antd-mobile/es/components/pull-to-refresh/pull-to-refresh.js
|
|
28085
28112
|
var classPrefix63 = `adm-pull-to-refresh`;
|
|
@@ -28152,7 +28179,7 @@ var PullToRefresh = (p) => {
|
|
|
28152
28179
|
throw e2;
|
|
28153
28180
|
}
|
|
28154
28181
|
if (props.completeDelay > 0) {
|
|
28155
|
-
yield
|
|
28182
|
+
yield sleep2(props.completeDelay);
|
|
28156
28183
|
}
|
|
28157
28184
|
reset();
|
|
28158
28185
|
});
|
|
@@ -34043,7 +34070,8 @@ function useProcessActions(options) {
|
|
|
34043
34070
|
updateFormDataJson: requireValue(
|
|
34044
34071
|
buildUpdateFormDataJson(input),
|
|
34045
34072
|
"\u6682\u5B58\u6570\u636E\u4E0D\u80FD\u4E3A\u7A7A"
|
|
34046
|
-
)
|
|
34073
|
+
),
|
|
34074
|
+
comments: input.comments
|
|
34047
34075
|
});
|
|
34048
34076
|
} else if (operation.key === "resubmit") {
|
|
34049
34077
|
await sdk.process.resubmitTask({
|
|
@@ -34333,6 +34361,12 @@ var normalizeMethod2 = (method4) => {
|
|
|
34333
34361
|
const value = String(method4 || "get").toUpperCase();
|
|
34334
34362
|
return ["GET", "POST", "PUT", "DELETE", "PATCH"].includes(value) ? value : "GET";
|
|
34335
34363
|
};
|
|
34364
|
+
var shouldRetryTransportRequest = (payload) => {
|
|
34365
|
+
const method4 = normalizeMethod2(payload?.method);
|
|
34366
|
+
if (method4 === "GET") return true;
|
|
34367
|
+
const path = String(payload?.path || "").split("?")[0];
|
|
34368
|
+
return method4 === "POST" && path === "/workflow/capabilities/resolve";
|
|
34369
|
+
};
|
|
34336
34370
|
var normalizeCssIsolation2 = (value) => {
|
|
34337
34371
|
if (value === "namespace" || value === "shadow" || value === "none") {
|
|
34338
34372
|
return value;
|
|
@@ -34393,11 +34427,13 @@ var createBrowserPageBridge = (options = {}) => {
|
|
|
34393
34427
|
body = JSON.stringify(payload.body);
|
|
34394
34428
|
}
|
|
34395
34429
|
}
|
|
34396
|
-
const response = await fetchImpl
|
|
34430
|
+
const response = await fetchWithTransientRetry(fetchImpl, url2, {
|
|
34397
34431
|
method: normalizeMethod2(payload.method),
|
|
34398
34432
|
headers,
|
|
34399
34433
|
body,
|
|
34400
34434
|
credentials: "include"
|
|
34435
|
+
}, {
|
|
34436
|
+
enabled: shouldRetryTransportRequest(payload)
|
|
34401
34437
|
});
|
|
34402
34438
|
return parseJsonResponse(response);
|
|
34403
34439
|
};
|