@acorex/platform 20.6.0-next.2 → 20.6.0-next.4

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.
Files changed (39) hide show
  1. package/common/index.d.ts +2 -1
  2. package/core/index.d.ts +2 -2
  3. package/fesm2022/{acorex-platform-common-common-settings.provider-CLb2KMfv.mjs → acorex-platform-common-common-settings.provider-CGVarshJ.mjs} +25 -1
  4. package/fesm2022/acorex-platform-common-common-settings.provider-CGVarshJ.mjs.map +1 -0
  5. package/fesm2022/acorex-platform-common.mjs +3 -2
  6. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  7. package/fesm2022/acorex-platform-layout-components.mjs +207 -40
  8. package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
  9. package/fesm2022/acorex-platform-layout-designer.mjs +1 -1
  10. package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
  11. package/fesm2022/acorex-platform-layout-entity.mjs +294 -145
  12. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  13. package/fesm2022/acorex-platform-layout-views.mjs +17 -3
  14. package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
  15. package/fesm2022/acorex-platform-layout-widget-core.mjs +12 -0
  16. package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
  17. package/fesm2022/{acorex-platform-layout-widgets-file-list-popup.component-BOP7jFp4.mjs → acorex-platform-layout-widgets-file-list-popup.component-2q4whXBx.mjs} +3 -3
  18. package/fesm2022/{acorex-platform-layout-widgets-file-list-popup.component-BOP7jFp4.mjs.map → acorex-platform-layout-widgets-file-list-popup.component-2q4whXBx.mjs.map} +1 -1
  19. package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-fr77M8Z0.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-DGDLHbaR.mjs} +3 -3
  20. package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-fr77M8Z0.mjs.map → acorex-platform-layout-widgets-tabular-data-edit-popup.component-DGDLHbaR.mjs.map} +1 -1
  21. package/fesm2022/acorex-platform-layout-widgets.mjs +866 -260
  22. package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
  23. package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-BkY9HXcT.mjs → acorex-platform-themes-default-entity-master-list-view.component-Beba9db5.mjs} +29 -8
  24. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-Beba9db5.mjs.map +1 -0
  25. package/fesm2022/acorex-platform-themes-default.mjs +3 -3
  26. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  27. package/fesm2022/acorex-platform-themes-shared.mjs +2 -2
  28. package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
  29. package/fesm2022/acorex-platform-workflow.mjs +13 -76
  30. package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
  31. package/layout/components/index.d.ts +7 -1
  32. package/layout/entity/index.d.ts +25 -10
  33. package/layout/views/index.d.ts +1 -0
  34. package/layout/widget-core/index.d.ts +6 -0
  35. package/layout/widgets/index.d.ts +139 -28
  36. package/package.json +5 -5
  37. package/workflow/index.d.ts +884 -433
  38. package/fesm2022/acorex-platform-common-common-settings.provider-CLb2KMfv.mjs.map +0 -1
  39. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-BkY9HXcT.mjs.map +0 -1
@@ -415,6 +415,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImpo
415
415
  }]
416
416
  }] });
417
417
 
418
+ // ============================================
419
+ // WORKFLOW INSTANCE v3.0.0 TYPES
420
+ // Based on Elsa Workflow Instance schema: https://elsaworkflows.io/schemas/workflow-instance/v3.0.0/schema.json
421
+ // Compatible with Elsa backend while using ACoreX naming conventions
422
+ // ============================================
423
+
418
424
  /**
419
425
  * Base abstract class for activities.
420
426
  * Extend this to create custom activities.
@@ -808,6 +814,7 @@ class WorkflowCoordinator {
808
814
  const response = await this.workflowExecutionService.resumeExecution({
809
815
  executionId,
810
816
  stepId: task.activityId,
817
+ taskToken: task.taskToken,
811
818
  outcome,
812
819
  userInput: output
813
820
  });
@@ -852,12 +859,17 @@ class WorkflowCoordinator {
852
859
  * @param outcome - User action outcome (e.g., 'Confirmed', 'Cancelled', 'Submitted')
853
860
  * @param userInput - Optional user input data
854
861
  */
855
- async resumeWorkflow(executionId, stepId, outcome, userInput) {
862
+ async resumeWorkflow(executionId, stepId, outcome, userInput, taskToken) {
856
863
  try {
864
+ // Ensure taskToken is provided for secure resumption
865
+ if (!taskToken) {
866
+ throw new Error('Missing taskToken for resumeWorkflow');
867
+ }
857
868
  // Backend handles everything: checks outcomeConnections and determines nextStep
858
869
  const response = await this.workflowExecutionService.resumeExecution({
859
870
  executionId,
860
871
  stepId,
872
+ taskToken,
861
873
  outcome,
862
874
  userInput
863
875
  });
@@ -907,81 +919,6 @@ class WorkflowCoordinator {
907
919
  return null;
908
920
  }
909
921
  }
910
- /**
911
- * Start step-based execution (only current step, not full workflow).
912
- *
913
- * Use this when you only need to execute one step at a time.
914
- * Perfect for form-based workflows where user interacts with forms.
915
- *
916
- * @param workflowId - Workflow ID
917
- * @param stepId - Initial step ID to execute
918
- * @param input - Initial input data
919
- * @returns Execution info with executionId and initial state
920
- *
921
- * @example
922
- * ```typescript
923
- * // Start login form step
924
- * const execution = await coordinator.startStepExecution(
925
- * 'login-workflow',
926
- * 'login-form-step',
927
- * {}
928
- * );
929
- *
930
- * // Save executionId for resume after refresh
931
- * localStorage.setItem('execution-id', execution.executionId);
932
- * ```
933
- */
934
- async startStepExecution(workflowId, stepId, input = {}) {
935
- // Start workflow execution in backend
936
- const execution = await this.startWorkflowExecution(workflowId, input);
937
- // Update state with current step
938
- const stateWithStep = {
939
- ...execution.state,
940
- currentStepId: stepId,
941
- status: 'running'
942
- };
943
- // Update cache
944
- this.stateCache.set(execution.executionId, stateWithStep);
945
- return {
946
- executionId: execution.executionId,
947
- state: stateWithStep
948
- };
949
- }
950
- /**
951
- * Get next task from backend after backend task completion.
952
- *
953
- * Use this when backend task completes - backend will return next task.
954
- * For frontend tasks, use executeTask + completeTask instead.
955
- *
956
- * @param executionId - Execution ID
957
- * @returns Next task from backend (if any)
958
- */
959
- async getNextTask(executionId) {
960
- try {
961
- // Backend handles everything: executes backend tasks and returns next task
962
- const response = await this.workflowExecutionService.executeCurrentStep({
963
- executionId
964
- });
965
- // Update cache
966
- if (response.state) {
967
- this.stateCache.set(executionId, response.state);
968
- }
969
- return {
970
- success: true,
971
- output: response.output,
972
- nextTask: response.nextTask || null,
973
- executionId,
974
- state: response.state
975
- };
976
- }
977
- catch (error) {
978
- return {
979
- success: false,
980
- error: error.message || 'Failed to get next task',
981
- nextTask: null
982
- };
983
- }
984
- }
985
922
  //#endregion
986
923
  //#region ---- Private Methods ----
987
924
  /**