@acorex/platform 21.0.0-next.57 → 21.0.0-next.59
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/fesm2022/acorex-platform-common.mjs +11 -0
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +2 -2
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +33 -1
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +1 -0
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widgets.mjs +226 -0
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +35 -3
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/package.json +1 -1
- package/types/acorex-platform-common.d.ts +11 -0
- package/types/acorex-platform-layout-entity.d.ts +42 -3
- package/types/acorex-platform-layout-widget-core.d.ts +1 -0
- package/types/acorex-platform-workflow.d.ts +31 -2
|
@@ -1292,6 +1292,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
1292
1292
|
}]
|
|
1293
1293
|
}] });
|
|
1294
1294
|
|
|
1295
|
+
const AXP_WORKFLOW_CONTINUATION_HOOK = new InjectionToken('AXP_WORKFLOW_CONTINUATION_HOOK');
|
|
1296
|
+
/** When true on resume `userInput`, skips the post-step continuation dialog (auto-advance). */
|
|
1297
|
+
const AXP_WORKFLOW_SUPPRESS_CONTINUATION_INPUT_KEY = '_suppressWorkflowContinuation';
|
|
1298
|
+
function isWorkflowContinuationSuppressed(userInput) {
|
|
1299
|
+
if (userInput == null || typeof userInput !== 'object') {
|
|
1300
|
+
return false;
|
|
1301
|
+
}
|
|
1302
|
+
return userInput[AXP_WORKFLOW_SUPPRESS_CONTINUATION_INPUT_KEY] === true;
|
|
1303
|
+
}
|
|
1304
|
+
//#endregion
|
|
1305
|
+
|
|
1295
1306
|
//#endregion
|
|
1296
1307
|
/**
|
|
1297
1308
|
* Workflow Manager - Facade for workflow lifecycle orchestration.
|
|
@@ -1317,6 +1328,7 @@ class AXPWorkflowManager {
|
|
|
1317
1328
|
//#region ---- Services & Dependencies ----
|
|
1318
1329
|
this.workflowEngine = inject(AXP_WORKFLOW_ENGINE);
|
|
1319
1330
|
this.activityExecutor = inject(ActivityExecutor);
|
|
1331
|
+
this.continuationHook = inject(AXP_WORKFLOW_CONTINUATION_HOOK, { optional: true });
|
|
1320
1332
|
//#endregion
|
|
1321
1333
|
//#region ---- State Cache ----
|
|
1322
1334
|
/**
|
|
@@ -1478,13 +1490,20 @@ class AXPWorkflowManager {
|
|
|
1478
1490
|
}
|
|
1479
1491
|
// If backend returned null or non-executable task, return it as-is
|
|
1480
1492
|
// Backend already decided workflow status (suspended, completed, etc.)
|
|
1481
|
-
|
|
1493
|
+
const startResult = {
|
|
1482
1494
|
success: true,
|
|
1483
1495
|
instanceId: response.instanceId,
|
|
1484
1496
|
state: startNormalizedState,
|
|
1485
1497
|
nextTask: finalNextTask,
|
|
1486
1498
|
output: finalOutput,
|
|
1487
1499
|
};
|
|
1500
|
+
if (!isWorkflowContinuationSuppressed(input)) {
|
|
1501
|
+
await this.continuationHook?.offerAfterWorkflowStep?.({
|
|
1502
|
+
instanceId: response.instanceId,
|
|
1503
|
+
pendingNextTask: finalNextTask,
|
|
1504
|
+
});
|
|
1505
|
+
}
|
|
1506
|
+
return startResult;
|
|
1488
1507
|
}
|
|
1489
1508
|
catch (error) {
|
|
1490
1509
|
console.error('[AXPWorkflowManager] ❌ Error starting workflow:', error);
|
|
@@ -1547,13 +1566,26 @@ class AXPWorkflowManager {
|
|
|
1547
1566
|
}
|
|
1548
1567
|
// If backend returned null or non-executable task, return it as-is
|
|
1549
1568
|
// Backend already decided workflow status (suspended, completed, etc.)
|
|
1550
|
-
|
|
1569
|
+
const resumeResult = {
|
|
1551
1570
|
success: true,
|
|
1552
1571
|
instanceId,
|
|
1553
1572
|
state: normalizedState || response.state,
|
|
1554
1573
|
nextTask: finalNextTask,
|
|
1555
1574
|
output: finalOutput,
|
|
1556
1575
|
};
|
|
1576
|
+
const completedBookmarkId = typeof userInput === 'object' && userInput != null && 'bookmarkId' in userInput
|
|
1577
|
+
? String(userInput.bookmarkId ?? '')
|
|
1578
|
+
: undefined;
|
|
1579
|
+
if (!isWorkflowContinuationSuppressed(userInput)) {
|
|
1580
|
+
await this.continuationHook?.offerAfterWorkflowStep?.({
|
|
1581
|
+
instanceId,
|
|
1582
|
+
completedActivityId: stepId,
|
|
1583
|
+
completedBookmarkId: completedBookmarkId || undefined,
|
|
1584
|
+
resumeOutcome: outcome,
|
|
1585
|
+
pendingNextTask: finalNextTask,
|
|
1586
|
+
});
|
|
1587
|
+
}
|
|
1588
|
+
return resumeResult;
|
|
1557
1589
|
}
|
|
1558
1590
|
catch (error) {
|
|
1559
1591
|
const { message, code } = getWorkflowEngineErrorInfo(error);
|
|
@@ -2639,5 +2671,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
2639
2671
|
* Generated bundle index. Do not edit.
|
|
2640
2672
|
*/
|
|
2641
2673
|
|
|
2642
|
-
export { AXPActivityDefinitionService, AXPWorkflowAction, AXPWorkflowContext, AXPWorkflowDefinitionService, AXPWorkflowEngineError, AXPWorkflowError, AXPWorkflowEventService, AXPWorkflowFunction, AXPWorkflowLocalEngine, AXPWorkflowManager, AXPWorkflowModule, AXPWorkflowRegistryService, AXPWorkflowService, AXP_ACTIVITY_CATEGORY_PROVIDER, AXP_ACTIVITY_PROVIDER, AXP_WORKFLOW_CATEGORY_PROVIDER, AXP_WORKFLOW_ENGINE, AXP_WORKFLOW_ERROR_CODES, AXP_WORKFLOW_PROVIDER, AXP_WORKFLOW_TASK_BOARD_ACTIVITY_TYPES, ActivityExecutor, WorkflowExpressionScopeService, axpIsWorkflowTaskBoardActivityType, createWorkFlowEvent, getWorkflowEngineErrorCode, getWorkflowEngineErrorInfo, ofType };
|
|
2674
|
+
export { AXPActivityDefinitionService, AXPWorkflowAction, AXPWorkflowContext, AXPWorkflowDefinitionService, AXPWorkflowEngineError, AXPWorkflowError, AXPWorkflowEventService, AXPWorkflowFunction, AXPWorkflowLocalEngine, AXPWorkflowManager, AXPWorkflowModule, AXPWorkflowRegistryService, AXPWorkflowService, AXP_ACTIVITY_CATEGORY_PROVIDER, AXP_ACTIVITY_PROVIDER, AXP_WORKFLOW_CATEGORY_PROVIDER, AXP_WORKFLOW_CONTINUATION_HOOK, AXP_WORKFLOW_ENGINE, AXP_WORKFLOW_ERROR_CODES, AXP_WORKFLOW_PROVIDER, AXP_WORKFLOW_SUPPRESS_CONTINUATION_INPUT_KEY, AXP_WORKFLOW_TASK_BOARD_ACTIVITY_TYPES, ActivityExecutor, WorkflowExpressionScopeService, axpIsWorkflowTaskBoardActivityType, createWorkFlowEvent, getWorkflowEngineErrorCode, getWorkflowEngineErrorInfo, isWorkflowContinuationSuppressed, ofType };
|
|
2643
2675
|
//# sourceMappingURL=acorex-platform-workflow.mjs.map
|