@algotech-ce/interpretor 2.0.0
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/dist/@utils/index.d.ts +7 -0
- package/dist/@utils/index.js +18 -0
- package/dist/@utils/index.js.map +1 -0
- package/dist/@utils/magnet-utils.d.ts +34 -0
- package/dist/@utils/magnet-utils.js +284 -0
- package/dist/@utils/magnet-utils.js.map +1 -0
- package/dist/@utils/polygon.d.ts +18 -0
- package/dist/@utils/polygon.js +193 -0
- package/dist/@utils/polygon.js.map +1 -0
- package/dist/@utils/reports-utils.d.ts +39 -0
- package/dist/@utils/reports-utils.js +155 -0
- package/dist/@utils/reports-utils.js.map +1 -0
- package/dist/@utils/schedule-utils.d.ts +25 -0
- package/dist/@utils/schedule-utils.js +177 -0
- package/dist/@utils/schedule-utils.js.map +1 -0
- package/dist/@utils/skills-utils.d.ts +15 -0
- package/dist/@utils/skills-utils.js +197 -0
- package/dist/@utils/skills-utils.js.map +1 -0
- package/dist/@utils/smartflow-utils.d.ts +7 -0
- package/dist/@utils/smartflow-utils.js +8 -0
- package/dist/@utils/smartflow-utils.js.map +1 -0
- package/dist/@utils/so-utils.d.ts +48 -0
- package/dist/@utils/so-utils.js +605 -0
- package/dist/@utils/so-utils.js.map +1 -0
- package/dist/@utils/sys-utils.d.ts +7 -0
- package/dist/@utils/sys-utils.js +132 -0
- package/dist/@utils/sys-utils.js.map +1 -0
- package/dist/@utils/task-utils.d.ts +32 -0
- package/dist/@utils/task-utils.js +189 -0
- package/dist/@utils/task-utils.js.map +1 -0
- package/dist/dto/actions/action-delete-documents.dto.d.ts +4 -0
- package/dist/dto/actions/action-delete-documents.dto.js +26 -0
- package/dist/dto/actions/action-delete-documents.dto.js.map +1 -0
- package/dist/dto/actions/action-delete-version.dto.d.ts +4 -0
- package/dist/dto/actions/action-delete-version.dto.js +26 -0
- package/dist/dto/actions/action-delete-version.dto.js.map +1 -0
- package/dist/dto/actions/action-edit-document.dto.d.ts +5 -0
- package/dist/dto/actions/action-edit-document.dto.js +29 -0
- package/dist/dto/actions/action-edit-document.dto.js.map +1 -0
- package/dist/dto/actions/action-link-document.dto.d.ts +5 -0
- package/dist/dto/actions/action-link-document.dto.js +29 -0
- package/dist/dto/actions/action-link-document.dto.js.map +1 -0
- package/dist/dto/actions/action-sign.dto.d.ts +8 -0
- package/dist/dto/actions/action-sign.dto.js +41 -0
- package/dist/dto/actions/action-sign.dto.js.map +1 -0
- package/dist/dto/actions/action-upload.dto.d.ts +8 -0
- package/dist/dto/actions/action-upload.dto.js +42 -0
- package/dist/dto/actions/action-upload.dto.js.map +1 -0
- package/dist/dto/actions/index.d.ts +6 -0
- package/dist/dto/actions/index.js +16 -0
- package/dist/dto/actions/index.js.map +1 -0
- package/dist/dto/custom-resolver-params.dto.d.ts +9 -0
- package/dist/dto/custom-resolver-params.dto.js +7 -0
- package/dist/dto/custom-resolver-params.dto.js.map +1 -0
- package/dist/dto/custom-resolver.type.d.ts +3 -0
- package/dist/dto/custom-resolver.type.js +3 -0
- package/dist/dto/custom-resolver.type.js.map +1 -0
- package/dist/dto/download-data.dto.d.ts +7 -0
- package/dist/dto/download-data.dto.js +7 -0
- package/dist/dto/download-data.dto.js.map +1 -0
- package/dist/dto/enum/index.d.ts +1 -0
- package/dist/dto/enum/index.js +6 -0
- package/dist/dto/enum/index.js.map +1 -0
- package/dist/dto/enum/interpretor-metrics.enum.d.ts +19 -0
- package/dist/dto/enum/interpretor-metrics.enum.js +25 -0
- package/dist/dto/enum/interpretor-metrics.enum.js.map +1 -0
- package/dist/dto/index.d.ts +20 -0
- package/dist/dto/index.js +51 -0
- package/dist/dto/index.js.map +1 -0
- package/dist/dto/interfaces/smart-object-mapped.d.ts +6 -0
- package/dist/dto/interfaces/smart-object-mapped.js +3 -0
- package/dist/dto/interfaces/smart-object-mapped.js.map +1 -0
- package/dist/dto/interfaces/task-upload-options.d.ts +10 -0
- package/dist/dto/interfaces/task-upload-options.js +4 -0
- package/dist/dto/interfaces/task-upload-options.js.map +1 -0
- package/dist/dto/interpretor-form-data.dto.d.ts +9 -0
- package/dist/dto/interpretor-form-data.dto.js +10 -0
- package/dist/dto/interpretor-form-data.dto.js.map +1 -0
- package/dist/dto/interpretor-metrics.dto.d.ts +11 -0
- package/dist/dto/interpretor-metrics.dto.js +7 -0
- package/dist/dto/interpretor-metrics.dto.js.map +1 -0
- package/dist/dto/interpretor-save-operation-mode.enum.d.ts +5 -0
- package/dist/dto/interpretor-save-operation-mode.enum.js +10 -0
- package/dist/dto/interpretor-save-operation-mode.enum.js.map +1 -0
- package/dist/dto/interpretor-subject.dto.d.ts +7 -0
- package/dist/dto/interpretor-subject.dto.js +7 -0
- package/dist/dto/interpretor-subject.dto.js.map +1 -0
- package/dist/dto/interpretor-task-action-asset.dto.d.ts +5 -0
- package/dist/dto/interpretor-task-action-asset.dto.js +8 -0
- package/dist/dto/interpretor-task-action-asset.dto.js.map +1 -0
- package/dist/dto/interpretor-transfer-transition.dto.d.ts +13 -0
- package/dist/dto/interpretor-transfer-transition.dto.js +46 -0
- package/dist/dto/interpretor-transfer-transition.dto.js.map +1 -0
- package/dist/dto/interpretor-type-move.enum.d.ts +5 -0
- package/dist/dto/interpretor-type-move.enum.js +10 -0
- package/dist/dto/interpretor-type-move.enum.js.map +1 -0
- package/dist/dto/interpretor.finisher.dto.d.ts +21 -0
- package/dist/dto/interpretor.finisher.dto.js +22 -0
- package/dist/dto/interpretor.finisher.dto.js.map +1 -0
- package/dist/dto/interpretor.jump.dto.d.ts +9 -0
- package/dist/dto/interpretor.jump.dto.js +31 -0
- package/dist/dto/interpretor.jump.dto.js.map +1 -0
- package/dist/dto/interpretor.task.dto.d.ts +10 -0
- package/dist/dto/interpretor.task.dto.js +57 -0
- package/dist/dto/interpretor.task.dto.js.map +1 -0
- package/dist/dto/interpretor.validate.dto.d.ts +5 -0
- package/dist/dto/interpretor.validate.dto.js +32 -0
- package/dist/dto/interpretor.validate.dto.js.map +1 -0
- package/dist/dto/step-breadcrumb.dto.d.ts +7 -0
- package/dist/dto/step-breadcrumb.dto.js +42 -0
- package/dist/dto/step-breadcrumb.dto.js.map +1 -0
- package/dist/dto/tasks/index.d.ts +27 -0
- package/dist/dto/tasks/index.js +58 -0
- package/dist/dto/tasks/index.js.map +1 -0
- package/dist/dto/tasks/task-assign-object.dto.d.ts +8 -0
- package/dist/dto/tasks/task-assign-object.dto.js +33 -0
- package/dist/dto/tasks/task-assign-object.dto.js.map +1 -0
- package/dist/dto/tasks/task-condition-v2.dto.d.ts +6 -0
- package/dist/dto/tasks/task-condition-v2.dto.js +25 -0
- package/dist/dto/tasks/task-condition-v2.dto.js.map +1 -0
- package/dist/dto/tasks/task-condition.dto.d.ts +6 -0
- package/dist/dto/tasks/task-condition.dto.js +29 -0
- package/dist/dto/tasks/task-condition.dto.js.map +1 -0
- package/dist/dto/tasks/task-connector.dto.d.ts +7 -0
- package/dist/dto/tasks/task-connector.dto.js +29 -0
- package/dist/dto/tasks/task-connector.dto.js.map +1 -0
- package/dist/dto/tasks/task-convert.dto.d.ts +10 -0
- package/dist/dto/tasks/task-convert.dto.js +41 -0
- package/dist/dto/tasks/task-convert.dto.js.map +1 -0
- package/dist/dto/tasks/task-csv-mapped.dto.d.ts +9 -0
- package/dist/dto/tasks/task-csv-mapped.dto.js +37 -0
- package/dist/dto/tasks/task-csv-mapped.dto.js.map +1 -0
- package/dist/dto/tasks/task-data-buffer.dto.d.ts +5 -0
- package/dist/dto/tasks/task-data-buffer.dto.js +25 -0
- package/dist/dto/tasks/task-data-buffer.dto.js.map +1 -0
- package/dist/dto/tasks/task-delete-document.dto.d.ts +6 -0
- package/dist/dto/tasks/task-delete-document.dto.js +25 -0
- package/dist/dto/tasks/task-delete-document.dto.js.map +1 -0
- package/dist/dto/tasks/task-document-filecreate.dto.d.ts +11 -0
- package/dist/dto/tasks/task-document-filecreate.dto.js +45 -0
- package/dist/dto/tasks/task-document-filecreate.dto.js.map +1 -0
- package/dist/dto/tasks/task-document-filezip.dto.d.ts +10 -0
- package/dist/dto/tasks/task-document-filezip.dto.js +41 -0
- package/dist/dto/tasks/task-document-filezip.dto.js.map +1 -0
- package/dist/dto/tasks/task-email.dto.d.ts +12 -0
- package/dist/dto/tasks/task-email.dto.js +49 -0
- package/dist/dto/tasks/task-email.dto.js.map +1 -0
- package/dist/dto/tasks/task-finisher.dto.d.ts +9 -0
- package/dist/dto/tasks/task-finisher.dto.js +41 -0
- package/dist/dto/tasks/task-finisher.dto.js.map +1 -0
- package/dist/dto/tasks/task-layer-metadata.dto.d.ts +7 -0
- package/dist/dto/tasks/task-layer-metadata.dto.js +29 -0
- package/dist/dto/tasks/task-layer-metadata.dto.js.map +1 -0
- package/dist/dto/tasks/task-lock-document.dto.d.ts +7 -0
- package/dist/dto/tasks/task-lock-document.dto.js +29 -0
- package/dist/dto/tasks/task-lock-document.dto.js.map +1 -0
- package/dist/dto/tasks/task-loop.dto.d.ts +6 -0
- package/dist/dto/tasks/task-loop.dto.js +29 -0
- package/dist/dto/tasks/task-loop.dto.js.map +1 -0
- package/dist/dto/tasks/task-mapped.dto.d.ts +9 -0
- package/dist/dto/tasks/task-mapped.dto.js +37 -0
- package/dist/dto/tasks/task-mapped.dto.js.map +1 -0
- package/dist/dto/tasks/task-merge-v2.dto.d.ts +9 -0
- package/dist/dto/tasks/task-merge-v2.dto.js +37 -0
- package/dist/dto/tasks/task-merge-v2.dto.js.map +1 -0
- package/dist/dto/tasks/task-merge.dto.d.ts +8 -0
- package/dist/dto/tasks/task-merge.dto.js +33 -0
- package/dist/dto/tasks/task-merge.dto.js.map +1 -0
- package/dist/dto/tasks/task-object-create.dto.d.ts +8 -0
- package/dist/dto/tasks/task-object-create.dto.js +33 -0
- package/dist/dto/tasks/task-object-create.dto.js.map +1 -0
- package/dist/dto/tasks/task-object-delete.dto.d.ts +5 -0
- package/dist/dto/tasks/task-object-delete.dto.js +21 -0
- package/dist/dto/tasks/task-object-delete.dto.js.map +1 -0
- package/dist/dto/tasks/task-object-download.dto.d.ts +6 -0
- package/dist/dto/tasks/task-object-download.dto.js +25 -0
- package/dist/dto/tasks/task-object-download.dto.js.map +1 -0
- package/dist/dto/tasks/task-object-filter.dto.d.ts +8 -0
- package/dist/dto/tasks/task-object-filter.dto.js +33 -0
- package/dist/dto/tasks/task-object-filter.dto.js.map +1 -0
- package/dist/dto/tasks/task-query-builder.dto.d.ts +6 -0
- package/dist/dto/tasks/task-query-builder.dto.js +29 -0
- package/dist/dto/tasks/task-query-builder.dto.js.map +1 -0
- package/dist/dto/tasks/task-report.dto.d.ts +11 -0
- package/dist/dto/tasks/task-report.dto.js +45 -0
- package/dist/dto/tasks/task-report.dto.js.map +1 -0
- package/dist/dto/tasks/task-request-result.dto.d.ts +7 -0
- package/dist/dto/tasks/task-request-result.dto.js +29 -0
- package/dist/dto/tasks/task-request-result.dto.js.map +1 -0
- package/dist/dto/tasks/task-schedule-create.dto.d.ts +17 -0
- package/dist/dto/tasks/task-schedule-create.dto.js +75 -0
- package/dist/dto/tasks/task-schedule-create.dto.js.map +1 -0
- package/dist/dto/tasks/task-schedule-delete.dto.d.ts +5 -0
- package/dist/dto/tasks/task-schedule-delete.dto.js +21 -0
- package/dist/dto/tasks/task-schedule-delete.dto.js.map +1 -0
- package/dist/dto/tasks/task-service.dto.d.ts +18 -0
- package/dist/dto/tasks/task-service.dto.js +73 -0
- package/dist/dto/tasks/task-service.dto.js.map +1 -0
- package/dist/dto/tasks/task-skills.dto.d.ts +5 -0
- package/dist/dto/tasks/task-skills.dto.js +21 -0
- package/dist/dto/tasks/task-skills.dto.js.map +1 -0
- package/dist/dto/tasks/task-switch.dto.d.ts +6 -0
- package/dist/dto/tasks/task-switch.dto.js +25 -0
- package/dist/dto/tasks/task-switch.dto.js.map +1 -0
- package/dist/dto/tasks/task-x-report.dto.d.ts +14 -0
- package/dist/dto/tasks/task-x-report.dto.js +57 -0
- package/dist/dto/tasks/task-x-report.dto.js.map +1 -0
- package/dist/dto/value-format.type.d.ts +4 -0
- package/dist/dto/value-format.type.js +3 -0
- package/dist/dto/value-format.type.js.map +1 -0
- package/dist/error/http-exception.d.ts +7 -0
- package/dist/error/http-exception.js +23 -0
- package/dist/error/http-exception.js.map +1 -0
- package/dist/error/interpretor-error.d.ts +88 -0
- package/dist/error/interpretor-error.js +179 -0
- package/dist/error/interpretor-error.js.map +1 -0
- package/dist/error/tasks-error.d.ts +94 -0
- package/dist/error/tasks-error.js +193 -0
- package/dist/error/tasks-error.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/interpretor-abstract/interpretor-abstract.d.ts +13 -0
- package/dist/interpretor-abstract/interpretor-abstract.js +9 -0
- package/dist/interpretor-abstract/interpretor-abstract.js.map +1 -0
- package/dist/interpretor-data/interpretor-data-api.d.ts +38 -0
- package/dist/interpretor-data/interpretor-data-api.js +147 -0
- package/dist/interpretor-data/interpretor-data-api.js.map +1 -0
- package/dist/interpretor-data/interpretor-data.d.ts +23 -0
- package/dist/interpretor-data/interpretor-data.js +122 -0
- package/dist/interpretor-data/interpretor-data.js.map +1 -0
- package/dist/interpretor-metrics/interpretor-metrics.d.ts +13 -0
- package/dist/interpretor-metrics/interpretor-metrics.js +151 -0
- package/dist/interpretor-metrics/interpretor-metrics.js.map +1 -0
- package/dist/interpretor-reader/interpretor-breadcrumb/interpretor-breadcrumb.d.ts +15 -0
- package/dist/interpretor-reader/interpretor-breadcrumb/interpretor-breadcrumb.js +178 -0
- package/dist/interpretor-reader/interpretor-breadcrumb/interpretor-breadcrumb.js.map +1 -0
- package/dist/interpretor-reader/interpretor-operations/interpretor-action.d.ts +17 -0
- package/dist/interpretor-reader/interpretor-operations/interpretor-action.js +158 -0
- package/dist/interpretor-reader/interpretor-operations/interpretor-action.js.map +1 -0
- package/dist/interpretor-reader/interpretor-operations/interpretor-operations.d.ts +54 -0
- package/dist/interpretor-reader/interpretor-operations/interpretor-operations.js +516 -0
- package/dist/interpretor-reader/interpretor-operations/interpretor-operations.js.map +1 -0
- package/dist/interpretor-reader/interpretor-profiles/interpretor-profiles.d.ts +9 -0
- package/dist/interpretor-reader/interpretor-profiles/interpretor-profiles.js +82 -0
- package/dist/interpretor-reader/interpretor-profiles/interpretor-profiles.js.map +1 -0
- package/dist/interpretor-reader/interpretor-reader.d.ts +47 -0
- package/dist/interpretor-reader/interpretor-reader.js +299 -0
- package/dist/interpretor-reader/interpretor-reader.js.map +1 -0
- package/dist/interpretor-reader/interpretor-so/interpretor-so-utils.d.ts +12 -0
- package/dist/interpretor-reader/interpretor-so/interpretor-so-utils.js +139 -0
- package/dist/interpretor-reader/interpretor-so/interpretor-so-utils.js.map +1 -0
- package/dist/interpretor-reader/interpretor-so/interpretor-so.d.ts +23 -0
- package/dist/interpretor-reader/interpretor-so/interpretor-so.js +244 -0
- package/dist/interpretor-reader/interpretor-so/interpretor-so.js.map +1 -0
- package/dist/interpretor-reader/interpretor-task/Interpretor-formula-parser.d.ts +13 -0
- package/dist/interpretor-reader/interpretor-task/Interpretor-formula-parser.js +111 -0
- package/dist/interpretor-reader/interpretor-task/Interpretor-formula-parser.js.map +1 -0
- package/dist/interpretor-reader/interpretor-task/interpretor-array-function.d.ts +21 -0
- package/dist/interpretor-reader/interpretor-task/interpretor-array-function.js +142 -0
- package/dist/interpretor-reader/interpretor-task/interpretor-array-function.js.map +1 -0
- package/dist/interpretor-reader/interpretor-task/interpretor-object-function.d.ts +21 -0
- package/dist/interpretor-reader/interpretor-task/interpretor-object-function.js +101 -0
- package/dist/interpretor-reader/interpretor-task/interpretor-object-function.js.map +1 -0
- package/dist/interpretor-reader/interpretor-task/interpretor-service.d.ts +19 -0
- package/dist/interpretor-reader/interpretor-task/interpretor-service.js +160 -0
- package/dist/interpretor-reader/interpretor-task/interpretor-service.js.map +1 -0
- package/dist/interpretor-reader/interpretor-task/interpretor-task.d.ts +49 -0
- package/dist/interpretor-reader/interpretor-task/interpretor-task.js +334 -0
- package/dist/interpretor-reader/interpretor-task/interpretor-task.js.map +1 -0
- package/dist/interpretor-resolver/interpretor-resolver.d.ts +39 -0
- package/dist/interpretor-resolver/interpretor-resolver.js +437 -0
- package/dist/interpretor-resolver/interpretor-resolver.js.map +1 -0
- package/dist/interpretor-save/interpretor-save.d.ts +5 -0
- package/dist/interpretor-save/interpretor-save.js +7 -0
- package/dist/interpretor-save/interpretor-save.js.map +1 -0
- package/dist/interpretor-subject/interpretor-subject.d.ts +10 -0
- package/dist/interpretor-subject/interpretor-subject.js +25 -0
- package/dist/interpretor-subject/interpretor-subject.js.map +1 -0
- package/dist/interpretor-tasks/index.d.ts +33 -0
- package/dist/interpretor-tasks/index.js +70 -0
- package/dist/interpretor-tasks/index.js.map +1 -0
- package/dist/interpretor-tasks/task-assign-object.d.ts +14 -0
- package/dist/interpretor-tasks/task-assign-object.js +103 -0
- package/dist/interpretor-tasks/task-assign-object.js.map +1 -0
- package/dist/interpretor-tasks/task-base.d.ts +24 -0
- package/dist/interpretor-tasks/task-base.js +18 -0
- package/dist/interpretor-tasks/task-base.js.map +1 -0
- package/dist/interpretor-tasks/task-condition-v2.d.ts +7 -0
- package/dist/interpretor-tasks/task-condition-v2.js +89 -0
- package/dist/interpretor-tasks/task-condition-v2.js.map +1 -0
- package/dist/interpretor-tasks/task-condition.d.ts +17 -0
- package/dist/interpretor-tasks/task-condition.js +118 -0
- package/dist/interpretor-tasks/task-condition.js.map +1 -0
- package/dist/interpretor-tasks/task-connector.d.ts +11 -0
- package/dist/interpretor-tasks/task-connector.js +109 -0
- package/dist/interpretor-tasks/task-connector.js.map +1 -0
- package/dist/interpretor-tasks/task-convert.d.ts +29 -0
- package/dist/interpretor-tasks/task-convert.js +167 -0
- package/dist/interpretor-tasks/task-convert.js.map +1 -0
- package/dist/interpretor-tasks/task-csv-mapped.d.ts +9 -0
- package/dist/interpretor-tasks/task-csv-mapped.js +52 -0
- package/dist/interpretor-tasks/task-csv-mapped.js.map +1 -0
- package/dist/interpretor-tasks/task-data-buffer.d.ts +9 -0
- package/dist/interpretor-tasks/task-data-buffer.js +92 -0
- package/dist/interpretor-tasks/task-data-buffer.js.map +1 -0
- package/dist/interpretor-tasks/task-delete-document.d.ts +6 -0
- package/dist/interpretor-tasks/task-delete-document.js +60 -0
- package/dist/interpretor-tasks/task-delete-document.js.map +1 -0
- package/dist/interpretor-tasks/task-delete-schedule.d.ts +6 -0
- package/dist/interpretor-tasks/task-delete-schedule.js +58 -0
- package/dist/interpretor-tasks/task-delete-schedule.js.map +1 -0
- package/dist/interpretor-tasks/task-document-filecreate.d.ts +6 -0
- package/dist/interpretor-tasks/task-document-filecreate.js +58 -0
- package/dist/interpretor-tasks/task-document-filecreate.js.map +1 -0
- package/dist/interpretor-tasks/task-document-filezip.d.ts +7 -0
- package/dist/interpretor-tasks/task-document-filezip.js +61 -0
- package/dist/interpretor-tasks/task-document-filezip.js.map +1 -0
- package/dist/interpretor-tasks/task-email.d.ts +6 -0
- package/dist/interpretor-tasks/task-email.js +64 -0
- package/dist/interpretor-tasks/task-email.js.map +1 -0
- package/dist/interpretor-tasks/task-finisher.d.ts +6 -0
- package/dist/interpretor-tasks/task-finisher.js +27 -0
- package/dist/interpretor-tasks/task-finisher.js.map +1 -0
- package/dist/interpretor-tasks/task-layer-metadata.d.ts +15 -0
- package/dist/interpretor-tasks/task-layer-metadata.js +125 -0
- package/dist/interpretor-tasks/task-layer-metadata.js.map +1 -0
- package/dist/interpretor-tasks/task-lock-document.d.ts +6 -0
- package/dist/interpretor-tasks/task-lock-document.js +76 -0
- package/dist/interpretor-tasks/task-lock-document.js.map +1 -0
- package/dist/interpretor-tasks/task-loop.d.ts +8 -0
- package/dist/interpretor-tasks/task-loop.js +89 -0
- package/dist/interpretor-tasks/task-loop.js.map +1 -0
- package/dist/interpretor-tasks/task-mapped.d.ts +16 -0
- package/dist/interpretor-tasks/task-mapped.js +149 -0
- package/dist/interpretor-tasks/task-mapped.js.map +1 -0
- package/dist/interpretor-tasks/task-merge-v2.d.ts +26 -0
- package/dist/interpretor-tasks/task-merge-v2.js +167 -0
- package/dist/interpretor-tasks/task-merge-v2.js.map +1 -0
- package/dist/interpretor-tasks/task-merge.d.ts +12 -0
- package/dist/interpretor-tasks/task-merge.js +205 -0
- package/dist/interpretor-tasks/task-merge.js.map +1 -0
- package/dist/interpretor-tasks/task-object-create.d.ts +13 -0
- package/dist/interpretor-tasks/task-object-create.js +70 -0
- package/dist/interpretor-tasks/task-object-create.js.map +1 -0
- package/dist/interpretor-tasks/task-object-delete.d.ts +6 -0
- package/dist/interpretor-tasks/task-object-delete.js +58 -0
- package/dist/interpretor-tasks/task-object-delete.js.map +1 -0
- package/dist/interpretor-tasks/task-object-download.d.ts +10 -0
- package/dist/interpretor-tasks/task-object-download.js +61 -0
- package/dist/interpretor-tasks/task-object-download.js.map +1 -0
- package/dist/interpretor-tasks/task-object-filter.d.ts +10 -0
- package/dist/interpretor-tasks/task-object-filter.js +83 -0
- package/dist/interpretor-tasks/task-object-filter.js.map +1 -0
- package/dist/interpretor-tasks/task-query-builder.d.ts +8 -0
- package/dist/interpretor-tasks/task-query-builder.js +61 -0
- package/dist/interpretor-tasks/task-query-builder.js.map +1 -0
- package/dist/interpretor-tasks/task-report.d.ts +22 -0
- package/dist/interpretor-tasks/task-report.js +136 -0
- package/dist/interpretor-tasks/task-report.js.map +1 -0
- package/dist/interpretor-tasks/task-request-result.d.ts +19 -0
- package/dist/interpretor-tasks/task-request-result.js +134 -0
- package/dist/interpretor-tasks/task-request-result.js.map +1 -0
- package/dist/interpretor-tasks/task-schedule-create-auto.d.ts +17 -0
- package/dist/interpretor-tasks/task-schedule-create-auto.js +99 -0
- package/dist/interpretor-tasks/task-schedule-create-auto.js.map +1 -0
- package/dist/interpretor-tasks/task-service.d.ts +51 -0
- package/dist/interpretor-tasks/task-service.js +308 -0
- package/dist/interpretor-tasks/task-service.js.map +1 -0
- package/dist/interpretor-tasks/task-skills.d.ts +14 -0
- package/dist/interpretor-tasks/task-skills.js +134 -0
- package/dist/interpretor-tasks/task-skills.js.map +1 -0
- package/dist/interpretor-tasks/task-switch.d.ts +7 -0
- package/dist/interpretor-tasks/task-switch.js +28 -0
- package/dist/interpretor-tasks/task-switch.js.map +1 -0
- package/dist/interpretor-tasks/task-undo.d.ts +6 -0
- package/dist/interpretor-tasks/task-undo.js +32 -0
- package/dist/interpretor-tasks/task-undo.js.map +1 -0
- package/dist/interpretor-tasks/task-xreport.d.ts +25 -0
- package/dist/interpretor-tasks/task-xreport.js +167 -0
- package/dist/interpretor-tasks/task-xreport.js.map +1 -0
- package/dist/interpretor-utils/interpretor-utils.d.ts +59 -0
- package/dist/interpretor-utils/interpretor-utils.js +378 -0
- package/dist/interpretor-utils/interpretor-utils.js.map +1 -0
- package/dist/interpretor.d.ts +47 -0
- package/dist/interpretor.js +268 -0
- package/dist/interpretor.js.map +1 -0
- package/dist/public_api.d.ts +25 -0
- package/dist/public_api.js +62 -0
- package/dist/public_api.js.map +1 -0
- package/package.json +33 -0
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.InterpretorUtils = void 0;
|
|
27
|
+
const interpretor_error_1 = require("../error/interpretor-error");
|
|
28
|
+
const _ = __importStar(require("lodash"));
|
|
29
|
+
const interpretor_operations_1 = require("../interpretor-reader/interpretor-operations/interpretor-operations");
|
|
30
|
+
const BackgroundTasks = __importStar(require("../interpretor-tasks"));
|
|
31
|
+
const TASK_LAUNCHER = 'TaskLauncher';
|
|
32
|
+
class InterpretorUtils {
|
|
33
|
+
constructor(interpretorService, reportUtils, scheduleUtils, skillsUtils, soUtils, sysUtils, smartFlowUtils, taskUtils, interpretorSubject) {
|
|
34
|
+
this.interpretorService = interpretorService;
|
|
35
|
+
this.reportUtils = reportUtils;
|
|
36
|
+
this.scheduleUtils = scheduleUtils;
|
|
37
|
+
this.skillsUtils = skillsUtils;
|
|
38
|
+
this.soUtils = soUtils;
|
|
39
|
+
this.sysUtils = sysUtils;
|
|
40
|
+
this.smartFlowUtils = smartFlowUtils;
|
|
41
|
+
this.taskUtils = taskUtils;
|
|
42
|
+
this.interpretorSubject = interpretorSubject;
|
|
43
|
+
}
|
|
44
|
+
stackTasksReduce(instance) {
|
|
45
|
+
const reduce = (stacks) => {
|
|
46
|
+
const taskModels = [];
|
|
47
|
+
let data = null;
|
|
48
|
+
let countPrevious = -1;
|
|
49
|
+
for (let indexUntil = stacks.length - 1; indexUntil >= 0; indexUntil--) {
|
|
50
|
+
const taskModel = stacks[indexUntil].taskModel;
|
|
51
|
+
const count = stacks.filter((s) => s.taskModel === taskModel).length;
|
|
52
|
+
// detect loop
|
|
53
|
+
if (count > 1) {
|
|
54
|
+
if (count >= countPrevious && taskModels.indexOf(taskModel) === -1) {
|
|
55
|
+
taskModels.push(taskModel);
|
|
56
|
+
countPrevious = count;
|
|
57
|
+
data = {
|
|
58
|
+
indexLoop: stacks.findIndex((s) => s.taskModel === taskModel),
|
|
59
|
+
indexUntil
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
if (data) {
|
|
68
|
+
const res = [];
|
|
69
|
+
res.push(...(stacks.splice(data.indexUntil, stacks.length - 1)));
|
|
70
|
+
res.unshift(...(stacks.splice(0, data.indexLoop)));
|
|
71
|
+
return reduce(res); // reduce all loop on the stack (recursive)
|
|
72
|
+
}
|
|
73
|
+
return stacks;
|
|
74
|
+
};
|
|
75
|
+
return reduce(_.clone(instance.stackTasks));
|
|
76
|
+
}
|
|
77
|
+
isFinished(instance) {
|
|
78
|
+
return instance.state === 'finished' || instance.state === 'canceled';
|
|
79
|
+
}
|
|
80
|
+
isReadonly(instance) {
|
|
81
|
+
return instance?.settings.savingMode === 'DEBUG';
|
|
82
|
+
}
|
|
83
|
+
isNewTask(instance) {
|
|
84
|
+
if (instance.stackTasks.length === 0) {
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
return instance.stackTasks[instance.stackTasks.length - 1].active;
|
|
88
|
+
}
|
|
89
|
+
getAllTasks(instance) {
|
|
90
|
+
if (!instance.context?.custom) {
|
|
91
|
+
return _.flatMap(instance.workflowModel.steps, 'tasks');
|
|
92
|
+
}
|
|
93
|
+
if (!instance.context.custom.allTasks) {
|
|
94
|
+
instance.context.custom.allTasks = _.flatMap(instance.workflowModel.steps, 'tasks');
|
|
95
|
+
}
|
|
96
|
+
return instance.context.custom.allTasks;
|
|
97
|
+
}
|
|
98
|
+
findFirstTaskModel(instance) {
|
|
99
|
+
const tasks = this.getAllTasks(instance);
|
|
100
|
+
const transitionsTask = [];
|
|
101
|
+
let findTask = null;
|
|
102
|
+
for (const task of tasks) {
|
|
103
|
+
for (const transition of task.properties.transitions) {
|
|
104
|
+
transitionsTask.push(transition.task);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
// with launch task
|
|
108
|
+
const tasksLauncher = tasks.filter((t) => t.type === TASK_LAUNCHER);
|
|
109
|
+
if (tasksLauncher.length > 0) {
|
|
110
|
+
if (tasksLauncher.length > 1) {
|
|
111
|
+
throw new interpretor_error_1.WorkflowErrorModelNotValid('ERR-122', `{{SEVERAL-ENTRY-POINTS}}`);
|
|
112
|
+
}
|
|
113
|
+
const launcher = tasksLauncher[0];
|
|
114
|
+
if (transitionsTask.indexOf(launcher.uuid) !== -1) {
|
|
115
|
+
throw new interpretor_error_1.WorkflowErrorModelNotValid('ERR-123', `{{SOME-TASK-TRANSITS-ON-LAUNCH-TASK}}`);
|
|
116
|
+
}
|
|
117
|
+
findTask = tasks.find((t) => t.uuid === launcher.properties.transitions[0].task);
|
|
118
|
+
if (!findTask) {
|
|
119
|
+
throw new interpretor_error_1.WorkflowErrorModelNotValid('ERR-124', `{{LAUNCH-TAST-DOESNT-HAVE-TRANSITION}}`);
|
|
120
|
+
}
|
|
121
|
+
return { task: findTask, state: 'running' };
|
|
122
|
+
}
|
|
123
|
+
// without launch task
|
|
124
|
+
for (const task of tasks) {
|
|
125
|
+
if (transitionsTask.indexOf(task.uuid) === -1) {
|
|
126
|
+
if (findTask) {
|
|
127
|
+
throw new interpretor_error_1.WorkflowErrorModelNotValid('ERR-125', `{{SEVERAL-ENTRY-POINTS}}`);
|
|
128
|
+
}
|
|
129
|
+
findTask = task;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
if (!findTask) {
|
|
133
|
+
throw new interpretor_error_1.WorkflowErrorModelNotValid('ERR-126', `{{DONT-HAVE-ENTRY-POINTS}}`);
|
|
134
|
+
}
|
|
135
|
+
return { task: findTask, state: 'running' };
|
|
136
|
+
}
|
|
137
|
+
findNextTaskModel(instance, transitionKey, task) {
|
|
138
|
+
const entryTask = task ? task : this.getActiveTaskModel(instance);
|
|
139
|
+
const transition = entryTask.properties.transitions.find((t) => t.key === transitionKey);
|
|
140
|
+
if (!transition) {
|
|
141
|
+
throw new interpretor_error_1.WorkflowErrorTransitionNotFind('ERR-120', `{{NOT-FOUND}} : ${transitionKey}`);
|
|
142
|
+
}
|
|
143
|
+
const tasks = this.getAllTasks(instance);
|
|
144
|
+
const nextTask = tasks.find((t) => t.uuid === transition.task);
|
|
145
|
+
// finished
|
|
146
|
+
if (!transition.task) {
|
|
147
|
+
return { state: 'finished' };
|
|
148
|
+
}
|
|
149
|
+
if (!nextTask) {
|
|
150
|
+
throw new interpretor_error_1.WorkflowErrorTaskNotFind('ERR-121', `: {{TRANSITION}} ${transition.task} {{NOT-FOUND}}`);
|
|
151
|
+
}
|
|
152
|
+
return { task: nextTask, state: 'running' };
|
|
153
|
+
}
|
|
154
|
+
findTask(instance, uuid) {
|
|
155
|
+
return instance.stackTasks.find((s) => s.uuid === uuid);
|
|
156
|
+
}
|
|
157
|
+
getActiveTask(instance) {
|
|
158
|
+
if (instance.stackTasks.length > 0 && instance.stackTasks[instance.stackTasks.length - 1].active) {
|
|
159
|
+
return instance.stackTasks[instance.stackTasks.length - 1];
|
|
160
|
+
}
|
|
161
|
+
const activeTask = instance.stackTasks.find((s) => s.active);
|
|
162
|
+
if (!activeTask) {
|
|
163
|
+
throw new interpretor_error_1.WorkflowErrorActiveTaskNotFind('ERR-118', `{{NOT-FOUND}}`);
|
|
164
|
+
}
|
|
165
|
+
return activeTask;
|
|
166
|
+
}
|
|
167
|
+
getTaskModel(instance, task) {
|
|
168
|
+
const tasks = this.getAllTasks(instance);
|
|
169
|
+
const activeTaskModel = tasks.find((t) => t.uuid === task.taskModel);
|
|
170
|
+
if (!activeTaskModel) {
|
|
171
|
+
throw new interpretor_error_1.WorkflowErrorActiveTaskNotFind('ERR-119', `model {{NOT-FOUND}} : ${task.taskModel}`);
|
|
172
|
+
}
|
|
173
|
+
return activeTaskModel;
|
|
174
|
+
}
|
|
175
|
+
getActiveTaskModel(instance) {
|
|
176
|
+
const task = this.getActiveTask(instance);
|
|
177
|
+
return this.getTaskModel(instance, task);
|
|
178
|
+
}
|
|
179
|
+
getProfilTask(instance, taskModel) {
|
|
180
|
+
const wfModel = instance.workflowModel;
|
|
181
|
+
if (!taskModel.general.profil) {
|
|
182
|
+
return null;
|
|
183
|
+
}
|
|
184
|
+
const findProfil = wfModel.profiles.find((p) => p.uuid === taskModel.general.profil);
|
|
185
|
+
if (!findProfil) {
|
|
186
|
+
throw new interpretor_error_1.WorkflowErrorModelNotValid('ERR-127', `{{PROFILE-OF}} {{TASK}} ${taskModel.uuid} {{NOT-FOUND}}`);
|
|
187
|
+
}
|
|
188
|
+
return findProfil;
|
|
189
|
+
}
|
|
190
|
+
getTransitionData(instance, transitionKey, dataKey) {
|
|
191
|
+
const transition = this.getActiveTaskModel(instance).properties.transitions.find((tr) => tr.key === transitionKey);
|
|
192
|
+
if (!transition) {
|
|
193
|
+
return null;
|
|
194
|
+
}
|
|
195
|
+
return transition.data.find((d) => d.key === d.key);
|
|
196
|
+
}
|
|
197
|
+
getProfilCurrentTask(instance) {
|
|
198
|
+
const taskModel = this.getActiveTaskModel(instance);
|
|
199
|
+
return this.getProfilTask(instance, taskModel);
|
|
200
|
+
}
|
|
201
|
+
getActiveStep(instance) {
|
|
202
|
+
return instance.workflowModel.steps.find((s) => s.tasks.indexOf(this.getActiveTaskModel(instance)) !== -1);
|
|
203
|
+
}
|
|
204
|
+
getStep(instance, task) {
|
|
205
|
+
return instance.workflowModel.steps.find((s) => s.tasks.indexOf(task) !== -1);
|
|
206
|
+
}
|
|
207
|
+
pushStackData(instance, key, value) {
|
|
208
|
+
if (!this.isReadonly(instance) || !instance.stackData) {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
const find = instance.stackData.find((d) => d.key === key);
|
|
212
|
+
if (find) {
|
|
213
|
+
find.value = value;
|
|
214
|
+
}
|
|
215
|
+
else {
|
|
216
|
+
instance.stackData.push({
|
|
217
|
+
key,
|
|
218
|
+
value
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
if (this.interpretorSubject && this.isTaskUI(this.getActiveTaskModel(instance))) {
|
|
222
|
+
this.interpretorSubject.debug(instance);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
reverseInstance(instance, afterActive = false) {
|
|
226
|
+
const opService = new interpretor_operations_1.InterpretorOperations(instance.data, instance.smartobjects, instance.documents, instance.context?.custom?.indexes);
|
|
227
|
+
let indexActive = instance.stackTasks.findIndex((t) => t.active);
|
|
228
|
+
if (afterActive) {
|
|
229
|
+
indexActive++;
|
|
230
|
+
}
|
|
231
|
+
for (let i = instance.stackTasks.length - 1; i >= indexActive; i--) {
|
|
232
|
+
const task = instance.stackTasks[i];
|
|
233
|
+
for (const op of task.reverse) {
|
|
234
|
+
opService.executeOperation(op);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
opService.free();
|
|
238
|
+
if (instance.stackTasks.length > indexActive) {
|
|
239
|
+
instance.stackTasks[indexActive].operations = [];
|
|
240
|
+
instance.stackTasks[indexActive].reverse = [];
|
|
241
|
+
}
|
|
242
|
+
instance.stackTasks.splice(indexActive + 1, instance.stackTasks.length - 1);
|
|
243
|
+
}
|
|
244
|
+
getPrevious(instance) {
|
|
245
|
+
const stackTasksReduce = this.stackTasksReduce(instance);
|
|
246
|
+
let task = null;
|
|
247
|
+
if (stackTasksReduce.length > 1) {
|
|
248
|
+
// find the previous task
|
|
249
|
+
let iPrevious = stackTasksReduce.findIndex((s) => s.active) - 1;
|
|
250
|
+
while (!task && iPrevious >= 0) {
|
|
251
|
+
if (this.canJump(instance, stackTasksReduce[iPrevious])) {
|
|
252
|
+
task = stackTasksReduce[iPrevious];
|
|
253
|
+
}
|
|
254
|
+
iPrevious--;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
return task;
|
|
258
|
+
}
|
|
259
|
+
getNext(instance) {
|
|
260
|
+
const stackTasksReduce = this.stackTasksReduce(instance);
|
|
261
|
+
let task = null;
|
|
262
|
+
if (stackTasksReduce.length > 1) {
|
|
263
|
+
// find the previous task
|
|
264
|
+
let iNext = stackTasksReduce.findIndex((s) => s.active) + 1;
|
|
265
|
+
while (!task && iNext < stackTasksReduce.length) {
|
|
266
|
+
if (this.canJump(instance, stackTasksReduce[iNext])) {
|
|
267
|
+
task = stackTasksReduce[iNext];
|
|
268
|
+
}
|
|
269
|
+
iNext++;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return task;
|
|
273
|
+
}
|
|
274
|
+
canPrevious(instance) {
|
|
275
|
+
return this.getPrevious(instance) !== null;
|
|
276
|
+
}
|
|
277
|
+
canNext(instance) {
|
|
278
|
+
return this.getNext(instance) !== null;
|
|
279
|
+
}
|
|
280
|
+
getBackgroundTaskClassType(type) {
|
|
281
|
+
return BackgroundTasks[`${type}`];
|
|
282
|
+
}
|
|
283
|
+
createBackgroundTaskInstance(type) {
|
|
284
|
+
const clsType = this.getBackgroundTaskClassType(type);
|
|
285
|
+
if (!clsType) {
|
|
286
|
+
return null;
|
|
287
|
+
}
|
|
288
|
+
return new clsType(this, this.interpretorService, this.reportUtils, this.scheduleUtils, this.skillsUtils, this.soUtils, this.sysUtils, this.smartFlowUtils, this.taskUtils);
|
|
289
|
+
}
|
|
290
|
+
isLastTask(instance) {
|
|
291
|
+
const task = this.getActiveTaskModel(instance);
|
|
292
|
+
if (task.properties.transitions.length === 1) {
|
|
293
|
+
const nextTask = this.findNextTaskModel(instance, task.properties.transitions[0].key);
|
|
294
|
+
return (nextTask.state === 'finished' || nextTask.state === 'canceled') || (instance.settings.savingMode !== 'DEBUG' &&
|
|
295
|
+
nextTask.task.general.profil !== task.general.profil);
|
|
296
|
+
}
|
|
297
|
+
return false;
|
|
298
|
+
}
|
|
299
|
+
canJump(instance, task) {
|
|
300
|
+
const stackTasksReduce = this.stackTasksReduce(instance);
|
|
301
|
+
const activeTask = this.getActiveTask(instance);
|
|
302
|
+
const activeTaskModel = this.getActiveTaskModel(instance);
|
|
303
|
+
const iJump = stackTasksReduce.indexOf(task);
|
|
304
|
+
// ASAP, no jump
|
|
305
|
+
if (instance.settings.savingMode === 'ASAP') {
|
|
306
|
+
return false;
|
|
307
|
+
}
|
|
308
|
+
// if active task is the last of the stack (decrement)
|
|
309
|
+
let iActive = stackTasksReduce.indexOf(activeTask);
|
|
310
|
+
if (iActive === stackTasksReduce.length - 1) {
|
|
311
|
+
iActive--;
|
|
312
|
+
}
|
|
313
|
+
for (let i = Math.min(iActive, iJump); i <= Math.max(iActive, iJump); i++) {
|
|
314
|
+
const checkTask = stackTasksReduce[i];
|
|
315
|
+
const checkTaskModel = this.getTaskModel(instance, checkTask);
|
|
316
|
+
// change profil
|
|
317
|
+
if (instance.settings.savingMode !== 'DEBUG' &&
|
|
318
|
+
checkTaskModel.general.profil !== activeTaskModel.general.profil) {
|
|
319
|
+
return false;
|
|
320
|
+
}
|
|
321
|
+
// service end
|
|
322
|
+
if (iActive >= iJump) {
|
|
323
|
+
if (checkTaskModel.properties.services.find((s) => s.execute === 'end')) {
|
|
324
|
+
return false;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
// task no UI
|
|
329
|
+
if (!this.isTaskUI(this.getTaskModel(instance, task))) {
|
|
330
|
+
return false;
|
|
331
|
+
}
|
|
332
|
+
return true;
|
|
333
|
+
}
|
|
334
|
+
isTaskUI(task) {
|
|
335
|
+
if (this.getBackgroundTaskClassType(task.type)) {
|
|
336
|
+
return false;
|
|
337
|
+
}
|
|
338
|
+
return true;
|
|
339
|
+
}
|
|
340
|
+
mustBeReversed(instance, validate) {
|
|
341
|
+
// no jump
|
|
342
|
+
if (this.isNewTask(instance)) {
|
|
343
|
+
return false;
|
|
344
|
+
}
|
|
345
|
+
const stackTasksReduce = this.stackTasksReduce(instance);
|
|
346
|
+
// change transition
|
|
347
|
+
const indexActive = stackTasksReduce.indexOf(this.getActiveTask(instance));
|
|
348
|
+
if (this.findNextTaskModel(instance, validate.transitionKey).task !==
|
|
349
|
+
this.getTaskModel(instance, stackTasksReduce[indexActive + 1])) {
|
|
350
|
+
return true;
|
|
351
|
+
}
|
|
352
|
+
// compare operations (read|write) : reverse and simulate create operations
|
|
353
|
+
const instanceCopy = _.cloneDeep(instance);
|
|
354
|
+
this.reverseInstance(instanceCopy);
|
|
355
|
+
const opService = new interpretor_operations_1.InterpretorOperations(instanceCopy.data, instanceCopy.smartobjects, instanceCopy.documents, instance.context?.custom?.indexes);
|
|
356
|
+
const transition = this.getActiveTaskModel(instance).properties.transitions.find((t) => t.key === validate.transitionKey);
|
|
357
|
+
for (const transfer of validate.transfers) {
|
|
358
|
+
opService.createOperation(transfer, transition);
|
|
359
|
+
}
|
|
360
|
+
if (_.isEqual(opService.operations, this.getActiveTask(instance).operations)) {
|
|
361
|
+
opService.free();
|
|
362
|
+
return false;
|
|
363
|
+
}
|
|
364
|
+
opService.free();
|
|
365
|
+
return true;
|
|
366
|
+
}
|
|
367
|
+
mustBeReversedOperations(instance) {
|
|
368
|
+
const indexActive = _.findIndex(instance.stackTasks, (t) => t.active);
|
|
369
|
+
for (let i = indexActive + 1; i < instance.stackTasks.length; i++) {
|
|
370
|
+
if (instance.stackTasks[i].operations.length > 0) {
|
|
371
|
+
return true;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
return false;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
exports.InterpretorUtils = InterpretorUtils;
|
|
378
|
+
//# sourceMappingURL=interpretor-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interpretor-utils.js","sourceRoot":"","sources":["../../src/interpretor-utils/interpretor-utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kEAKoC;AAEpC,0CAA4B;AAC5B,gHAA4G;AAC5G,sEAAwD;AAcxD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,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC9C,OAAO,IAAI,CAAC;aACf;SACJ;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ;AA/ZD,4CA+ZC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { WorkflowInstanceDto, WorkflowModelDto, PairDto, WorkflowDataDto, WorkflowSettingsDto, WorkflowInstanceContextDto, SmartObjectDto } from '@algotech-ce/core';
|
|
2
|
+
import { InterpretorTaskDto, InterpretorValidateDto, InterpretorJumpDto, InterpretorFinisherDto } from './dto';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { InterpretorReader } from './interpretor-reader/interpretor-reader';
|
|
5
|
+
import { InterpretorUtils } from './interpretor-utils/interpretor-utils';
|
|
6
|
+
import { InterpretorData } from './interpretor-data/interpretor-data';
|
|
7
|
+
import { InterpretorSave } from './interpretor-save/interpretor-save';
|
|
8
|
+
import { InterpretorSo } from './interpretor-reader/interpretor-so/interpretor-so';
|
|
9
|
+
import { InterpretorMetrics } from './interpretor-metrics/interpretor-metrics';
|
|
10
|
+
export declare class Interpretor {
|
|
11
|
+
protected workflowSo: InterpretorSo;
|
|
12
|
+
protected workflowReader: InterpretorReader;
|
|
13
|
+
protected workflowUtils: InterpretorUtils;
|
|
14
|
+
protected workflowData: InterpretorData;
|
|
15
|
+
protected workflowSave: InterpretorSave;
|
|
16
|
+
protected workflowMetrics: InterpretorMetrics;
|
|
17
|
+
constructor(workflowSo: InterpretorSo, workflowReader: InterpretorReader, workflowUtils: InterpretorUtils, workflowData: InterpretorData, workflowSave: InterpretorSave, workflowMetrics: InterpretorMetrics);
|
|
18
|
+
startWorkflow(modelKey: string, settings: WorkflowSettingsDto, context: WorkflowInstanceContextDto, inputs?: PairDto[]): Observable<InterpretorTaskDto>;
|
|
19
|
+
runInstance(instanceUUID: string, context: WorkflowInstanceContextDto): Observable<InterpretorTaskDto>;
|
|
20
|
+
taskValidate(instance: WorkflowInstanceDto, validate: InterpretorValidateDto): Observable<InterpretorTaskDto | InterpretorFinisherDto>;
|
|
21
|
+
taskJump(instance: WorkflowInstanceDto, jump: InterpretorJumpDto): Observable<InterpretorTaskDto>;
|
|
22
|
+
/** public for test */
|
|
23
|
+
_decoreResponse(action$: Observable<any>, instance: WorkflowInstanceDto): Observable<InterpretorTaskDto>;
|
|
24
|
+
/** public for test */
|
|
25
|
+
_initializeData(inputs: PairDto[], model: WorkflowModelDto, context: WorkflowInstanceContextDto): Observable<{
|
|
26
|
+
smartobjects: SmartObjectDto[];
|
|
27
|
+
data: WorkflowDataDto[];
|
|
28
|
+
}>;
|
|
29
|
+
/** public for test */
|
|
30
|
+
_newInstance(model: WorkflowModelDto, settings: WorkflowSettingsDto, inputs: PairDto[], context: WorkflowInstanceContextDto): Observable<WorkflowInstanceDto>;
|
|
31
|
+
/** public for test */
|
|
32
|
+
_execute(instance: WorkflowInstanceDto): Observable<InterpretorTaskDto | any>;
|
|
33
|
+
/** public for test */
|
|
34
|
+
_jump(instance: WorkflowInstanceDto, jump: InterpretorJumpDto): Observable<InterpretorTaskDto>;
|
|
35
|
+
/** public for test */
|
|
36
|
+
_validate(instance: WorkflowInstanceDto, validate: InterpretorValidateDto): Observable<InterpretorTaskDto | InterpretorFinisherDto>;
|
|
37
|
+
/** public for test */
|
|
38
|
+
_finish(instance: WorkflowInstanceDto, finish: InterpretorFinisherDto): Observable<InterpretorFinisherDto>;
|
|
39
|
+
/** public for test */
|
|
40
|
+
_loadInstance(instance: WorkflowInstanceDto): Observable<InterpretorTaskDto>;
|
|
41
|
+
/** public for test */
|
|
42
|
+
_checkScheduled(rangeDate: string[]): boolean;
|
|
43
|
+
/** public for test */
|
|
44
|
+
_isJsonStringify(data: any): boolean;
|
|
45
|
+
/** public for test */
|
|
46
|
+
_formatData(inputs: any): any;
|
|
47
|
+
}
|