@nocobase/plugin-workflow-test 1.6.0-alpha.2 → 1.6.0-alpha.20

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.
@@ -145,7 +145,7 @@ class ApprovalTriggerNode {
145
145
  this.page = page;
146
146
  this.node = page.getByLabel(`Trigger-${triggerName}`);
147
147
  this.nodeTitle = page.getByLabel(`Trigger-${triggerName}`).getByRole("textbox");
148
- this.nodeConfigure = page.getByLabel(`Trigger-${triggerName}`).getByRole("button", { name: "Configure" });
148
+ this.nodeConfigure = this.node.locator(">div").first();
149
149
  this.collectionDropDown = page.getByLabel("block-item-DataSourceCollectionCascader-workflows-Collection").locator(".ant-select-selection-search-input");
150
150
  this.dataBlocksInitiationRadio = page.getByLabel("Initiate and approve in data blocks only");
151
151
  this.dataBlocksAndGlobalApprovalBlocksInitiationRadio = page.getByLabel(
@@ -200,15 +200,15 @@ class ApprovalPassthroughModeNode {
200
200
  this.page = page;
201
201
  this.node = page.getByLabel(`Approval-${nodeName}`, { exact: true });
202
202
  this.nodeTitle = page.getByLabel(`Approval-${nodeName}`, { exact: true }).getByRole("textbox");
203
- this.nodeConfigure = page.getByLabel(`Approval-${nodeName}`, { exact: true }).getByRole("button", { name: "Configure" });
204
- this.addAssigneesButton = page.getByRole("button", { name: "plus Add assignee" });
203
+ this.nodeConfigure = this.node.locator(">div").first();
204
+ this.addAssigneesButton = page.getByRole("button", { name: "plus Add" });
205
205
  this.addSelectAssigneesMenu = page.getByRole("button", { name: "Select assignees" });
206
206
  this.addQueryAssigneesMenu = page.getByRole("button", { name: "Query assignees" });
207
207
  this.assigneesDropDown = page.getByTestId("select-single");
208
208
  this.OrRadio = page.getByLabel("Or", { exact: true });
209
209
  this.AndRadio = page.getByLabel("And", { exact: true });
210
210
  this.votingRadio = page.getByLabel("Voting", { exact: true });
211
- this.votingThresholdEditBox = page.getByLabel("block-item-NegotiationConfig-workflows-Negotiation mode").getByRole("spinbutton");
211
+ this.votingThresholdEditBox = page.getByLabel("block-item-Negotiation-workflows-Negotiation mode").getByRole("spinbutton");
212
212
  this.parallellyRadio = page.getByLabel("Parallelly", { exact: true });
213
213
  this.sequentiallyRadio = page.getByLabel("Sequentially", { exact: true });
214
214
  this.goToconfigureButton = page.getByRole("button", { name: "Go to configure" });
@@ -268,15 +268,15 @@ class ApprovalBranchModeNode {
268
268
  this.page = page;
269
269
  this.node = page.getByLabel(`Approval-${nodeName}`, { exact: true });
270
270
  this.nodeTitle = page.getByLabel(`Approval-${nodeName}`, { exact: true }).getByRole("textbox");
271
- this.nodeConfigure = page.getByLabel(`Approval-${nodeName}`, { exact: true }).getByRole("button", { name: "Configure" });
272
- this.addAssigneesButton = page.getByRole("button", { name: "plus Add assignee" });
271
+ this.nodeConfigure = this.node.locator(">div").first();
272
+ this.addAssigneesButton = page.getByRole("button", { name: "plus Add" });
273
273
  this.addSelectAssigneesMenu = page.getByRole("button", { name: "Select assignees" });
274
274
  this.addQueryAssigneesMenu = page.getByRole("button", { name: "Query assignees" });
275
275
  this.assigneesDropDown = page.getByTestId("select-single");
276
276
  this.OrRadio = page.getByLabel("Or", { exact: true });
277
277
  this.AndRadio = page.getByLabel("And", { exact: true });
278
278
  this.votingRadio = page.getByLabel("Voting", { exact: true });
279
- this.votingThresholdEditBox = page.getByLabel("block-item-NegotiationConfig-workflows-Negotiation mode").getByRole("spinbutton");
279
+ this.votingThresholdEditBox = page.getByLabel("block-item-Negotiation-workflows-Negotiation mode").getByRole("spinbutton");
280
280
  this.parallellyRadio = page.getByLabel("Parallelly", { exact: true });
281
281
  this.sequentiallyRadio = page.getByLabel("Sequentially", { exact: true });
282
282
  this.goToconfigureButton = page.getByRole("button", { name: "Go to configure" });
@@ -319,9 +319,9 @@ class ScheduleTriggerNode {
319
319
  addNodeButton;
320
320
  constructor(page, triggerName, collectionName) {
321
321
  this.page = page;
322
- this.node = page.getByText("TriggeraConfigure");
322
+ this.node = page.getByLabel(`Trigger-${triggerName}`);
323
323
  this.nodeTitle = page.locator("textarea").filter({ hasText: triggerName });
324
- this.nodeConfigure = page.getByRole("button", { name: "Configure" });
324
+ this.nodeConfigure = this.node.locator(">div").first();
325
325
  this.customTimeTriggerOptions = page.getByLabel("Based on certain date");
326
326
  this.startTimeEntryBox = page.getByPlaceholder("Select date");
327
327
  this.RrpeatModeDropdown = page.getByLabel("block-item-RepeatField-workflows-Repeat mode");
@@ -347,7 +347,7 @@ class CollectionTriggerNode {
347
347
  this.page = page;
348
348
  this.node = page.getByLabel(`Trigger-${triggerName}`);
349
349
  this.nodeTitle = page.getByLabel(`Trigger-${triggerName}`).getByRole("textbox");
350
- this.nodeConfigure = page.getByLabel(`Trigger-${triggerName}`).getByRole("button", { name: "Configure" });
350
+ this.nodeConfigure = this.node.locator(">div").first();
351
351
  this.collectionDropDown = page.getByLabel("block-item-DataSourceCollectionCascader-workflows-Collection").locator(".ant-select-selection-search-input");
352
352
  this.triggerOnDropdown = page.getByLabel("block-item-Select-workflows-Trigger on").getByRole("button", { name: "Trigger on" });
353
353
  this.submitButton = page.getByLabel("action-Action-Submit-workflows");
@@ -369,7 +369,7 @@ class FormEventTriggerNode {
369
369
  this.page = page;
370
370
  this.node = page.getByLabel(`Trigger-${triggerName}`);
371
371
  this.nodeTitle = page.getByLabel(`Trigger-${triggerName}`).getByRole("textbox");
372
- this.nodeConfigure = page.getByLabel(`Trigger-${triggerName}`).getByRole("button", { name: "Configure" });
372
+ this.nodeConfigure = this.node.locator(">div").first();
373
373
  this.collectionDropDown = page.getByLabel("block-item-DataSourceCollectionCascader-workflows-Collection").locator(".ant-select-selection-search-input");
374
374
  this.relationalDataDropdown = page.getByTestId("select-field-Preload associations");
375
375
  this.submitButton = page.getByLabel("action-Action-Submit-workflows");
@@ -391,7 +391,7 @@ class CustomActionEventTriggerNode {
391
391
  this.page = page;
392
392
  this.node = page.getByLabel(`Trigger-${triggerName}`);
393
393
  this.nodeTitle = page.getByLabel(`Trigger-${triggerName}`).getByRole("textbox");
394
- this.nodeConfigure = page.getByLabel(`Trigger-${triggerName}`).getByRole("button", { name: "Configure" });
394
+ this.nodeConfigure = this.node.locator(">div").first();
395
395
  this.collectionDropDown = page.getByLabel("block-item-DataSourceCollectionCascader-workflows-Collection").locator(".ant-select-selection-search-input");
396
396
  this.relationalDataDropdown = page.getByTestId("select-field-Preload associations");
397
397
  this.submitButton = page.getByLabel("action-Action-Submit-workflows");
@@ -414,7 +414,7 @@ class CalculationNode {
414
414
  this.page = page;
415
415
  this.node = page.getByLabel(`Calculation-${nodeName}`, { exact: true });
416
416
  this.nodeTitle = page.getByLabel(`Calculation-${nodeName}`, { exact: true }).getByRole("textbox");
417
- this.nodeConfigure = page.getByLabel(`Calculation-${nodeName}`, { exact: true }).getByRole("button", { name: "Configure" });
417
+ this.nodeConfigure = this.node.locator(">div").first();
418
418
  this.mathCalculationEngine = page.getByLabel("Math.js");
419
419
  this.formulaCalculationEngine = page.getByLabel("Formula.js");
420
420
  this.calculationExpression = page.getByLabel("textbox");
@@ -444,7 +444,7 @@ class QueryRecordNode {
444
444
  this.page = page;
445
445
  this.node = page.getByLabel(`Query record-${nodeName}`, { exact: true });
446
446
  this.nodeTitle = page.getByLabel(`Query record-${nodeName}`, { exact: true }).getByRole("textbox");
447
- this.nodeConfigure = page.getByLabel(`Query record-${nodeName}`, { exact: true }).getByRole("button", { name: "Configure" });
447
+ this.nodeConfigure = this.node.locator(">div").first();
448
448
  this.collectionDropDown = page.getByLabel("block-item-DataSourceCollectionCascader-workflows-Collection").locator(".ant-select-selection-search-input");
449
449
  this.singleRecordRadioButton = page.getByLabel("block-item-RadioWithTooltip-").getByLabel("Single record");
450
450
  this.multipleRecordsRadioButton = page.getByLabel("block-item-RadioWithTooltip-").getByLabel("Multiple records");
@@ -472,7 +472,7 @@ class CreateRecordNode {
472
472
  this.page = page;
473
473
  this.node = page.getByLabel(`Create record-${nodeName}`, { exact: true });
474
474
  this.nodeTitle = page.getByLabel(`Create record-${nodeName}`, { exact: true }).getByRole("textbox");
475
- this.nodeConfigure = page.getByLabel(`Create record-${nodeName}`, { exact: true }).getByRole("button", { name: "Configure" });
475
+ this.nodeConfigure = this.node.locator(">div").first();
476
476
  this.collectionDropDown = page.getByLabel("block-item-DataSourceCollectionCascader-workflows-Collection").locator(".ant-select-selection-search-input");
477
477
  this.addFieldsButton = page.getByLabel("schema-initializer-Grid-assignFieldValuesForm:configureFields");
478
478
  this.submitButton = page.getByLabel("action-Action-Submit-workflows");
@@ -496,7 +496,7 @@ class UpdateRecordNode {
496
496
  this.page = page;
497
497
  this.node = page.getByLabel(`Update record-${nodeName}`, { exact: true });
498
498
  this.nodeTitle = page.getByLabel(`Update record-${nodeName}`, { exact: true }).getByRole("textbox");
499
- this.nodeConfigure = page.getByLabel(`Update record-${nodeName}`, { exact: true }).getByRole("button", { name: "Configure" });
499
+ this.nodeConfigure = this.node.locator(">div").first();
500
500
  this.collectionDropDown = page.getByLabel("block-item-DataSourceCollectionCascader-workflows-Collection").locator(".ant-select-selection-search-input");
501
501
  this.batchUpdateModeRadio = page.getByLabel("block-item-RadioWithTooltip-workflows-Update mode").getByLabel("Update in a batch");
502
502
  this.articleByArticleUpdateModeRadio = page.getByLabel("block-item-RadioWithTooltip-workflows-Update mode").getByLabel("Update one by one");
@@ -519,7 +519,7 @@ class DeleteRecordNode {
519
519
  this.page = page;
520
520
  this.node = page.getByLabel(`Delete record-${nodeName}`, { exact: true });
521
521
  this.nodeTitle = page.getByLabel(`Delete record-${nodeName}`, { exact: true }).getByRole("textbox");
522
- this.nodeConfigure = page.getByLabel(`Delete record-${nodeName}`, { exact: true }).getByRole("button", { name: "Configure" });
522
+ this.nodeConfigure = this.node.locator(">div").first();
523
523
  this.collectionDropDown = page.getByLabel("block-item-DataSourceCollectionCascader-workflows-Collection").locator(".ant-select-selection-search-input");
524
524
  this.submitButton = page.getByLabel("action-Action-Submit-workflows");
525
525
  this.cancelButton = page.getByLabel("action-Action-Cancel-workflows");
@@ -548,7 +548,7 @@ class AggregateNode {
548
548
  this.page = page;
549
549
  this.node = page.getByLabel(`Aggregate-${nodeName}`, { exact: true });
550
550
  this.nodeTitle = page.getByLabel(`Aggregate-${nodeName}`, { exact: true }).getByRole("textbox");
551
- this.nodeConfigure = page.getByLabel(`Aggregate-${nodeName}`, { exact: true }).getByRole("button", { name: "Configure" });
551
+ this.nodeConfigure = this.node.locator(">div").first();
552
552
  this.countRadio = page.getByLabel("COUNT");
553
553
  this.sumRadio = page.getByLabel("SUM", { exact: true });
554
554
  this.avgRadio = page.getByLabel("AVG", { exact: true });
@@ -584,7 +584,7 @@ class ManualNode {
584
584
  this.page = page;
585
585
  this.node = page.getByLabel(`Manual-${nodeName}`, { exact: true });
586
586
  this.nodeTitle = page.getByLabel(`Manual-${nodeName}`, { exact: true }).getByRole("textbox");
587
- this.nodeConfigure = page.getByLabel(`Manual-${nodeName}`, { exact: true }).getByRole("button", { name: "Configure" });
587
+ this.nodeConfigure = this.node.locator(">div").first();
588
588
  this.assigneesDropDown = page.getByTestId("select-single");
589
589
  this.configureUserInterfaceButton = page.getByRole("button", { name: "Configure user interface" });
590
590
  this.addBlockButton = page.getByLabel(
@@ -616,7 +616,7 @@ class ConditionYesNode {
616
616
  this.page = page;
617
617
  this.node = page.getByLabel(`Condition-${nodeName}`, { exact: true });
618
618
  this.nodeTitle = page.getByLabel(`Condition-${nodeName}`, { exact: true }).getByRole("textbox");
619
- this.nodeConfigure = page.getByLabel(`Condition-${nodeName}`, { exact: true }).getByRole("button", { name: "Configure" });
619
+ this.nodeConfigure = this.node.locator(">div").first();
620
620
  this.conditionExpressionEditBox = page.getByLabel("textbox");
621
621
  this.basicRadio = page.getByLabel("Basic");
622
622
  this.mathRadio = page.getByLabel("Math.js");
@@ -644,7 +644,7 @@ class ConditionBranchNode {
644
644
  this.page = page;
645
645
  this.node = page.getByLabel(`Condition-${nodeName}`, { exact: true });
646
646
  this.nodeTitle = page.getByLabel(`Condition-${nodeName}`, { exact: true }).getByRole("textbox");
647
- this.nodeConfigure = page.getByLabel(`Condition-${nodeName}`, { exact: true }).getByRole("button", { name: "Configure" });
647
+ this.nodeConfigure = this.node.locator(">div").first();
648
648
  this.conditionExpressionEditBox = page.getByLabel("textbox");
649
649
  this.submitButton = page.getByLabel("action-Action-Submit-workflows");
650
650
  this.cancelButton = page.getByLabel("action-Action-Cancel-workflows");
@@ -669,7 +669,7 @@ class SQLNode {
669
669
  this.page = page;
670
670
  this.node = page.getByLabel(`SQL action-${nodeName}`, { exact: true });
671
671
  this.nodeTitle = page.getByLabel(`SQL action-${nodeName}`, { exact: true }).getByRole("textbox");
672
- this.nodeConfigure = page.getByLabel(`SQL action-${nodeName}`, { exact: true }).getByRole("button", { name: "Configure" });
672
+ this.nodeConfigure = this.node.locator(">div").first();
673
673
  this.sqlEditBox = page.getByLabel("block-item-WorkflowVariableRawTextArea-workflows-SQL").getByRole("textbox");
674
674
  this.submitButton = page.getByLabel("action-Action-Submit-workflows");
675
675
  this.cancelButton = page.getByLabel("action-Action-Cancel-workflows");
@@ -692,7 +692,7 @@ class ParallelBranchNode {
692
692
  this.page = page;
693
693
  this.node = page.getByLabel(`Parallel branch-${nodeName}`, { exact: true });
694
694
  this.nodeTitle = page.locator("textarea").filter({ hasText: nodeName });
695
- this.nodeConfigure = page.getByLabel(`Parallel branch-${nodeName}`).getByRole("button", { name: "Configure" });
695
+ this.nodeConfigure = this.node.locator(">div").first();
696
696
  this.addBranchButton = page.getByLabel(`add-button-parallel-${nodeName}-add-branch`, { exact: true });
697
697
  this.allSucceededRadio = page.getByLabel("All succeeded", { exact: true });
698
698
  this.anySucceededRadio = page.getByLabel("Any succeeded", { exact: true });
@@ -27,6 +27,7 @@ export declare const apiCreateRecordTriggerActionEvent: (collectionName: string,
27
27
  export declare const apiTriggerCustomActionEvent: (collectionName: string, triggerWorkflows: string, data: any) => Promise<any>;
28
28
  export declare const apiApplyApprovalEvent: (data: any) => Promise<any>;
29
29
  export declare const apiCreateField: (collectionName: string, data: any) => Promise<any>;
30
+ export declare const approvalUserPassword = "1a2B3c4#";
30
31
  export declare const userLogin: (browser: Browser, approvalUserEmail: string, approvalUser: string) => Promise<import("playwright-core").BrowserContext>;
31
32
  declare const _default: {
32
33
  apiCreateWorkflow: (data: any) => Promise<any>;
@@ -50,5 +51,6 @@ declare const _default: {
50
51
  userLogin: (browser: Browser, approvalUserEmail: string, approvalUser: string) => Promise<import("playwright-core").BrowserContext>;
51
52
  apiCreateField: (collectionName: string, data: any) => Promise<any>;
52
53
  apiTriggerCustomActionEvent: (collectionName: string, triggerWorkflows: string, data: any) => Promise<any>;
54
+ approvalUserPassword: string;
53
55
  };
54
56
  export default _default;
@@ -46,6 +46,7 @@ __export(e2eUtils_exports, {
46
46
  apiUpdateWorkflow: () => apiUpdateWorkflow,
47
47
  apiUpdateWorkflowNode: () => apiUpdateWorkflowNode,
48
48
  apiUpdateWorkflowTrigger: () => apiUpdateWorkflowTrigger,
49
+ approvalUserPassword: () => approvalUserPassword,
49
50
  default: () => e2eUtils_default,
50
51
  userLogin: () => userLogin
51
52
  });
@@ -387,12 +388,13 @@ function getHeaders(storageState) {
387
388
  }
388
389
  return headers;
389
390
  }
391
+ const approvalUserPassword = "1a2B3c4#";
390
392
  const userLogin = async (browser, approvalUserEmail, approvalUser) => {
391
393
  const context = await browser.newContext();
392
394
  const page = await context.newPage();
393
395
  await page.goto("signin");
394
396
  await page.getByPlaceholder("Email").fill(approvalUserEmail);
395
- await page.getByPlaceholder("Password").fill(approvalUser);
397
+ await page.getByPlaceholder("Password").fill(approvalUserPassword);
396
398
  await page.getByRole("button", { name: "Sign in" }).click();
397
399
  await page.waitForLoadState("load");
398
400
  return context;
@@ -418,7 +420,8 @@ var e2eUtils_default = module.exports = {
418
420
  apiApplyApprovalEvent,
419
421
  userLogin,
420
422
  apiCreateField,
421
- apiTriggerCustomActionEvent
423
+ apiTriggerCustomActionEvent,
424
+ approvalUserPassword
422
425
  };
423
426
  // Annotate the CommonJS export names for ESM import in node:
424
427
  0 && (module.exports = {
@@ -442,5 +445,6 @@ var e2eUtils_default = module.exports = {
442
445
  apiUpdateWorkflow,
443
446
  apiUpdateWorkflowNode,
444
447
  apiUpdateWorkflowTrigger,
448
+ approvalUserPassword,
445
449
  userLogin
446
450
  });
@@ -8,11 +8,11 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "1.6.0-alpha.2",
12
- "@nocobase/utils": "1.6.0-alpha.2",
11
+ "@nocobase/client": "1.6.0-alpha.20",
12
+ "@nocobase/utils": "1.6.0-alpha.20",
13
13
  "lodash": "4.17.21",
14
- "@nocobase/test": "1.6.0-alpha.2",
15
- "@nocobase/server": "1.6.0-alpha.2",
16
- "@nocobase/data-source-manager": "1.6.0-alpha.2",
17
- "@nocobase/database": "1.6.0-alpha.2"
14
+ "@nocobase/test": "1.6.0-alpha.20",
15
+ "@nocobase/server": "1.6.0-alpha.20",
16
+ "@nocobase/data-source-manager": "1.6.0-alpha.20",
17
+ "@nocobase/database": "1.6.0-alpha.20"
18
18
  };
@@ -39,6 +39,14 @@ var categories_default = {
39
39
  {
40
40
  type: "hasMany",
41
41
  name: "posts"
42
+ },
43
+ {
44
+ type: "date",
45
+ name: "createdAt"
46
+ },
47
+ {
48
+ type: "date",
49
+ name: "updatedAt"
42
50
  }
43
51
  ]
44
52
  };
@@ -31,6 +31,8 @@ __export(comments_exports, {
31
31
  module.exports = __toCommonJS(comments_exports);
32
32
  var comments_default = {
33
33
  name: "comments",
34
+ createdBy: true,
35
+ updatedBy: true,
34
36
  fields: [
35
37
  {
36
38
  type: "belongsTo",
@@ -48,6 +50,14 @@ var comments_default = {
48
50
  {
49
51
  type: "hasMany",
50
52
  name: "replies"
53
+ },
54
+ {
55
+ type: "date",
56
+ name: "createdAt"
57
+ },
58
+ {
59
+ type: "date",
60
+ name: "updatedAt"
51
61
  }
52
62
  ]
53
63
  };
@@ -64,6 +64,14 @@ var posts_default = {
64
64
  type: "integer",
65
65
  name: "read",
66
66
  defaultValue: 0
67
+ },
68
+ {
69
+ type: "date",
70
+ name: "createdAt"
71
+ },
72
+ {
73
+ type: "date",
74
+ name: "updatedAt"
67
75
  }
68
76
  ]
69
77
  };
@@ -8,6 +8,8 @@
8
8
  */
9
9
  declare const _default: {
10
10
  name: string;
11
+ createdBy: boolean;
12
+ updatedBy: boolean;
11
13
  fields: {
12
14
  type: string;
13
15
  name: string;
@@ -31,10 +31,20 @@ __export(replies_exports, {
31
31
  module.exports = __toCommonJS(replies_exports);
32
32
  var replies_default = {
33
33
  name: "replies",
34
+ createdBy: true,
35
+ updatedBy: true,
34
36
  fields: [
35
37
  {
36
38
  type: "string",
37
39
  name: "content"
40
+ },
41
+ {
42
+ type: "date",
43
+ name: "createdAt"
44
+ },
45
+ {
46
+ type: "date",
47
+ name: "updatedAt"
38
48
  }
39
49
  ]
40
50
  };
@@ -31,6 +31,8 @@ __export(tags_exports, {
31
31
  module.exports = __toCommonJS(tags_exports);
32
32
  var tags_default = {
33
33
  name: "tags",
34
+ createdBy: true,
35
+ updatedBy: true,
34
36
  fields: [
35
37
  {
36
38
  type: "belongsToMany",
@@ -39,6 +41,14 @@ var tags_default = {
39
41
  {
40
42
  type: "string",
41
43
  name: "name"
44
+ },
45
+ {
46
+ type: "date",
47
+ name: "createdAt"
48
+ },
49
+ {
50
+ type: "date",
51
+ name: "updatedAt"
42
52
  }
43
53
  ]
44
54
  };
@@ -97,7 +97,7 @@ async function getApp({
97
97
  directory: import_path.default.resolve(__dirname, "collections")
98
98
  });
99
99
  await anotherDB.sync();
100
- another.acl.allow("*", "*");
100
+ another.acl.allow("*", "*", "loggedIn");
101
101
  return app;
102
102
  }
103
103
  async function getCluster({ plugins = [], collectionsPath, ...options }) {
@@ -48,6 +48,10 @@ declare const _default: {
48
48
  };
49
49
  resume(node: any, input: any, processor: any): any;
50
50
  };
51
+ asyncResume: {
52
+ run(node: any, input: any, processor: any): Promise<any>;
53
+ resume(node: any, job: any, processor: any): any;
54
+ };
51
55
  customizedSuccess: {
52
56
  run(node: any, input: any, processor: any): {
53
57
  status: number;
@@ -93,6 +93,26 @@ var instructions_default = {
93
93
  return null;
94
94
  }
95
95
  },
96
+ asyncResume: {
97
+ async run(node, input, processor) {
98
+ const job = await processor.saveJob({
99
+ status: 0,
100
+ nodeId: node.id,
101
+ nodeKey: node.key,
102
+ upstreamId: (input == null ? void 0 : input.id) ?? null
103
+ });
104
+ setTimeout(() => {
105
+ job.set({
106
+ status: 1
107
+ });
108
+ processor.options.plugin.resume(job);
109
+ }, 100);
110
+ return null;
111
+ },
112
+ resume(node, job, processor) {
113
+ return job;
114
+ }
115
+ },
96
116
  customizedSuccess: {
97
117
  run(node, input, processor) {
98
118
  return {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@nocobase/plugin-workflow-test",
3
3
  "displayName": "Workflow: test kit",
4
4
  "displayName.zh-CN": "工作流:测试工具包",
5
- "version": "1.6.0-alpha.2",
5
+ "version": "1.6.0-alpha.20",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "dist/server/index.js",
8
8
  "types": "./dist/server/index.d.ts",
@@ -11,5 +11,5 @@
11
11
  "@nocobase/server": "1.x",
12
12
  "@nocobase/test": "1.x"
13
13
  },
14
- "gitHead": "08bbc34c21727fc0ad0880f397a42bf7741091ee"
14
+ "gitHead": "c127664eb2b900edd5c18c9344046cd663a06c3b"
15
15
  }