@solidxai/core 0.1.12 → 0.1.13-beta.2
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/controllers/view-metadata.controller.d.ts +1 -1
- package/dist/controllers/workflow-definition.controller.d.ts +38 -0
- package/dist/controllers/workflow-definition.controller.d.ts.map +1 -0
- package/dist/controllers/workflow-definition.controller.js +272 -0
- package/dist/controllers/workflow-definition.controller.js.map +1 -0
- package/dist/controllers/workflow-execution-artifact.controller.d.ts +24 -0
- package/dist/controllers/workflow-execution-artifact.controller.d.ts.map +1 -0
- package/dist/controllers/workflow-execution-artifact.controller.js +179 -0
- package/dist/controllers/workflow-execution-artifact.controller.js.map +1 -0
- package/dist/controllers/workflow-execution-log.controller.d.ts +24 -0
- package/dist/controllers/workflow-execution-log.controller.d.ts.map +1 -0
- package/dist/controllers/workflow-execution-log.controller.js +179 -0
- package/dist/controllers/workflow-execution-log.controller.js.map +1 -0
- package/dist/controllers/workflow-execution.controller.d.ts +29 -0
- package/dist/controllers/workflow-execution.controller.d.ts.map +1 -0
- package/dist/controllers/workflow-execution.controller.js +227 -0
- package/dist/controllers/workflow-execution.controller.js.map +1 -0
- package/dist/controllers/workflow-secret.controller.d.ts +24 -0
- package/dist/controllers/workflow-secret.controller.d.ts.map +1 -0
- package/dist/controllers/workflow-secret.controller.js +179 -0
- package/dist/controllers/workflow-secret.controller.js.map +1 -0
- package/dist/controllers/workflow-step-execution.controller.d.ts +24 -0
- package/dist/controllers/workflow-step-execution.controller.d.ts.map +1 -0
- package/dist/controllers/workflow-step-execution.controller.js +179 -0
- package/dist/controllers/workflow-step-execution.controller.js.map +1 -0
- package/dist/controllers/workflow-trigger-execution.controller.d.ts +24 -0
- package/dist/controllers/workflow-trigger-execution.controller.d.ts.map +1 -0
- package/dist/controllers/workflow-trigger-execution.controller.js +179 -0
- package/dist/controllers/workflow-trigger-execution.controller.js.map +1 -0
- package/dist/decorators/workflow-field-data-provider.decorator.d.ts +3 -0
- package/dist/decorators/workflow-field-data-provider.decorator.d.ts.map +1 -0
- package/dist/decorators/workflow-field-data-provider.decorator.js +11 -0
- package/dist/decorators/workflow-field-data-provider.decorator.js.map +1 -0
- package/dist/decorators/workflow-node-provider.decorator.d.ts +4 -0
- package/dist/decorators/workflow-node-provider.decorator.d.ts.map +1 -0
- package/dist/decorators/workflow-node-provider.decorator.js +13 -0
- package/dist/decorators/workflow-node-provider.decorator.js.map +1 -0
- package/dist/dtos/create-workflow-definition.dto.d.ts +14 -0
- package/dist/dtos/create-workflow-definition.dto.d.ts.map +1 -0
- package/dist/dtos/create-workflow-definition.dto.js +92 -0
- package/dist/dtos/create-workflow-definition.dto.js.map +1 -0
- package/dist/dtos/create-workflow-execution-artifact.dto.d.ts +22 -0
- package/dist/dtos/create-workflow-execution-artifact.dto.d.ts.map +1 -0
- package/dist/dtos/create-workflow-execution-artifact.dto.js +139 -0
- package/dist/dtos/create-workflow-execution-artifact.dto.js.map +1 -0
- package/dist/dtos/create-workflow-execution-log.dto.d.ts +18 -0
- package/dist/dtos/create-workflow-execution-log.dto.d.ts.map +1 -0
- package/dist/dtos/create-workflow-execution-log.dto.js +116 -0
- package/dist/dtos/create-workflow-execution-log.dto.js.map +1 -0
- package/dist/dtos/create-workflow-execution.dto.d.ts +33 -0
- package/dist/dtos/create-workflow-execution.dto.d.ts.map +1 -0
- package/dist/dtos/create-workflow-execution.dto.js +186 -0
- package/dist/dtos/create-workflow-execution.dto.js.map +1 -0
- package/dist/dtos/create-workflow-secret.dto.d.ts +11 -0
- package/dist/dtos/create-workflow-secret.dto.d.ts.map +1 -0
- package/dist/dtos/create-workflow-secret.dto.js +74 -0
- package/dist/dtos/create-workflow-secret.dto.js.map +1 -0
- package/dist/dtos/create-workflow-step-execution.dto.d.ts +27 -0
- package/dist/dtos/create-workflow-step-execution.dto.d.ts.map +1 -0
- package/dist/dtos/create-workflow-step-execution.dto.js +171 -0
- package/dist/dtos/create-workflow-step-execution.dto.js.map +1 -0
- package/dist/dtos/create-workflow-trigger-execution.dto.d.ts +25 -0
- package/dist/dtos/create-workflow-trigger-execution.dto.d.ts.map +1 -0
- package/dist/dtos/create-workflow-trigger-execution.dto.js +158 -0
- package/dist/dtos/create-workflow-trigger-execution.dto.js.map +1 -0
- package/dist/dtos/execute-workflow.dto.d.ts +7 -0
- package/dist/dtos/execute-workflow.dto.d.ts.map +1 -0
- package/dist/dtos/execute-workflow.dto.js +11 -0
- package/dist/dtos/execute-workflow.dto.js.map +1 -0
- package/dist/dtos/update-workflow-definition.dto.d.ts +15 -0
- package/dist/dtos/update-workflow-definition.dto.d.ts.map +1 -0
- package/dist/dtos/update-workflow-definition.dto.js +97 -0
- package/dist/dtos/update-workflow-definition.dto.js.map +1 -0
- package/dist/dtos/update-workflow-execution-artifact.dto.d.ts +23 -0
- package/dist/dtos/update-workflow-execution-artifact.dto.d.ts.map +1 -0
- package/dist/dtos/update-workflow-execution-artifact.dto.js +143 -0
- package/dist/dtos/update-workflow-execution-artifact.dto.js.map +1 -0
- package/dist/dtos/update-workflow-execution-log.dto.d.ts +19 -0
- package/dist/dtos/update-workflow-execution-log.dto.d.ts.map +1 -0
- package/dist/dtos/update-workflow-execution-log.dto.js +121 -0
- package/dist/dtos/update-workflow-execution-log.dto.js.map +1 -0
- package/dist/dtos/update-workflow-execution.dto.d.ts +34 -0
- package/dist/dtos/update-workflow-execution.dto.d.ts.map +1 -0
- package/dist/dtos/update-workflow-execution.dto.js +190 -0
- package/dist/dtos/update-workflow-execution.dto.js.map +1 -0
- package/dist/dtos/update-workflow-secret.dto.d.ts +12 -0
- package/dist/dtos/update-workflow-secret.dto.d.ts.map +1 -0
- package/dist/dtos/update-workflow-secret.dto.js +80 -0
- package/dist/dtos/update-workflow-secret.dto.js.map +1 -0
- package/dist/dtos/update-workflow-step-execution.dto.d.ts +28 -0
- package/dist/dtos/update-workflow-step-execution.dto.d.ts.map +1 -0
- package/dist/dtos/update-workflow-step-execution.dto.js +175 -0
- package/dist/dtos/update-workflow-step-execution.dto.js.map +1 -0
- package/dist/dtos/update-workflow-trigger-execution.dto.d.ts +26 -0
- package/dist/dtos/update-workflow-trigger-execution.dto.d.ts.map +1 -0
- package/dist/dtos/update-workflow-trigger-execution.dto.js +163 -0
- package/dist/dtos/update-workflow-trigger-execution.dto.js.map +1 -0
- package/dist/dtos/validate-workflow-definition.dto.d.ts +4 -0
- package/dist/dtos/validate-workflow-definition.dto.d.ts.map +1 -0
- package/dist/dtos/validate-workflow-definition.dto.js +11 -0
- package/dist/dtos/validate-workflow-definition.dto.js.map +1 -0
- package/dist/entities/saved-filters.entity.js +3 -3
- package/dist/entities/saved-filters.entity.js.map +1 -1
- package/dist/entities/workflow-definition.entity.d.ts +15 -0
- package/dist/entities/workflow-definition.entity.d.ts.map +1 -0
- package/dist/entities/workflow-definition.entity.js +77 -0
- package/dist/entities/workflow-definition.entity.js.map +1 -0
- package/dist/entities/workflow-execution-artifact.entity.d.ts +23 -0
- package/dist/entities/workflow-execution-artifact.entity.d.ts.map +1 -0
- package/dist/entities/workflow-execution-artifact.entity.js +113 -0
- package/dist/entities/workflow-execution-artifact.entity.js.map +1 -0
- package/dist/entities/workflow-execution-log.entity.d.ts +19 -0
- package/dist/entities/workflow-execution-log.entity.d.ts.map +1 -0
- package/dist/entities/workflow-execution-log.entity.js +95 -0
- package/dist/entities/workflow-execution-log.entity.js.map +1 -0
- package/dist/entities/workflow-execution.entity.d.ts +28 -0
- package/dist/entities/workflow-execution.entity.d.ts.map +1 -0
- package/dist/entities/workflow-execution.entity.js +124 -0
- package/dist/entities/workflow-execution.entity.js.map +1 -0
- package/dist/entities/workflow-secret.entity.d.ts +12 -0
- package/dist/entities/workflow-secret.entity.d.ts.map +1 -0
- package/dist/entities/workflow-secret.entity.js +66 -0
- package/dist/entities/workflow-secret.entity.js.map +1 -0
- package/dist/entities/workflow-step-execution.entity.d.ts +28 -0
- package/dist/entities/workflow-step-execution.entity.d.ts.map +1 -0
- package/dist/entities/workflow-step-execution.entity.js +138 -0
- package/dist/entities/workflow-step-execution.entity.js.map +1 -0
- package/dist/entities/workflow-trigger-execution.entity.d.ts +26 -0
- package/dist/entities/workflow-trigger-execution.entity.d.ts.map +1 -0
- package/dist/entities/workflow-trigger-execution.entity.js +127 -0
- package/dist/entities/workflow-trigger-execution.entity.js.map +1 -0
- package/dist/factories/sms.factory.d.ts.map +1 -1
- package/dist/factories/sms.factory.js +4 -1
- package/dist/factories/sms.factory.js.map +1 -1
- package/dist/helpers/solid-registry.d.ts +5 -1
- package/dist/helpers/solid-registry.d.ts.map +1 -1
- package/dist/helpers/solid-registry.js +17 -0
- package/dist/helpers/solid-registry.js.map +1 -1
- package/dist/index.d.ts +55 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +55 -0
- package/dist/index.js.map +1 -1
- package/dist/interfaces/workflow-node-handler.interface.d.ts +5 -0
- package/dist/interfaces/workflow-node-handler.interface.d.ts.map +1 -0
- package/dist/interfaces/workflow-node-handler.interface.js +3 -0
- package/dist/interfaces/workflow-node-handler.interface.js.map +1 -0
- package/dist/interfaces.d.ts +24 -0
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/interfaces.js.map +1 -1
- package/dist/jobs/database/workflow-execution-publisher-database.service.d.ts +12 -0
- package/dist/jobs/database/workflow-execution-publisher-database.service.d.ts.map +1 -0
- package/dist/jobs/database/workflow-execution-publisher-database.service.js +39 -0
- package/dist/jobs/database/workflow-execution-publisher-database.service.js.map +1 -0
- package/dist/jobs/database/workflow-execution-queue-options-database.d.ts +8 -0
- package/dist/jobs/database/workflow-execution-queue-options-database.d.ts.map +1 -0
- package/dist/jobs/database/workflow-execution-queue-options-database.js +10 -0
- package/dist/jobs/database/workflow-execution-queue-options-database.js.map +1 -0
- package/dist/jobs/database/workflow-execution-subscriber-database.service.d.ts +19 -0
- package/dist/jobs/database/workflow-execution-subscriber-database.service.d.ts.map +1 -0
- package/dist/jobs/database/workflow-execution-subscriber-database.service.js +55 -0
- package/dist/jobs/database/workflow-execution-subscriber-database.service.js.map +1 -0
- package/dist/jobs/rabbitmq/workflow-execution-publisher.service.d.ts +12 -0
- package/dist/jobs/rabbitmq/workflow-execution-publisher.service.d.ts.map +1 -0
- package/dist/jobs/rabbitmq/workflow-execution-publisher.service.js +39 -0
- package/dist/jobs/rabbitmq/workflow-execution-publisher.service.js.map +1 -0
- package/dist/jobs/rabbitmq/workflow-execution-queue-options.d.ts +8 -0
- package/dist/jobs/rabbitmq/workflow-execution-queue-options.d.ts.map +1 -0
- package/dist/jobs/rabbitmq/workflow-execution-queue-options.js +10 -0
- package/dist/jobs/rabbitmq/workflow-execution-queue-options.js.map +1 -0
- package/dist/jobs/rabbitmq/workflow-execution-subscriber.service.d.ts +17 -0
- package/dist/jobs/rabbitmq/workflow-execution-subscriber.service.d.ts.map +1 -0
- package/dist/jobs/rabbitmq/workflow-execution-subscriber.service.js +52 -0
- package/dist/jobs/rabbitmq/workflow-execution-subscriber.service.js.map +1 -0
- package/dist/jobs/redis/workflow-execution-publisher-redis.service.d.ts +12 -0
- package/dist/jobs/redis/workflow-execution-publisher-redis.service.d.ts.map +1 -0
- package/dist/jobs/redis/workflow-execution-publisher-redis.service.js +39 -0
- package/dist/jobs/redis/workflow-execution-publisher-redis.service.js.map +1 -0
- package/dist/jobs/redis/workflow-execution-queue-options-redis.d.ts +8 -0
- package/dist/jobs/redis/workflow-execution-queue-options-redis.d.ts.map +1 -0
- package/dist/jobs/redis/workflow-execution-queue-options-redis.js +10 -0
- package/dist/jobs/redis/workflow-execution-queue-options-redis.js.map +1 -0
- package/dist/jobs/redis/workflow-execution-subscriber-redis.service.d.ts +17 -0
- package/dist/jobs/redis/workflow-execution-subscriber-redis.service.d.ts.map +1 -0
- package/dist/jobs/redis/workflow-execution-subscriber-redis.service.js +52 -0
- package/dist/jobs/redis/workflow-execution-subscriber-redis.service.js.map +1 -0
- package/dist/repository/security-rule.repository.d.ts +1 -0
- package/dist/repository/security-rule.repository.d.ts.map +1 -1
- package/dist/repository/security-rule.repository.js +28 -7
- package/dist/repository/security-rule.repository.js.map +1 -1
- package/dist/repository/workflow-definition.repository.d.ts +12 -0
- package/dist/repository/workflow-definition.repository.d.ts.map +1 -0
- package/dist/repository/workflow-definition.repository.js +39 -0
- package/dist/repository/workflow-definition.repository.js.map +1 -0
- package/dist/repository/workflow-execution-artifact.repository.d.ts +12 -0
- package/dist/repository/workflow-execution-artifact.repository.d.ts.map +1 -0
- package/dist/repository/workflow-execution-artifact.repository.js +39 -0
- package/dist/repository/workflow-execution-artifact.repository.js.map +1 -0
- package/dist/repository/workflow-execution-log.repository.d.ts +12 -0
- package/dist/repository/workflow-execution-log.repository.d.ts.map +1 -0
- package/dist/repository/workflow-execution-log.repository.js +39 -0
- package/dist/repository/workflow-execution-log.repository.js.map +1 -0
- package/dist/repository/workflow-execution.repository.d.ts +12 -0
- package/dist/repository/workflow-execution.repository.d.ts.map +1 -0
- package/dist/repository/workflow-execution.repository.js +39 -0
- package/dist/repository/workflow-execution.repository.js.map +1 -0
- package/dist/repository/workflow-secret.repository.d.ts +12 -0
- package/dist/repository/workflow-secret.repository.d.ts.map +1 -0
- package/dist/repository/workflow-secret.repository.js +39 -0
- package/dist/repository/workflow-secret.repository.js.map +1 -0
- package/dist/repository/workflow-step-execution.repository.d.ts +12 -0
- package/dist/repository/workflow-step-execution.repository.d.ts.map +1 -0
- package/dist/repository/workflow-step-execution.repository.js +39 -0
- package/dist/repository/workflow-step-execution.repository.js.map +1 -0
- package/dist/repository/workflow-trigger-execution.repository.d.ts +12 -0
- package/dist/repository/workflow-trigger-execution.repository.d.ts.map +1 -0
- package/dist/repository/workflow-trigger-execution.repository.js +39 -0
- package/dist/repository/workflow-trigger-execution.repository.js.map +1 -0
- package/dist/seeders/module-metadata-seeder.service.d.ts +6 -0
- package/dist/seeders/module-metadata-seeder.service.d.ts.map +1 -1
- package/dist/seeders/module-metadata-seeder.service.js +141 -0
- package/dist/seeders/module-metadata-seeder.service.js.map +1 -1
- package/dist/seeders/seed-data/solid-core-metadata.json +11437 -5567
- package/dist/services/chatter-message.service.d.ts.map +1 -1
- package/dist/services/chatter-message.service.js +1 -1
- package/dist/services/chatter-message.service.js.map +1 -1
- package/dist/services/crud-helper.service.d.ts +16 -1
- package/dist/services/crud-helper.service.d.ts.map +1 -1
- package/dist/services/crud-helper.service.js +99 -22
- package/dist/services/crud-helper.service.js.map +1 -1
- package/dist/services/crud.service.d.ts +1 -0
- package/dist/services/crud.service.d.ts.map +1 -1
- package/dist/services/crud.service.js +15 -0
- package/dist/services/crud.service.js.map +1 -1
- package/dist/services/solid-introspect.service.d.ts +1 -0
- package/dist/services/solid-introspect.service.d.ts.map +1 -1
- package/dist/services/solid-introspect.service.js +12 -0
- package/dist/services/solid-introspect.service.js.map +1 -1
- package/dist/services/view-metadata.service.d.ts +5 -1
- package/dist/services/view-metadata.service.d.ts.map +1 -1
- package/dist/services/view-metadata.service.js +63 -14
- package/dist/services/view-metadata.service.js.map +1 -1
- package/dist/services/workflow/nodes/for-each.node.d.ts +6 -0
- package/dist/services/workflow/nodes/for-each.node.d.ts.map +1 -0
- package/dist/services/workflow/nodes/for-each.node.js +95 -0
- package/dist/services/workflow/nodes/for-each.node.js.map +1 -0
- package/dist/services/workflow/nodes/http-request.node.d.ts +13 -0
- package/dist/services/workflow/nodes/http-request.node.d.ts.map +1 -0
- package/dist/services/workflow/nodes/http-request.node.js +549 -0
- package/dist/services/workflow/nodes/http-request.node.js.map +1 -0
- package/dist/services/workflow/nodes/if.node.d.ts +6 -0
- package/dist/services/workflow/nodes/if.node.d.ts.map +1 -0
- package/dist/services/workflow/nodes/if.node.js +93 -0
- package/dist/services/workflow/nodes/if.node.js.map +1 -0
- package/dist/services/workflow/nodes/log-write.node.d.ts +6 -0
- package/dist/services/workflow/nodes/log-write.node.d.ts.map +1 -0
- package/dist/services/workflow/nodes/log-write.node.js +229 -0
- package/dist/services/workflow/nodes/log-write.node.js.map +1 -0
- package/dist/services/workflow/nodes/parallel.node.d.ts +6 -0
- package/dist/services/workflow/nodes/parallel.node.d.ts.map +1 -0
- package/dist/services/workflow/nodes/parallel.node.js +76 -0
- package/dist/services/workflow/nodes/parallel.node.js.map +1 -0
- package/dist/services/workflow/nodes/runtime-python.node.d.ts +13 -0
- package/dist/services/workflow/nodes/runtime-python.node.d.ts.map +1 -0
- package/dist/services/workflow/nodes/runtime-python.node.js +522 -0
- package/dist/services/workflow/nodes/runtime-python.node.js.map +1 -0
- package/dist/services/workflow/nodes/sequential.node.d.ts +6 -0
- package/dist/services/workflow/nodes/sequential.node.d.ts.map +1 -0
- package/dist/services/workflow/nodes/sequential.node.js +61 -0
- package/dist/services/workflow/nodes/sequential.node.js.map +1 -0
- package/dist/services/workflow/nodes/solidx-api.helpers.d.ts +25 -0
- package/dist/services/workflow/nodes/solidx-api.helpers.d.ts.map +1 -0
- package/dist/services/workflow/nodes/solidx-api.helpers.js +143 -0
- package/dist/services/workflow/nodes/solidx-api.helpers.js.map +1 -0
- package/dist/services/workflow/nodes/solidx-crud.nodes.d.ts +48 -0
- package/dist/services/workflow/nodes/solidx-crud.nodes.d.ts.map +1 -0
- package/dist/services/workflow/nodes/solidx-crud.nodes.js +475 -0
- package/dist/services/workflow/nodes/solidx-crud.nodes.js.map +1 -0
- package/dist/services/workflow/nodes/solidx-login.node.d.ts +6 -0
- package/dist/services/workflow/nodes/solidx-login.node.d.ts.map +1 -0
- package/dist/services/workflow/nodes/solidx-login.node.js +208 -0
- package/dist/services/workflow/nodes/solidx-login.node.js.map +1 -0
- package/dist/services/workflow/nodes/solidx-send-email.node.d.ts +11 -0
- package/dist/services/workflow/nodes/solidx-send-email.node.d.ts.map +1 -0
- package/dist/services/workflow/nodes/solidx-send-email.node.js +437 -0
- package/dist/services/workflow/nodes/solidx-send-email.node.js.map +1 -0
- package/dist/services/workflow/nodes/solidx-send-sms.node.d.ts +10 -0
- package/dist/services/workflow/nodes/solidx-send-sms.node.d.ts.map +1 -0
- package/dist/services/workflow/nodes/solidx-send-sms.node.js +347 -0
- package/dist/services/workflow/nodes/solidx-send-sms.node.js.map +1 -0
- package/dist/services/workflow/nodes/switch.node.d.ts +7 -0
- package/dist/services/workflow/nodes/switch.node.d.ts.map +1 -0
- package/dist/services/workflow/nodes/switch.node.js +113 -0
- package/dist/services/workflow/nodes/switch.node.js.map +1 -0
- package/dist/services/workflow/workflow-definition-metadata-sync.service.d.ts +19 -0
- package/dist/services/workflow/workflow-definition-metadata-sync.service.d.ts.map +1 -0
- package/dist/services/workflow/workflow-definition-metadata-sync.service.js +187 -0
- package/dist/services/workflow/workflow-definition-metadata-sync.service.js.map +1 -0
- package/dist/services/workflow/workflow-definition-validator.service.d.ts +13 -0
- package/dist/services/workflow/workflow-definition-validator.service.d.ts.map +1 -0
- package/dist/services/workflow/workflow-definition-validator.service.js +163 -0
- package/dist/services/workflow/workflow-definition-validator.service.js.map +1 -0
- package/dist/services/workflow/workflow-execution-writer.service.d.ts +26 -0
- package/dist/services/workflow/workflow-execution-writer.service.d.ts.map +1 -0
- package/dist/services/workflow/workflow-execution-writer.service.js +191 -0
- package/dist/services/workflow/workflow-execution-writer.service.js.map +1 -0
- package/dist/services/workflow/workflow-expression.service.d.ts +14 -0
- package/dist/services/workflow/workflow-expression.service.d.ts.map +1 -0
- package/dist/services/workflow/workflow-expression.service.js +152 -0
- package/dist/services/workflow/workflow-expression.service.js.map +1 -0
- package/dist/services/workflow/workflow-invocation.service.d.ts +11 -0
- package/dist/services/workflow/workflow-invocation.service.d.ts.map +1 -0
- package/dist/services/workflow/workflow-invocation.service.js +37 -0
- package/dist/services/workflow/workflow-invocation.service.js.map +1 -0
- package/dist/services/workflow/workflow-node-registry.service.d.ts +18 -0
- package/dist/services/workflow/workflow-node-registry.service.d.ts.map +1 -0
- package/dist/services/workflow/workflow-node-registry.service.js +110 -0
- package/dist/services/workflow/workflow-node-registry.service.js.map +1 -0
- package/dist/services/workflow/workflow-runtime.service.d.ts +53 -0
- package/dist/services/workflow/workflow-runtime.service.d.ts.map +1 -0
- package/dist/services/workflow/workflow-runtime.service.js +541 -0
- package/dist/services/workflow/workflow-runtime.service.js.map +1 -0
- package/dist/services/workflow/workflow-scheduled-trigger.job.d.ts +10 -0
- package/dist/services/workflow/workflow-scheduled-trigger.job.d.ts.map +1 -0
- package/dist/services/workflow/workflow-scheduled-trigger.job.js +37 -0
- package/dist/services/workflow/workflow-scheduled-trigger.job.js.map +1 -0
- package/dist/services/workflow-definition.service.d.ts +52 -0
- package/dist/services/workflow-definition.service.d.ts.map +1 -0
- package/dist/services/workflow-definition.service.js +251 -0
- package/dist/services/workflow-definition.service.js.map +1 -0
- package/dist/services/workflow-execution-artifact.service.d.ts +12 -0
- package/dist/services/workflow-execution-artifact.service.d.ts.map +1 -0
- package/dist/services/workflow-execution-artifact.service.js +38 -0
- package/dist/services/workflow-execution-artifact.service.js.map +1 -0
- package/dist/services/workflow-execution-log.service.d.ts +12 -0
- package/dist/services/workflow-execution-log.service.d.ts.map +1 -0
- package/dist/services/workflow-execution-log.service.js +38 -0
- package/dist/services/workflow-execution-log.service.js.map +1 -0
- package/dist/services/workflow-execution.service.d.ts +12 -0
- package/dist/services/workflow-execution.service.d.ts.map +1 -0
- package/dist/services/workflow-execution.service.js +38 -0
- package/dist/services/workflow-execution.service.js.map +1 -0
- package/dist/services/workflow-secret.service.d.ts +25 -0
- package/dist/services/workflow-secret.service.d.ts.map +1 -0
- package/dist/services/workflow-secret.service.js +152 -0
- package/dist/services/workflow-secret.service.js.map +1 -0
- package/dist/services/workflow-step-execution.service.d.ts +12 -0
- package/dist/services/workflow-step-execution.service.d.ts.map +1 -0
- package/dist/services/workflow-step-execution.service.js +38 -0
- package/dist/services/workflow-step-execution.service.js.map +1 -0
- package/dist/services/workflow-trigger-execution.service.d.ts +12 -0
- package/dist/services/workflow-trigger-execution.service.d.ts.map +1 -0
- package/dist/services/workflow-trigger-execution.service.js +38 -0
- package/dist/services/workflow-trigger-execution.service.js.map +1 -0
- package/dist/solid-core.module.d.ts.map +1 -1
- package/dist/solid-core.module.js +117 -0
- package/dist/solid-core.module.js.map +1 -1
- package/dist/transformers/empty-string-to-null-transformer.d.ts +4 -0
- package/dist/transformers/empty-string-to-null-transformer.d.ts.map +1 -0
- package/dist/transformers/empty-string-to-null-transformer.js +12 -0
- package/dist/transformers/empty-string-to-null-transformer.js.map +1 -0
- package/dist/types/workflow-dsl.types.d.ts +277 -0
- package/dist/types/workflow-dsl.types.d.ts.map +1 -0
- package/dist/types/workflow-dsl.types.js +3 -0
- package/dist/types/workflow-dsl.types.js.map +1 -0
- package/dist/types/workflow-execution-queue.types.d.ts +4 -0
- package/dist/types/workflow-execution-queue.types.d.ts.map +1 -0
- package/dist/types/workflow-execution-queue.types.js +3 -0
- package/dist/types/workflow-execution-queue.types.js.map +1 -0
- package/package.json +3 -2
- package/src/controllers/workflow-definition.controller.ts +141 -0
- package/src/controllers/workflow-execution-artifact.controller.ts +93 -0
- package/src/controllers/workflow-execution-log.controller.ts +93 -0
- package/src/controllers/workflow-execution.controller.ts +126 -0
- package/src/controllers/workflow-secret.controller.ts +90 -0
- package/src/controllers/workflow-step-execution.controller.ts +93 -0
- package/src/controllers/workflow-trigger-execution.controller.ts +93 -0
- package/src/decorators/workflow-field-data-provider.decorator.ts +7 -0
- package/src/decorators/workflow-node-provider.decorator.ts +14 -0
- package/src/dtos/create-workflow-definition.dto.ts +60 -0
- package/src/dtos/create-workflow-execution-artifact.dto.ts +99 -0
- package/src/dtos/create-workflow-execution-log.dto.ts +80 -0
- package/src/dtos/create-workflow-execution.dto.ts +137 -0
- package/src/dtos/create-workflow-secret.dto.ts +44 -0
- package/src/dtos/create-workflow-step-execution.dto.ts +123 -0
- package/src/dtos/create-workflow-trigger-execution.dto.ts +114 -0
- package/src/dtos/execute-workflow.dto.ts +6 -0
- package/src/dtos/update-workflow-definition.dto.ts +67 -0
- package/src/dtos/update-workflow-execution-artifact.dto.ts +105 -0
- package/src/dtos/update-workflow-execution-log.dto.ts +87 -0
- package/src/dtos/update-workflow-execution.dto.ts +144 -0
- package/src/dtos/update-workflow-secret.dto.ts +53 -0
- package/src/dtos/update-workflow-step-execution.dto.ts +132 -0
- package/src/dtos/update-workflow-trigger-execution.dto.ts +122 -0
- package/src/dtos/validate-workflow-definition.dto.ts +3 -0
- package/src/entities/saved-filters.entity.ts +3 -3
- package/src/entities/workflow-definition.entity.ts +43 -0
- package/src/entities/workflow-execution-artifact.entity.ts +72 -0
- package/src/entities/workflow-execution-log.entity.ts +58 -0
- package/src/entities/workflow-execution.entity.ts +82 -0
- package/src/entities/workflow-secret.entity.ts +33 -0
- package/src/entities/workflow-step-execution.entity.ts +88 -0
- package/src/entities/workflow-trigger-execution.entity.ts +82 -0
- package/src/factories/sms.factory.ts +4 -1
- package/src/helpers/solid-registry.ts +21 -1
- package/src/index.ts +55 -0
- package/src/interfaces/workflow-node-handler.interface.ts +10 -0
- package/src/interfaces.ts +29 -0
- package/src/jobs/database/workflow-execution-publisher-database.service.ts +24 -0
- package/src/jobs/database/workflow-execution-queue-options-database.ts +9 -0
- package/src/jobs/database/workflow-execution-subscriber-database.service.ts +44 -0
- package/src/jobs/rabbitmq/workflow-execution-publisher.service.ts +24 -0
- package/src/jobs/rabbitmq/workflow-execution-queue-options.ts +9 -0
- package/src/jobs/rabbitmq/workflow-execution-subscriber.service.ts +42 -0
- package/src/jobs/redis/workflow-execution-publisher-redis.service.ts +24 -0
- package/src/jobs/redis/workflow-execution-queue-options-redis.ts +9 -0
- package/src/jobs/redis/workflow-execution-subscriber-redis.service.ts +42 -0
- package/src/repository/security-rule.repository.ts +52 -10
- package/src/repository/workflow-definition.repository.ts +19 -0
- package/src/repository/workflow-execution-artifact.repository.ts +19 -0
- package/src/repository/workflow-execution-log.repository.ts +19 -0
- package/src/repository/workflow-execution.repository.ts +19 -0
- package/src/repository/workflow-secret.repository.ts +19 -0
- package/src/repository/workflow-step-execution.repository.ts +19 -0
- package/src/repository/workflow-trigger-execution.repository.ts +19 -0
- package/src/seeders/module-metadata-seeder.service.ts +166 -4
- package/src/seeders/seed-data/solid-core-metadata.json +11437 -5567
- package/src/services/chatter-message.service.ts +5 -1
- package/src/services/crud-helper.service.ts +220 -22
- package/src/services/crud.service.ts +30 -0
- package/src/services/solid-introspect.service.ts +19 -0
- package/src/services/view-metadata.service.ts +87 -21
- package/src/services/workflow/nodes/for-each.node.ts +97 -0
- package/src/services/workflow/nodes/http-request.node.ts +624 -0
- package/src/services/workflow/nodes/if.node.ts +93 -0
- package/src/services/workflow/nodes/log-write.node.ts +232 -0
- package/src/services/workflow/nodes/parallel.node.ts +81 -0
- package/src/services/workflow/nodes/runtime-python.node.ts +571 -0
- package/src/services/workflow/nodes/sequential.node.ts +58 -0
- package/src/services/workflow/nodes/solidx-api.helpers.ts +205 -0
- package/src/services/workflow/nodes/solidx-crud.nodes.ts +511 -0
- package/src/services/workflow/nodes/solidx-login.node.ts +222 -0
- package/src/services/workflow/nodes/solidx-send-email.node.ts +489 -0
- package/src/services/workflow/nodes/solidx-send-sms.node.ts +377 -0
- package/src/services/workflow/nodes/switch.node.ts +125 -0
- package/src/services/workflow/workflow-definition-metadata-sync.service.ts +196 -0
- package/src/services/workflow/workflow-definition-validator.service.ts +223 -0
- package/src/services/workflow/workflow-execution-writer.service.ts +244 -0
- package/src/services/workflow/workflow-expression.service.ts +175 -0
- package/src/services/workflow/workflow-invocation.service.ts +39 -0
- package/src/services/workflow/workflow-node-registry.service.ts +141 -0
- package/src/services/workflow/workflow-runtime.service.ts +699 -0
- package/src/services/workflow/workflow-scheduled-trigger.job.ts +33 -0
- package/src/services/workflow-definition.service.ts +293 -0
- package/src/services/workflow-execution-artifact.service.ts +20 -0
- package/src/services/workflow-execution-log.service.ts +20 -0
- package/src/services/workflow-execution.service.ts +20 -0
- package/src/services/workflow-secret.service.ts +161 -0
- package/src/services/workflow-step-execution.service.ts +20 -0
- package/src/services/workflow-trigger-execution.service.ts +20 -0
- package/src/solid-core.module.ts +124 -0
- package/src/transformers/empty-string-to-null-transformer.ts +11 -0
- package/src/types/workflow-dsl.types.ts +987 -0
- package/src/types/workflow-execution-queue.types.ts +3 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-runtime.service.js","sourceRoot":"","sources":["../../../src/services/workflow/workflow-runtime.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,2CAA4F;AAC5F,6CAAsD;AACtD,qCAAwC;AACxC,0FAA+E;AAC/E,wFAA6E;AAC7E,kGAAsF;AAQtF,2FAAqF;AACrF,+EAA0E;AAC1E,mGAA6F;AAC7F,qFAA+E;AAC/E,wEAAmE;AACnE,mFAAuE;AAEvE,gDAAwB;AAGjB,IAAM,sBAAsB,8BAA5B,MAAM,sBAAsB;IAGjC,YAEE,aAA6C,EAC5B,QAAqC,EACrC,UAAqC,EACrC,MAAsC,EACtC,SAA6C,EAC7C,qBAA4C,EAC5C,iCAAkF;QANlF,kBAAa,GAAb,aAAa,CAAe;QAC5B,aAAQ,GAAR,QAAQ,CAA6B;QACrC,eAAU,GAAV,UAAU,CAA2B;QACrC,WAAM,GAAN,MAAM,CAAgC;QACtC,cAAS,GAAT,SAAS,CAAoC;QAC7C,0BAAqB,GAArB,qBAAqB,CAAuB;QAC5C,sCAAiC,GAAjC,iCAAiC,CAAiD;QAVpF,WAAM,GAAG,IAAI,eAAM,CAAC,wBAAsB,CAAC,IAAI,CAAC,CAAC;IAW/D,CAAC;IAEJ,KAAK,CAAC,qBAAqB,CACzB,EAAU,EACV,OAAiC;QAEjC,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,+CAAkB,EAAE;YACtE,KAAK,EAAE,EAAE,EAAE,EAAS;SACrB,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC,iBAAiB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACrD,CAAC;IAED,KAAK,CAAC,0BAA0B,CAC9B,EAAU,EACV,UAAoC,EAAE;QAEtC,MAAM,UAAU,GAAG,M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,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAChE,CAAC;IAEO,cAAc,CAAC,KAAc;QACnC,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;YAC3B,OAAO;gBACL,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,KAAK,EAAE,KAAK,CAAC,KAAK;aACnB,CAAC;QACJ,CAAC;QAED,OAAO,EAAE,KAAK,EAAE,CAAC;IACnB,CAAC;CACF,CAAA;AAnqBY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;IAKR,WAAA,IAAA,6BAAmB,EAAC,SAAS,CAAC,CAAA;qCACC,uBAAa;QAClB,4DAA2B;QACzB,uDAAyB;QAC7B,kEAA8B;QAC3B,0EAAkC;QACtB,+CAAqB;QACT,4CAAgB;GAX3D,sBAAsB,CAmqBlC","sourcesContent":["import { BadRequestException, Injectable, Logger, NotFoundException } from '@nestjs/common';\nimport { InjectEntityManager } from '@nestjs/typeorm';\nimport { EntityManager } from 'typeorm';\nimport { WorkflowDefinition } from '../../entities/workflow-definition.entity';\nimport { WorkflowExecution } from '../../entities/workflow-execution.entity';\nimport { WorkflowStepExecution } from '../../entities/workflow-step-execution.entity';\nimport {\n WorkflowDefinitionDsl,\n WorkflowExecutionRequest,\n WorkflowExecutionResponse,\n WorkflowNodeDefinition,\n WorkflowRuntimeContext,\n} from '../../types/workflow-dsl.types';\nimport { WorkflowExecutionWriterService } from './workflow-execution-writer.service';\nimport { WorkflowExpressionService } from './workflow-expression.service';\nimport { WorkflowDefinitionValidatorService } from './workflow-definition-validator.service';\nimport { WorkflowNodeRegistryService } from './workflow-node-registry.service';\nimport { WorkflowSecretService } from '../workflow-secret.service';\nimport { PublisherFactory } from '../queues/publisher-factory.service';\nimport { WorkflowExecutionQueuePayload } from '../../types/workflow-execution-queue.types';\nimport YAML from 'yaml';\n\n@Injectable()\nexport class WorkflowRuntimeService {\n private readonly logger = new Logger(WorkflowRuntimeService.name);\n\n constructor(\n @InjectEntityManager('default')\n private readonly entityManager: EntityManager,\n private readonly registry: WorkflowNodeRegistryService,\n private readonly expression: WorkflowExpressionService,\n private readonly writer: WorkflowExecutionWriterService,\n private readonly validator: WorkflowDefinitionValidatorService,\n private readonly workflowSecretService: WorkflowSecretService,\n private readonly workflowExecutionPublisherFactory: PublisherFactory<WorkflowExecutionQueuePayload>,\n ) {}\n\n async executeDefinitionById(\n id: number,\n request: WorkflowExecutionRequest,\n ): Promise<WorkflowExecutionResponse> {\n const definition = await this.entityManager.findOne(WorkflowDefinition, {\n where: { id } as any,\n });\n\n return this.executeDefinition(definition, request);\n }\n\n async executeDefinitionByIdAsync(\n id: number,\n request: WorkflowExecutionRequest = {},\n ): Promise<WorkflowExecutionResponse> {\n const definition = await this.entityManager.findOne(WorkflowDefinition, {\n where: { id } as any,\n });\n\n return this.enqueueDefinition(definition, request);\n }\n\n async executeDefinitionByKey(\n key: string,\n request: WorkflowExecutionRequest,\n ): Promise<WorkflowExecutionResponse> {\n const definition = await this.entityManager.findOne(WorkflowDefinition, {\n where: { key } as any,\n });\n\n return this.executeDefinition(definition, request);\n }\n\n async executeDefinitionByKeyAsync(\n key: string,\n request: WorkflowExecutionRequest = {},\n ): Promise<WorkflowExecutionResponse> {\n const definition = await this.entityManager.findOne(WorkflowDefinition, {\n where: { key } as any,\n });\n\n return this.enqueueDefinition(definition, request);\n }\n\n private async queueWorkflowExecution(\n payload: WorkflowExecutionQueuePayload,\n ): Promise<string> {\n const messageId = await this.workflowExecutionPublisherFactory.publish(\n {\n payload,\n parentEntityId: payload.executionId,\n parentEntity: 'workflowExecution',\n retryCount: 0,\n retryInterval: 1000,\n },\n 'WorkflowExecutionPublisher',\n );\n\n this.logger.log(\n `Queued workflow execution message ${messageId} for execution id ${payload.executionId}.`,\n );\n\n return messageId;\n }\n\n private async enqueueDefinition(\n definition: WorkflowDefinition | null,\n request: WorkflowExecutionRequest,\n ): Promise<WorkflowExecutionResponse> {\n if (!definition) {\n throw new BadRequestException('Workflow definition not found.');\n }\n\n this.validator.validate(this.assertDefinitionYaml(definition.definitionYaml));\n const execution = await this.writer.createEnqueuedExecution(definition, request);\n await this.queueWorkflowExecution({\n executionId: execution.id,\n });\n\n return this.toResponse(execution);\n }\n\n async executeEnqueuedExecution(\n executionId: number,\n ): Promise<WorkflowExecutionResponse> {\n const execution = await this.entityManager.findOne(WorkflowExecution, {\n where: { id: executionId } as any,\n relations: ['workflowDefinition'],\n });\n\n if (!execution) {\n throw new NotFoundException(`Workflow execution ${executionId} not found.`);\n }\n\n if (execution.status !== 'enqueued') {\n throw new BadRequestException(\n `Workflow execution ${executionId} is ${execution.status}; expected enqueued.`,\n );\n }\n\n const request = this.readEnqueuedExecutionRequest(execution);\n return this.executeDefinition(execution.workflowDefinition, request, execution);\n }\n\n private async executeDefinition(\n definition: WorkflowDefinition | null,\n request: WorkflowExecutionRequest,\n existingExecution?: WorkflowExecution,\n ): Promise<WorkflowExecutionResponse> {\n if (!definition) {\n throw new BadRequestException('Workflow definition not found.');\n }\n\n const definitionDsl = this.assertDefinitionYaml(definition.definitionYaml);\n this.validator.validate(definitionDsl);\n const secrets = await this.workflowSecretService.getWorkflowSecretsContext();\n const input = this.resolveWorkflowInput(definitionDsl, request, secrets);\n const variables = this.resolveWorkflowVariables(definitionDsl, request, input, secrets);\n const effectiveRequest: WorkflowExecutionRequest = {\n ...request,\n input,\n variables,\n };\n const execution = existingExecution\n ? await this.writer.startExecution(existingExecution, effectiveRequest)\n : await this.writer.createExecution(definition, effectiveRequest);\n const nodeCount = this.countNodes(definitionDsl.nodes);\n const outputs: Record<string, any> = {};\n const runtimeContext: WorkflowRuntimeContext = {\n execution,\n input,\n variables,\n secrets,\n outputs,\n counters: {\n step: 0,\n log: 0,\n },\n };\n\n try {\n this.logger.log(\n `Starting workflow execution ${execution.executionIdentifier} for ${definition.key} with ${nodeCount} node(s).`,\n );\n await this.writer.writeLog(execution, undefined, {\n level: 'info',\n eventType: 'execution.started',\n message: `Workflow execution started for ${definition.key}.`,\n metadata: {\n executionIdentifier: execution.executionIdentifier,\n workflowKey: definition.key,\n triggerType: execution.triggerType,\n nodeCount,\n inputKeys: Object.keys(runtimeContext.input ?? {}),\n variableKeys: Object.keys(runtimeContext.variables ?? {}),\n },\n }, this.nextLogSequence(runtimeContext));\n\n await this.runNodes(definitionDsl.nodes, runtimeContext);\n\n const completed = await this.writer.completeExecution(execution, outputs);\n\n this.logger.log(\n `Completed workflow execution ${completed.executionIdentifier} for ${definition.key} in ${completed.durationMs ?? 0} ms.`,\n );\n await this.writer.writeLog(completed, undefined, {\n level: 'info',\n eventType: 'execution.completed',\n message: `Workflow execution completed for ${definition.key}.`,\n metadata: {\n executionIdentifier: completed.executionIdentifier,\n durationMs: completed.durationMs,\n outputNodeIds: Object.keys(outputs),\n },\n }, this.nextLogSequence(runtimeContext));\n\n return this.toResponse(completed);\n } catch (error) {\n const failed = await this.writer.failExecution(execution, error);\n\n this.logger.error(\n `Failed workflow execution ${failed.executionIdentifier} for ${definition.key}: ${failed.errorSummary}`,\n error instanceof Error ? error.stack : undefined,\n );\n await this.writer.writeLog(failed, undefined, {\n level: 'error',\n eventType: 'execution.failed',\n message: failed.errorSummary,\n context: this.summarizeError(error),\n metadata: {\n executionIdentifier: failed.executionIdentifier,\n durationMs: failed.durationMs,\n },\n }, this.nextLogSequence(runtimeContext));\n\n return this.toResponse(failed);\n }\n }\n\n async getExecutionStatus(executionId: number): Promise<WorkflowExecutionResponse> {\n const execution = await this.findExecutionOrThrow(executionId);\n return this.toResponse(execution);\n }\n\n async getLastStepOutput(executionId: number): Promise<any> {\n await this.findExecutionOrThrow(executionId);\n const step = await this.entityManager.findOne(WorkflowStepExecution, {\n where: { workflowExecution: { id: executionId } } as any,\n order: {\n sequenceNumber: 'DESC',\n id: 'DESC',\n } as any,\n });\n\n if (!step) {\n throw new NotFoundException(`No step executions found for workflow execution ${executionId}.`);\n }\n\n return this.toStepOutputResponse(step);\n }\n\n async getStepOutput(\n executionId: number,\n stepNameOrId: string,\n options: { latest?: boolean; limit?: number; offset?: number } = {},\n ): Promise<any> {\n await this.findExecutionOrThrow(executionId);\n\n const qb = this.entityManager\n .createQueryBuilder(WorkflowStepExecution, 'step')\n .innerJoin('step.workflowExecution', 'execution')\n .where('execution.id = :executionId', { executionId })\n .andWhere(\n '(step.nodeId = :stepNameOrId OR step.nodeName = :stepNameOrId OR step.stepExecutionKey = :stepNameOrId)',\n { stepNameOrId },\n )\n .orderBy('step.sequenceNumber', options.latest === false ? 'ASC' : 'DESC')\n .addOrderBy('step.id', options.latest === false ? 'ASC' : 'DESC');\n\n if (options.latest !== false && options.limit === undefined && options.offset === undefined) {\n const step = await qb.getOne();\n if (!step) {\n throw new NotFoundException(\n `No step output found for '${stepNameOrId}' in workflow execution ${executionId}.`,\n );\n }\n return this.toStepOutputResponse(step);\n }\n\n const limit = Math.max(1, Math.min(Number(options.limit ?? 50), 200));\n const offset = Math.max(0, Number(options.offset ?? 0));\n const [steps, totalRecords] = await qb.limit(limit).offset(offset).getManyAndCount();\n\n return {\n meta: this.buildPagedMeta(offset, limit, totalRecords),\n records: steps.map((step) => this.toStepOutputResponse(step)),\n };\n }\n\n private resolveWorkflowInput(\n definitionDsl: WorkflowDefinitionDsl,\n request: WorkflowExecutionRequest,\n secrets: Record<string, any>,\n ): Record<string, any> {\n const requestedInput = request.input ?? {};\n const defaultInput = Object.entries(definitionDsl.inputs ?? {}).reduce(\n (acc, [key, inputDefinition]) => {\n if (\n inputDefinition &&\n typeof inputDefinition === 'object' &&\n !Array.isArray(inputDefinition) &&\n Object.prototype.hasOwnProperty.call(inputDefinition, 'default')\n ) {\n acc[key] = inputDefinition.default;\n return acc;\n }\n\n if (\n inputDefinition === null ||\n inputDefinition === undefined ||\n (typeof inputDefinition === 'object' && !Array.isArray(inputDefinition))\n ) {\n return acc;\n }\n\n acc[key] = inputDefinition;\n return acc;\n },\n {} as Record<string, any>,\n );\n const rawInput = {\n ...defaultInput,\n ...requestedInput,\n };\n\n return this.expression.interpolate(rawInput, {\n execution: undefined as any,\n input: rawInput,\n variables: definitionDsl.variables ?? {},\n secrets,\n outputs: {},\n });\n }\n\n private resolveWorkflowVariables(\n definitionDsl: WorkflowDefinitionDsl,\n request: WorkflowExecutionRequest,\n input: Record<string, any>,\n secrets: Record<string, any>,\n ): Record<string, any> {\n const rawVariables = {\n ...(definitionDsl.variables ?? {}),\n ...(request.variables ?? {}),\n };\n\n return this.expression.interpolate(rawVariables, {\n execution: undefined as any,\n input,\n variables: rawVariables,\n secrets,\n outputs: {},\n });\n }\n\n private async runNodes(\n nodes: WorkflowNodeDefinition[],\n context: WorkflowRuntimeContext,\n ): Promise<Record<string, any>> {\n for (const node of nodes ?? []) {\n await this.runNode(node, context);\n }\n\n return context.outputs;\n }\n\n private async runNode(\n node: WorkflowNodeDefinition,\n context: WorkflowRuntimeContext,\n ): Promise<void> {\n const inputPayload = {\n configuration: node.configuration,\n input: context.input,\n variables: context.variables,\n item: context.item,\n index: context.index,\n };\n\n const step = await this.writer.createStep(\n context.execution,\n node,\n this.nextStepSequence(context),\n inputPayload,\n context.parentNodeId,\n context.parentStepExecutionKey,\n );\n\n if (node.disabled) {\n context.outputs[node.id] = { skipped: true };\n await this.writer.completeStep(step, 'skipped', context.outputs[node.id]);\n await this.writer.writeLog(context.execution, step, {\n level: 'debug',\n eventType: 'node.skipped',\n message: `Skipped disabled node ${node.id}.`,\n metadata: this.nodeLogMetadata(node, context, step),\n }, this.nextLogSequence(context));\n return;\n }\n\n try {\n await this.writer.writeLog(context.execution, step, {\n level: 'debug',\n eventType: 'node.started',\n message: `Starting node ${node.id} (${node.type}).`,\n metadata: this.nodeLogMetadata(node, context, step),\n }, this.nextLogSequence(context));\n\n this.logger.debug(\n `Starting workflow node ${node.id} (${node.type}) for execution ${context.execution.executionIdentifier}.`,\n );\n const startedAtMs = Date.now();\n const handler = this.registry.get(node.type);\n const result = await handler.execute({\n ...context,\n node,\n stepExecution: step,\n expression: this.expression,\n runNodes: async (childNodes, options = {}) =>\n this.runNodes(childNodes, {\n ...context,\n ...options,\n execution: context.execution,\n outputs: options.outputs ?? context.outputs,\n parentNodeId: node.id,\n parentStepExecutionKey: step.stepExecutionKey,\n }),\n emitLog: async (entry) => {\n await this.writer.writeLog(\n context.execution,\n step,\n entry,\n this.nextLogSequence(context),\n );\n },\n emitArtifact: async (entry) => {\n await this.writer.writeArtifact(context.execution, step, entry);\n },\n });\n\n const output = result.output ?? {};\n context.outputs[node.id] = output;\n\n for (const artifact of result.artifacts ?? []) {\n await this.writer.writeArtifact(context.execution, step, artifact);\n }\n\n await this.writer.completeStep(\n step,\n result.status ?? 'success',\n output,\n {\n item: context.item,\n index: context.index,\n },\n );\n\n await this.writer.writeLog(context.execution, step, {\n level: 'debug',\n eventType: 'node.completed',\n message: `Completed node ${node.id} (${node.type}).`,\n metadata: {\n ...this.nodeLogMetadata(node, context, step),\n status: result.status ?? 'success',\n durationMs: Date.now() - startedAtMs,\n outputSummary: this.summarizeValue(output),\n artifactCount: result.artifacts?.length ?? 0,\n },\n }, this.nextLogSequence(context));\n } catch (error) {\n await this.writer.failStep(step, error);\n\n if (node.onError === 'continue') {\n context.outputs[node.id] = {\n error: error instanceof Error ? error.message : String(error),\n };\n await this.writer.writeLog(context.execution, step, {\n level: 'warn',\n eventType: 'node.failed.continued',\n message: `Node ${node.id} failed but workflow continued: ${this.errorMessage(error)}.`,\n context: this.summarizeError(error),\n metadata: this.nodeLogMetadata(node, context, step),\n }, this.nextLogSequence(context));\n return;\n }\n\n await this.writer.writeLog(context.execution, step, {\n level: 'error',\n eventType: 'node.failed',\n message: `Node ${node.id} failed: ${this.errorMessage(error)}.`,\n context: this.summarizeError(error),\n metadata: this.nodeLogMetadata(node, context, step),\n }, this.nextLogSequence(context));\n throw error;\n }\n }\n\n private assertDefinitionYaml(value: any): WorkflowDefinitionDsl {\n if (!value || typeof value !== 'string') {\n throw new BadRequestException(\n 'Workflow definition YAML must be stored as a string.',\n );\n }\n\n let parsed: unknown;\n try {\n parsed = YAML.parse(value);\n } catch (error: any) {\n throw new BadRequestException(\n error?.message ?? 'Workflow definition YAML could not be parsed.',\n );\n }\n\n if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) {\n throw new BadRequestException(\n 'Workflow definition YAML must resolve to an object with a nodes array.',\n );\n }\n\n if (!Array.isArray((parsed as WorkflowDefinitionDsl).nodes)) {\n throw new BadRequestException(\n 'Workflow definition YAML must include a nodes array.',\n );\n }\n\n return parsed as WorkflowDefinitionDsl;\n }\n\n private readEnqueuedExecutionRequest(execution: WorkflowExecution): WorkflowExecutionRequest {\n const payload = execution.inputPayload;\n if (!payload || typeof payload !== 'object' || Array.isArray(payload)) {\n return {\n triggerType: execution.triggerType,\n requestedByUserId: execution.requestedByUserId as any,\n };\n }\n\n return {\n ...(payload as WorkflowExecutionRequest),\n triggerType: (payload as WorkflowExecutionRequest).triggerType ?? execution.triggerType,\n requestedByUserId:\n (payload as WorkflowExecutionRequest).requestedByUserId ??\n (execution.requestedByUserId as any),\n };\n }\n\n private async findExecutionOrThrow(executionId: number): Promise<WorkflowExecution> {\n const execution = await this.entityManager.findOne(WorkflowExecution, {\n where: { id: executionId } as any,\n });\n\n if (!execution) {\n throw new NotFoundException(`Workflow execution ${executionId} not found.`);\n }\n\n return execution;\n }\n\n private toStepOutputResponse(step: WorkflowStepExecution) {\n return {\n id: step.id,\n stepExecutionKey: step.stepExecutionKey,\n nodeId: step.nodeId,\n nodeName: step.nodeName,\n nodeType: step.nodeType,\n nodeKind: step.nodeKind,\n sequenceNumber: step.sequenceNumber,\n attemptNumber: step.attemptNumber,\n status: step.status,\n startedAt: step.startedAt,\n finishedAt: step.finishedAt,\n durationMs: step.durationMs as any,\n runtimeContext: step.runtimeContext,\n outputPayload: step.outputPayload,\n errorSummary: step.errorSummary,\n };\n }\n\n private buildPagedMeta(offset: number, limit: number, totalRecords: number) {\n const currentPage = limit ? Math.floor(offset / limit) + 1 : 1;\n const totalPages = limit ? Math.max(1, Math.ceil(totalRecords / limit)) : 1;\n return {\n totalRecords,\n currentPage,\n nextPage: currentPage < totalPages ? currentPage + 1 : null,\n prevPage: currentPage > 1 ? currentPage - 1 : null,\n totalPages,\n perPage: limit,\n };\n }\n\n private toResponse(execution: WorkflowExecution): WorkflowExecutionResponse {\n return {\n id: execution.id,\n executionIdentifier: execution.executionIdentifier,\n workflowKey: execution.workflowKey,\n status: execution.status as any,\n startedAt: execution.startedAt,\n finishedAt: execution.finishedAt,\n durationMs: execution.durationMs as any,\n outputPayload: execution.outputPayload,\n errorSummary: execution.errorSummary,\n };\n }\n\n private nextStepSequence(context: WorkflowRuntimeContext): number {\n context.counters = context.counters ?? { step: 0, log: 0 };\n context.counters.step += 1;\n return context.counters.step;\n }\n\n private nextLogSequence(context: WorkflowRuntimeContext): number {\n context.counters = context.counters ?? { step: 0, log: 0 };\n context.counters.log += 1;\n return context.counters.log;\n }\n\n private countNodes(nodes: WorkflowNodeDefinition[] = []): number {\n return nodes.reduce((count, node) => {\n const nestedNodes = [\n ...(node.tasks ?? []),\n ...(node.then ?? []),\n ...(node.else ?? []),\n ...(node.defaults ?? []),\n ...Object.values(node.cases ?? {}).flat(),\n ];\n\n return count + 1 + this.countNodes(nestedNodes);\n }, 0);\n }\n\n private nodeLogMetadata(\n node: WorkflowNodeDefinition,\n context: WorkflowRuntimeContext,\n step?: WorkflowStepExecution,\n ) {\n return {\n executionIdentifier: context.execution.executionIdentifier,\n stepExecutionKey: step?.stepExecutionKey,\n nodeId: node.id,\n nodeName: node.name,\n nodeType: node.type,\n nodeKind: node.kind,\n parentNodeId: context.parentNodeId,\n parentStepExecutionKey: context.parentStepExecutionKey,\n index: context.index,\n hasItem: context.item !== undefined,\n configurationKeys:\n node.configuration && typeof node.configuration === 'object'\n ? Object.keys(node.configuration)\n : [],\n availableInputKeys: Object.keys(context.input ?? {}),\n availableVariableKeys: Object.keys(context.variables ?? {}),\n availableOutputNodeIds: Object.keys(context.outputs ?? {}),\n };\n }\n\n private summarizeValue(value: any): any {\n if (Array.isArray(value)) {\n return {\n type: 'array',\n length: value.length,\n };\n }\n\n if (value && typeof value === 'object') {\n return {\n type: 'object',\n keys: Object.keys(value),\n };\n }\n\n return {\n type: value === null ? 'null' : typeof value,\n empty: value === undefined || value === null || value === '',\n };\n }\n\n private errorMessage(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n }\n\n private summarizeError(error: unknown): any {\n if (error instanceof Error) {\n return {\n name: error.name,\n message: error.message,\n stack: error.stack,\n };\n }\n\n return { error };\n }\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ScheduledJob } from '../../entities/scheduled-job.entity';
|
|
2
|
+
import { IScheduledJob } from '../../services/scheduled-jobs/scheduled-job.interface';
|
|
3
|
+
import { WorkflowDefinitionService } from '../workflow-definition.service';
|
|
4
|
+
export declare class WorkflowScheduledTriggerJobService implements IScheduledJob {
|
|
5
|
+
private readonly workflowDefinitionService;
|
|
6
|
+
private readonly logger;
|
|
7
|
+
constructor(workflowDefinitionService: WorkflowDefinitionService);
|
|
8
|
+
execute(job: ScheduledJob): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=workflow-scheduled-trigger.job.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-scheduled-trigger.job.d.ts","sourceRoot":"","sources":["../../../src/services/workflow/workflow-scheduled-trigger.job.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,qDAAqD,CAAC;AACpF,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAE3E,qBAEa,kCAAmC,YAAW,aAAa;IAIpE,OAAO,CAAC,QAAQ,CAAC,yBAAyB;IAH5C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuD;gBAG3D,yBAAyB,EAAE,yBAAyB;IAGjE,OAAO,CAAC,GAAG,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;CAiBhD"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var WorkflowScheduledTriggerJobService_1;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.WorkflowScheduledTriggerJobService = void 0;
|
|
14
|
+
const common_1 = require("@nestjs/common");
|
|
15
|
+
const scheduled_job_provider_decorator_1 = require("../../decorators/scheduled-job-provider.decorator");
|
|
16
|
+
const workflow_definition_service_1 = require("../workflow-definition.service");
|
|
17
|
+
let WorkflowScheduledTriggerJobService = WorkflowScheduledTriggerJobService_1 = class WorkflowScheduledTriggerJobService {
|
|
18
|
+
constructor(workflowDefinitionService) {
|
|
19
|
+
this.workflowDefinitionService = workflowDefinitionService;
|
|
20
|
+
this.logger = new common_1.Logger(WorkflowScheduledTriggerJobService_1.name);
|
|
21
|
+
}
|
|
22
|
+
async execute(job) {
|
|
23
|
+
const now = new Date();
|
|
24
|
+
const windowStart = job.lastRunAt instanceof Date
|
|
25
|
+
? job.lastRunAt
|
|
26
|
+
: new Date(now.getTime() - 5 * 60 * 1000);
|
|
27
|
+
const result = await this.workflowDefinitionService.executeDueScheduledTriggers(windowStart, now);
|
|
28
|
+
this.logger.log(`Evaluated ${result.evaluated} scheduled workflow trigger(s), triggered ${result.triggered}, skipped ${result.skipped}.`);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
exports.WorkflowScheduledTriggerJobService = WorkflowScheduledTriggerJobService;
|
|
32
|
+
exports.WorkflowScheduledTriggerJobService = WorkflowScheduledTriggerJobService = WorkflowScheduledTriggerJobService_1 = __decorate([
|
|
33
|
+
(0, common_1.Injectable)(),
|
|
34
|
+
(0, scheduled_job_provider_decorator_1.ScheduledJobProvider)(),
|
|
35
|
+
__metadata("design:paramtypes", [workflow_definition_service_1.WorkflowDefinitionService])
|
|
36
|
+
], WorkflowScheduledTriggerJobService);
|
|
37
|
+
//# sourceMappingURL=workflow-scheduled-trigger.job.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-scheduled-trigger.job.js","sourceRoot":"","sources":["../../../src/services/workflow/workflow-scheduled-trigger.job.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,wGAAuF;AAGvF,gFAA2E;AAIpE,IAAM,kCAAkC,0CAAxC,MAAM,kCAAkC;IAG7C,YACmB,yBAAoD;QAApD,8BAAyB,GAAzB,yBAAyB,CAA2B;QAHtD,WAAM,GAAG,IAAI,eAAM,CAAC,oCAAkC,CAAC,IAAI,CAAC,CAAC;IAI3E,CAAC;IAEJ,KAAK,CAAC,OAAO,CAAC,GAAiB;QAC7B,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,WAAW,GACf,GAAG,CAAC,SAAS,YAAY,IAAI;YAC3B,CAAC,CAAC,GAAG,CAAC,SAAS;YACf,CAAC,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;QAE9C,MAAM,MAAM,GACV,MAAM,IAAI,CAAC,yBAAyB,CAAC,2BAA2B,CAC9D,WAAW,EACX,GAAG,CACJ,CAAC;QAEJ,IAAI,CAAC,MAAM,CAAC,GAAG,CACb,aAAa,MAAM,CAAC,SAAS,6CAA6C,MAAM,CAAC,SAAS,aAAa,MAAM,CAAC,OAAO,GAAG,CACzH,CAAC;IACJ,CAAC;CACF,CAAA;AAxBY,gFAAkC;6CAAlC,kCAAkC;IAF9C,IAAA,mBAAU,GAAE;IACZ,IAAA,uDAAoB,GAAE;qCAKyB,uDAAyB;GAJ5D,kCAAkC,CAwB9C","sourcesContent":["import { Injectable, Logger } from '@nestjs/common';\nimport { ScheduledJobProvider } from 'src/decorators/scheduled-job-provider.decorator';\nimport { ScheduledJob } from 'src/entities/scheduled-job.entity';\nimport { IScheduledJob } from 'src/services/scheduled-jobs/scheduled-job.interface';\nimport { WorkflowDefinitionService } from '../workflow-definition.service';\n\n@Injectable()\n@ScheduledJobProvider()\nexport class WorkflowScheduledTriggerJobService implements IScheduledJob {\n private readonly logger = new Logger(WorkflowScheduledTriggerJobService.name);\n\n constructor(\n private readonly workflowDefinitionService: WorkflowDefinitionService,\n ) {}\n\n async execute(job: ScheduledJob): Promise<void> {\n const now = new Date();\n const windowStart =\n job.lastRunAt instanceof Date\n ? job.lastRunAt\n : new Date(now.getTime() - 5 * 60 * 1000);\n\n const result =\n await this.workflowDefinitionService.executeDueScheduledTriggers(\n windowStart,\n now,\n );\n\n this.logger.log(\n `Evaluated ${result.evaluated} scheduled workflow trigger(s), triggered ${result.triggered}, skipped ${result.skipped}.`,\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ModuleRef } from "@nestjs/core";
|
|
2
|
+
import { EntityManager } from 'typeorm';
|
|
3
|
+
import { CRUDService } from '../services/crud.service';
|
|
4
|
+
import { WorkflowDefinition } from '../entities/workflow-definition.entity';
|
|
5
|
+
import { WorkflowDefinitionRepository } from '../repository/workflow-definition.repository';
|
|
6
|
+
import { ExecuteWorkflowDto } from '../dtos/execute-workflow.dto';
|
|
7
|
+
import { WorkflowRuntimeService } from './workflow/workflow-runtime.service';
|
|
8
|
+
import { WorkflowDefinitionValidatorService } from './workflow/workflow-definition-validator.service';
|
|
9
|
+
import { WorkflowDefinitionMetadataSyncService } from './workflow/workflow-definition-metadata-sync.service';
|
|
10
|
+
export declare class WorkflowDefinitionService extends CRUDService<WorkflowDefinition> {
|
|
11
|
+
readonly entityManager: EntityManager;
|
|
12
|
+
readonly repo: WorkflowDefinitionRepository;
|
|
13
|
+
readonly moduleRef: ModuleRef;
|
|
14
|
+
private readonly workflowRuntimeService;
|
|
15
|
+
private readonly workflowDefinitionValidator;
|
|
16
|
+
private readonly workflowDefinitionMetadataSyncService;
|
|
17
|
+
constructor(entityManager: EntityManager, repo: WorkflowDefinitionRepository, moduleRef: ModuleRef, workflowRuntimeService: WorkflowRuntimeService, workflowDefinitionValidator: WorkflowDefinitionValidatorService, workflowDefinitionMetadataSyncService: WorkflowDefinitionMetadataSyncService);
|
|
18
|
+
create(createDto: any, files?: Express.Multer.File[], solidRequestContext?: any): Promise<WorkflowDefinition>;
|
|
19
|
+
insertMany(createDtos: any[], filesArray?: Express.Multer.File[][], solidRequestContext?: any): Promise<WorkflowDefinition[]>;
|
|
20
|
+
update(id: number, updateDto: any, files?: Express.Multer.File[], isPartialUpdate?: boolean, solidRequestContext?: any, isUpdate?: boolean): Promise<WorkflowDefinition>;
|
|
21
|
+
delete(id: number, solidRequestContext?: any): Promise<WorkflowDefinition>;
|
|
22
|
+
deleteMany(ids: number[], solidRequestContext?: any): Promise<any>;
|
|
23
|
+
recover(id: number, solidRequestContext?: any): Promise<{
|
|
24
|
+
message: string;
|
|
25
|
+
data: WorkflowDefinition;
|
|
26
|
+
}>;
|
|
27
|
+
recoverMany(ids: number[], solidRequestContext?: any): Promise<{
|
|
28
|
+
message: string;
|
|
29
|
+
recoveredIds: number[];
|
|
30
|
+
}>;
|
|
31
|
+
validateWorkflowDefinition(definitionYaml: string): {
|
|
32
|
+
valid: boolean;
|
|
33
|
+
message: string;
|
|
34
|
+
};
|
|
35
|
+
executeWorkflow(id: number, request: ExecuteWorkflowDto): Promise<import("../types/workflow-dsl.types").WorkflowExecutionResponse>;
|
|
36
|
+
executeWorkflowAsync(id: number, request: ExecuteWorkflowDto): Promise<import("../types/workflow-dsl.types").WorkflowExecutionResponse>;
|
|
37
|
+
executeWorkflowByKey(key: string, request: ExecuteWorkflowDto): Promise<import("../types/workflow-dsl.types").WorkflowExecutionResponse>;
|
|
38
|
+
executeWorkflowByKeyAsync(key: string, request: ExecuteWorkflowDto): Promise<import("../types/workflow-dsl.types").WorkflowExecutionResponse>;
|
|
39
|
+
executeWorkflowWebhook(reference: string, request: ExecuteWorkflowDto): Promise<import("../types/workflow-dsl.types").WorkflowExecutionResponse>;
|
|
40
|
+
executeDueScheduledTriggers(windowStart: Date, now?: Date): Promise<{
|
|
41
|
+
evaluated: number;
|
|
42
|
+
triggered: number;
|
|
43
|
+
skipped: number;
|
|
44
|
+
}>;
|
|
45
|
+
private parseDefinitionYaml;
|
|
46
|
+
private safeParseDefinitionYaml;
|
|
47
|
+
private findDefinitionByReference;
|
|
48
|
+
private loadDefinitionWithModule;
|
|
49
|
+
private isScheduleTriggerDue;
|
|
50
|
+
private buildDefaultInputPayload;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=workflow-definition.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-definition.service.d.ts","sourceRoot":"","sources":["../../src/services/workflow-definition.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAG,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,4BAA4B,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C;IAWxB,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,mBAAmB,GAAE,GAAQ;IAOhD,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,mBAAmB,GAAE,GAAQ,GAAG,OAAO,CAAC,GAAG,CAAC;IAYtE,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,mBAAmB,GAAE,GAAQ;;;;IAOjD,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,mBAAmB,GAAE,GAAQ;;;;IAY9D,0BAA0B,CAAC,cAAc,EAAE,MAAM;;;;IASjD,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB;IAIvD,oBAAoB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB;IAI5D,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB;IAI7D,yBAAyB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB;IAI5D,sBAAsB,CAC1B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,kBAAkB;IAyBvB,2BAA2B,CAC/B,WAAW,EAAE,IAAI,EACjB,GAAG,OAAa,GACf,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAwCrE,OAAO,CAAC,mBAAmB;IAc3B,OAAO,CAAC,uBAAuB;YAQjB,yBAAyB;YAuBzB,wBAAwB;IActC,OAAO,CAAC,oBAAoB;IAuB5B,OAAO,CAAC,wBAAwB;CAUjC"}
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
15
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.WorkflowDefinitionService = void 0;
|
|
19
|
+
const common_1 = require("@nestjs/common");
|
|
20
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
21
|
+
const core_1 = require("@nestjs/core");
|
|
22
|
+
const typeorm_2 = require("typeorm");
|
|
23
|
+
const crud_service_1 = require("./crud.service");
|
|
24
|
+
const workflow_definition_entity_1 = require("../entities/workflow-definition.entity");
|
|
25
|
+
const workflow_definition_repository_1 = require("../repository/workflow-definition.repository");
|
|
26
|
+
const workflow_runtime_service_1 = require("./workflow/workflow-runtime.service");
|
|
27
|
+
const workflow_definition_validator_service_1 = require("./workflow/workflow-definition-validator.service");
|
|
28
|
+
const cron_parser_1 = require("cron-parser");
|
|
29
|
+
const yaml_1 = __importDefault(require("yaml"));
|
|
30
|
+
const workflow_definition_metadata_sync_service_1 = require("./workflow/workflow-definition-metadata-sync.service");
|
|
31
|
+
let WorkflowDefinitionService = class WorkflowDefinitionService extends crud_service_1.CRUDService {
|
|
32
|
+
constructor(entityManager, repo, moduleRef, workflowRuntimeService, workflowDefinitionValidator, workflowDefinitionMetadataSyncService) {
|
|
33
|
+
super(entityManager, repo, 'workflowDefinition', 'solid-core', moduleRef);
|
|
34
|
+
this.entityManager = entityManager;
|
|
35
|
+
this.repo = repo;
|
|
36
|
+
this.moduleRef = moduleRef;
|
|
37
|
+
this.workflowRuntimeService = workflowRuntimeService;
|
|
38
|
+
this.workflowDefinitionValidator = workflowDefinitionValidator;
|
|
39
|
+
this.workflowDefinitionMetadataSyncService = workflowDefinitionMetadataSyncService;
|
|
40
|
+
}
|
|
41
|
+
async create(createDto, files = [], solidRequestContext = {}) {
|
|
42
|
+
const savedDefinition = await super.create(createDto, files, solidRequestContext);
|
|
43
|
+
const populatedDefinition = await this.loadDefinitionWithModule(savedDefinition.id);
|
|
44
|
+
await this.workflowDefinitionMetadataSyncService.upsertWorkflowDefinition(populatedDefinition);
|
|
45
|
+
return savedDefinition;
|
|
46
|
+
}
|
|
47
|
+
async insertMany(createDtos, filesArray = [], solidRequestContext = {}) {
|
|
48
|
+
const savedDefinitions = await super.insertMany(createDtos, filesArray, solidRequestContext);
|
|
49
|
+
for (const savedDefinition of savedDefinitions) {
|
|
50
|
+
const populatedDefinition = await this.loadDefinitionWithModule(savedDefinition.id);
|
|
51
|
+
await this.workflowDefinitionMetadataSyncService.upsertWorkflowDefinition(populatedDefinition);
|
|
52
|
+
}
|
|
53
|
+
return savedDefinitions;
|
|
54
|
+
}
|
|
55
|
+
async update(id, updateDto, files = [], isPartialUpdate = false, solidRequestContext = {}, isUpdate = false) {
|
|
56
|
+
const previousDefinition = await this.loadDefinitionWithModule(id);
|
|
57
|
+
const savedDefinition = await super.update(id, updateDto, files, isPartialUpdate, solidRequestContext, isUpdate);
|
|
58
|
+
const populatedDefinition = await this.loadDefinitionWithModule(savedDefinition.id);
|
|
59
|
+
await this.workflowDefinitionMetadataSyncService.upsertWorkflowDefinition(populatedDefinition, previousDefinition);
|
|
60
|
+
return savedDefinition;
|
|
61
|
+
}
|
|
62
|
+
async delete(id, solidRequestContext = {}) {
|
|
63
|
+
const previousDefinition = await this.loadDefinitionWithModule(id);
|
|
64
|
+
const result = await super.delete(id, solidRequestContext);
|
|
65
|
+
await this.workflowDefinitionMetadataSyncService.removeWorkflowDefinition(previousDefinition);
|
|
66
|
+
return result;
|
|
67
|
+
}
|
|
68
|
+
async deleteMany(ids, solidRequestContext = {}) {
|
|
69
|
+
const previousDefinitions = await this.entityManager.find(workflow_definition_entity_1.WorkflowDefinition, {
|
|
70
|
+
where: ids.map((id) => ({ id })),
|
|
71
|
+
relations: ['moduleMetadata'],
|
|
72
|
+
});
|
|
73
|
+
const result = await super.deleteMany(ids, solidRequestContext);
|
|
74
|
+
for (const previousDefinition of previousDefinitions) {
|
|
75
|
+
await this.workflowDefinitionMetadataSyncService.removeWorkflowDefinition(previousDefinition);
|
|
76
|
+
}
|
|
77
|
+
return result;
|
|
78
|
+
}
|
|
79
|
+
async recover(id, solidRequestContext = {}) {
|
|
80
|
+
const result = await super.recover(id, solidRequestContext);
|
|
81
|
+
const populatedDefinition = await this.loadDefinitionWithModule(id);
|
|
82
|
+
await this.workflowDefinitionMetadataSyncService.upsertWorkflowDefinition(populatedDefinition);
|
|
83
|
+
return result;
|
|
84
|
+
}
|
|
85
|
+
async recoverMany(ids, solidRequestContext = {}) {
|
|
86
|
+
const result = await super.recoverMany(ids, solidRequestContext);
|
|
87
|
+
const recoveredDefinitions = await this.entityManager.find(workflow_definition_entity_1.WorkflowDefinition, {
|
|
88
|
+
where: ids.map((id) => ({ id })),
|
|
89
|
+
relations: ['moduleMetadata'],
|
|
90
|
+
});
|
|
91
|
+
for (const recoveredDefinition of recoveredDefinitions) {
|
|
92
|
+
await this.workflowDefinitionMetadataSyncService.upsertWorkflowDefinition(recoveredDefinition);
|
|
93
|
+
}
|
|
94
|
+
return result;
|
|
95
|
+
}
|
|
96
|
+
validateWorkflowDefinition(definitionYaml) {
|
|
97
|
+
const definition = this.parseDefinitionYaml(definitionYaml);
|
|
98
|
+
this.workflowDefinitionValidator.validate(definition);
|
|
99
|
+
return {
|
|
100
|
+
valid: true,
|
|
101
|
+
message: 'Workflow definition is valid.',
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
executeWorkflow(id, request) {
|
|
105
|
+
return this.workflowRuntimeService.executeDefinitionById(id, request ?? {});
|
|
106
|
+
}
|
|
107
|
+
executeWorkflowAsync(id, request) {
|
|
108
|
+
return this.workflowRuntimeService.executeDefinitionByIdAsync(id, request ?? {});
|
|
109
|
+
}
|
|
110
|
+
executeWorkflowByKey(key, request) {
|
|
111
|
+
return this.workflowRuntimeService.executeDefinitionByKey(key, request ?? {});
|
|
112
|
+
}
|
|
113
|
+
executeWorkflowByKeyAsync(key, request) {
|
|
114
|
+
return this.workflowRuntimeService.executeDefinitionByKeyAsync(key, request ?? {});
|
|
115
|
+
}
|
|
116
|
+
async executeWorkflowWebhook(reference, request) {
|
|
117
|
+
const definition = await this.findDefinitionByReference(reference);
|
|
118
|
+
if (!definition) {
|
|
119
|
+
throw new common_1.BadRequestException('Workflow definition not found.');
|
|
120
|
+
}
|
|
121
|
+
const dsl = this.parseDefinitionYaml(definition.definitionYaml);
|
|
122
|
+
this.workflowDefinitionValidator.validate(dsl);
|
|
123
|
+
const hasActiveWebhook = (dsl.triggers ?? []).some((trigger) => trigger.type === 'webhook' && !trigger.disabled);
|
|
124
|
+
if (!hasActiveWebhook) {
|
|
125
|
+
throw new common_1.BadRequestException('Workflow does not have an active webhook trigger.');
|
|
126
|
+
}
|
|
127
|
+
return this.workflowRuntimeService.executeDefinitionById(definition.id, {
|
|
128
|
+
...(request ?? {}),
|
|
129
|
+
triggerType: 'webhook',
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
async executeDueScheduledTriggers(windowStart, now = new Date()) {
|
|
133
|
+
const definitions = await this.entityManager.find(workflow_definition_entity_1.WorkflowDefinition, {
|
|
134
|
+
where: { status: 'active' },
|
|
135
|
+
});
|
|
136
|
+
let evaluated = 0;
|
|
137
|
+
let triggered = 0;
|
|
138
|
+
let skipped = 0;
|
|
139
|
+
for (const definition of definitions) {
|
|
140
|
+
const dsl = this.safeParseDefinitionYaml(definition.definitionYaml);
|
|
141
|
+
if (!dsl) {
|
|
142
|
+
skipped += 1;
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
const triggers = (dsl.triggers ?? []).filter((trigger) => trigger.type === 'schedule' && !trigger.disabled);
|
|
146
|
+
for (const trigger of triggers) {
|
|
147
|
+
evaluated += 1;
|
|
148
|
+
if (!this.isScheduleTriggerDue(trigger, windowStart, now)) {
|
|
149
|
+
skipped += 1;
|
|
150
|
+
continue;
|
|
151
|
+
}
|
|
152
|
+
this.workflowDefinitionValidator.validate(dsl);
|
|
153
|
+
await this.workflowRuntimeService.executeDefinitionById(definition.id, {
|
|
154
|
+
input: this.buildDefaultInputPayload(dsl.inputs ?? {}),
|
|
155
|
+
triggerType: 'schedule',
|
|
156
|
+
});
|
|
157
|
+
triggered += 1;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return { evaluated, triggered, skipped };
|
|
161
|
+
}
|
|
162
|
+
parseDefinitionYaml(definitionYaml) {
|
|
163
|
+
try {
|
|
164
|
+
const parsed = yaml_1.default.parse(definitionYaml);
|
|
165
|
+
if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) {
|
|
166
|
+
throw new common_1.BadRequestException('Workflow definition YAML must resolve to an object.');
|
|
167
|
+
}
|
|
168
|
+
return parsed;
|
|
169
|
+
}
|
|
170
|
+
catch (error) {
|
|
171
|
+
throw new common_1.BadRequestException(error?.message ?? 'Workflow definition YAML could not be parsed.');
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
safeParseDefinitionYaml(definitionYaml) {
|
|
175
|
+
try {
|
|
176
|
+
return this.parseDefinitionYaml(definitionYaml);
|
|
177
|
+
}
|
|
178
|
+
catch {
|
|
179
|
+
return null;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
async findDefinitionByReference(reference) {
|
|
183
|
+
const trimmedReference = String(reference ?? '').trim();
|
|
184
|
+
if (!trimmedReference) {
|
|
185
|
+
throw new common_1.BadRequestException('Workflow reference is required.');
|
|
186
|
+
}
|
|
187
|
+
const numericId = Number(trimmedReference);
|
|
188
|
+
if (Number.isInteger(numericId) && numericId > 0) {
|
|
189
|
+
const byId = await this.entityManager.findOne(workflow_definition_entity_1.WorkflowDefinition, {
|
|
190
|
+
where: { id: numericId },
|
|
191
|
+
});
|
|
192
|
+
if (byId) {
|
|
193
|
+
return byId;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
return this.entityManager.findOne(workflow_definition_entity_1.WorkflowDefinition, {
|
|
197
|
+
where: { key: trimmedReference },
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
async loadDefinitionWithModule(id) {
|
|
201
|
+
const definition = await this.entityManager.findOne(workflow_definition_entity_1.WorkflowDefinition, {
|
|
202
|
+
where: { id },
|
|
203
|
+
relations: ['moduleMetadata'],
|
|
204
|
+
withDeleted: true,
|
|
205
|
+
});
|
|
206
|
+
if (!definition) {
|
|
207
|
+
throw new common_1.BadRequestException(`Workflow definition ${id} not found.`);
|
|
208
|
+
}
|
|
209
|
+
return definition;
|
|
210
|
+
}
|
|
211
|
+
isScheduleTriggerDue(trigger, windowStart, now) {
|
|
212
|
+
const cronExpression = trigger.configuration?.cronExpression ?? trigger.configuration?.cron;
|
|
213
|
+
if (!cronExpression || typeof cronExpression !== 'string') {
|
|
214
|
+
return false;
|
|
215
|
+
}
|
|
216
|
+
try {
|
|
217
|
+
const interval = cron_parser_1.CronExpressionParser.parse(cronExpression, {
|
|
218
|
+
currentDate: windowStart,
|
|
219
|
+
tz: trigger.configuration?.timezone ?? 'UTC',
|
|
220
|
+
});
|
|
221
|
+
const nextRun = interval.next().toDate();
|
|
222
|
+
return nextRun.getTime() <= now.getTime();
|
|
223
|
+
}
|
|
224
|
+
catch {
|
|
225
|
+
return false;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
buildDefaultInputPayload(inputs) {
|
|
229
|
+
return Object.entries(inputs).reduce((acc, [key, value]) => {
|
|
230
|
+
if (value && typeof value === 'object' && !Array.isArray(value)) {
|
|
231
|
+
acc[key] = value.default;
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
acc[key] = value;
|
|
235
|
+
}
|
|
236
|
+
return acc;
|
|
237
|
+
}, {});
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
exports.WorkflowDefinitionService = WorkflowDefinitionService;
|
|
241
|
+
exports.WorkflowDefinitionService = WorkflowDefinitionService = __decorate([
|
|
242
|
+
(0, common_1.Injectable)(),
|
|
243
|
+
__param(0, (0, typeorm_1.InjectEntityManager)("default")),
|
|
244
|
+
__metadata("design:paramtypes", [typeorm_2.EntityManager,
|
|
245
|
+
workflow_definition_repository_1.WorkflowDefinitionRepository,
|
|
246
|
+
core_1.ModuleRef,
|
|
247
|
+
workflow_runtime_service_1.WorkflowRuntimeService,
|
|
248
|
+
workflow_definition_validator_service_1.WorkflowDefinitionValidatorService,
|
|
249
|
+
workflow_definition_metadata_sync_service_1.WorkflowDefinitionMetadataSyncService])
|
|
250
|
+
], WorkflowDefinitionService);
|
|
251
|
+
//# sourceMappingURL=workflow-definition.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-definition.service.js","sourceRoot":"","sources":["../../src/services/workflow-definition.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2CAAiE;AACjE,6CAAsD;AACtD,uCAA0C;AAC1C,qCAAwC;AACxC,iDAAwD;AACxD,uFAA4E;AAC5E,iGAA4F;AAE5F,kFAA6E;AAK7E,4GAAsG;AACtG,6CAAmD;AACnD,gDAAwB;AACxB,oHAA6G;AAGtG,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,0BAA+B;IAC5E,YAEW,aAA4B,EAC5B,IAAkC,EAClC,SAAoB,EACZ,sBAA8C,EAC9C,2BAA+D,EA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1D,WAAW,EAAE,WAAW;gBACxB,EAAE,EAAE,OAAO,CAAC,aAAa,EAAE,QAAQ,IAAI,KAAK;aAC7C,CAAC,CAAC;YACH,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,CAAC;YACzC,OAAO,OAAO,CAAC,OAAO,EAAE,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;QAC5C,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAEO,wBAAwB,CAAC,MAA2B;QAC1D,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAsB,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YAC9E,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;gBAChE,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;YAC3B,CAAC;iBAAM,CAAC;gBACN,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;YACnB,CAAC;YACD,OAAO,GAAG,CAAC;QACb,CAAC,EAAE,EAAE,CAAC,CAAC;IACT,CAAC;CACF,CAAA;AAjRY,8DAAyB;oCAAzB,yBAAyB;IADrC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,6BAAmB,EAAC,SAAS,CAAC,CAAA;qCACP,uBAAa;QACtB,6DAA4B;QACvB,gBAAS;QACY,iDAAsB;QACjB,0EAAkC;QACxB,iFAAqC;GARpF,yBAAyB,CAiRrC","sourcesContent":["import { BadRequestException, Injectable } from '@nestjs/common';\nimport { InjectEntityManager } from '@nestjs/typeorm';\nimport { ModuleRef } from \"@nestjs/core\";\nimport { EntityManager } from 'typeorm';\nimport { CRUDService } from 'src/services/crud.service';\nimport { WorkflowDefinition } from '../entities/workflow-definition.entity';\nimport { WorkflowDefinitionRepository } from '../repository/workflow-definition.repository';\nimport { ExecuteWorkflowDto } from '../dtos/execute-workflow.dto';\nimport { WorkflowRuntimeService } from './workflow/workflow-runtime.service';\nimport {\n WorkflowDefinitionDsl,\n WorkflowTriggerDefinition,\n} from '../types/workflow-dsl.types';\nimport { WorkflowDefinitionValidatorService } from './workflow/workflow-definition-validator.service';\nimport { CronExpressionParser } from 'cron-parser';\nimport YAML from 'yaml';\nimport { WorkflowDefinitionMetadataSyncService } from './workflow/workflow-definition-metadata-sync.service';\n\n@Injectable()\nexport class WorkflowDefinitionService extends CRUDService<WorkflowDefinition>{\n constructor(\n @InjectEntityManager(\"default\")\n readonly entityManager: EntityManager,\n readonly repo: WorkflowDefinitionRepository,\n readonly moduleRef: ModuleRef,\n private readonly workflowRuntimeService: WorkflowRuntimeService,\n private readonly workflowDefinitionValidator: WorkflowDefinitionValidatorService,\n private readonly workflowDefinitionMetadataSyncService: WorkflowDefinitionMetadataSyncService,\n \n ) {\n super(entityManager, repo, 'workflowDefinition', 'solid-core', moduleRef);\n }\n\n async create(createDto: any, files: Express.Multer.File[] = [], solidRequestContext: any = {}): Promise<WorkflowDefinition> {\n const savedDefinition = await super.create(createDto, files, solidRequestContext);\n const populatedDefinition = await this.loadDefinitionWithModule(savedDefinition.id);\n await this.workflowDefinitionMetadataSyncService.upsertWorkflowDefinition(populatedDefinition);\n return savedDefinition;\n }\n\n async insertMany(createDtos: any[], filesArray: Express.Multer.File[][] = [], solidRequestContext: any = {}): Promise<WorkflowDefinition[]> {\n const savedDefinitions = await super.insertMany(createDtos, filesArray, solidRequestContext);\n for (const savedDefinition of savedDefinitions) {\n const populatedDefinition = await this.loadDefinitionWithModule(savedDefinition.id);\n await this.workflowDefinitionMetadataSyncService.upsertWorkflowDefinition(populatedDefinition);\n }\n return savedDefinitions;\n }\n\n async update(\n id: number,\n updateDto: any,\n files: Express.Multer.File[] = [],\n isPartialUpdate = false,\n solidRequestContext: any = {},\n isUpdate = false,\n ): Promise<WorkflowDefinition> {\n const previousDefinition = await this.loadDefinitionWithModule(id);\n const savedDefinition = await super.update(id, updateDto, files, isPartialUpdate, solidRequestContext, isUpdate);\n const populatedDefinition = await this.loadDefinitionWithModule(savedDefinition.id);\n await this.workflowDefinitionMetadataSyncService.upsertWorkflowDefinition(\n populatedDefinition,\n previousDefinition,\n );\n return savedDefinition;\n }\n\n async delete(id: number, solidRequestContext: any = {}) {\n const previousDefinition = await this.loadDefinitionWithModule(id);\n const result = await super.delete(id, solidRequestContext);\n await this.workflowDefinitionMetadataSyncService.removeWorkflowDefinition(previousDefinition);\n return result;\n }\n\n async deleteMany(ids: number[], solidRequestContext: any = {}): Promise<any> {\n const previousDefinitions = await this.entityManager.find(WorkflowDefinition, {\n where: ids.map((id) => ({ id })) as any,\n relations: ['moduleMetadata'],\n });\n const result = await super.deleteMany(ids, solidRequestContext);\n for (const previousDefinition of previousDefinitions) {\n await this.workflowDefinitionMetadataSyncService.removeWorkflowDefinition(previousDefinition);\n }\n return result;\n }\n\n async recover(id: number, solidRequestContext: any = {}) {\n const result = await super.recover(id, solidRequestContext);\n const populatedDefinition = await this.loadDefinitionWithModule(id);\n await this.workflowDefinitionMetadataSyncService.upsertWorkflowDefinition(populatedDefinition);\n return result;\n }\n\n async recoverMany(ids: number[], solidRequestContext: any = {}) {\n const result = await super.recoverMany(ids, solidRequestContext);\n const recoveredDefinitions = await this.entityManager.find(WorkflowDefinition, {\n where: ids.map((id) => ({ id })) as any,\n relations: ['moduleMetadata'],\n });\n for (const recoveredDefinition of recoveredDefinitions) {\n await this.workflowDefinitionMetadataSyncService.upsertWorkflowDefinition(recoveredDefinition);\n }\n return result;\n }\n\n validateWorkflowDefinition(definitionYaml: string) {\n const definition = this.parseDefinitionYaml(definitionYaml);\n this.workflowDefinitionValidator.validate(definition);\n return {\n valid: true,\n message: 'Workflow definition is valid.',\n };\n }\n\n executeWorkflow(id: number, request: ExecuteWorkflowDto) {\n return this.workflowRuntimeService.executeDefinitionById(id, request ?? {});\n }\n\n executeWorkflowAsync(id: number, request: ExecuteWorkflowDto) {\n return this.workflowRuntimeService.executeDefinitionByIdAsync(id, request ?? {});\n }\n\n executeWorkflowByKey(key: string, request: ExecuteWorkflowDto) {\n return this.workflowRuntimeService.executeDefinitionByKey(key, request ?? {});\n }\n\n executeWorkflowByKeyAsync(key: string, request: ExecuteWorkflowDto) {\n return this.workflowRuntimeService.executeDefinitionByKeyAsync(key, request ?? {});\n }\n\n async executeWorkflowWebhook(\n reference: string,\n request: ExecuteWorkflowDto,\n ) {\n const definition = await this.findDefinitionByReference(reference);\n if (!definition) {\n throw new BadRequestException('Workflow definition not found.');\n }\n\n const dsl = this.parseDefinitionYaml(definition.definitionYaml);\n this.workflowDefinitionValidator.validate(dsl);\n\n const hasActiveWebhook = (dsl.triggers ?? []).some(\n (trigger) => trigger.type === 'webhook' && !trigger.disabled,\n );\n if (!hasActiveWebhook) {\n throw new BadRequestException(\n 'Workflow does not have an active webhook trigger.',\n );\n }\n\n return this.workflowRuntimeService.executeDefinitionById(definition.id, {\n ...(request ?? {}),\n triggerType: 'webhook',\n });\n }\n\n async executeDueScheduledTriggers(\n windowStart: Date,\n now = new Date(),\n ): Promise<{ evaluated: number; triggered: number; skipped: number }> {\n const definitions = await this.entityManager.find(WorkflowDefinition, {\n where: { status: 'active' } as any,\n });\n\n let evaluated = 0;\n let triggered = 0;\n let skipped = 0;\n\n for (const definition of definitions) {\n const dsl = this.safeParseDefinitionYaml(definition.definitionYaml);\n if (!dsl) {\n skipped += 1;\n continue;\n }\n\n const triggers = (dsl.triggers ?? []).filter(\n (trigger) => trigger.type === 'schedule' && !trigger.disabled,\n );\n\n for (const trigger of triggers) {\n evaluated += 1;\n\n if (!this.isScheduleTriggerDue(trigger, windowStart, now)) {\n skipped += 1;\n continue;\n }\n\n this.workflowDefinitionValidator.validate(dsl);\n await this.workflowRuntimeService.executeDefinitionById(definition.id, {\n input: this.buildDefaultInputPayload(dsl.inputs ?? {}),\n triggerType: 'schedule',\n });\n triggered += 1;\n }\n }\n\n return { evaluated, triggered, skipped };\n }\n\n private parseDefinitionYaml(definitionYaml: string): WorkflowDefinitionDsl {\n try {\n const parsed = YAML.parse(definitionYaml);\n if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) {\n throw new BadRequestException('Workflow definition YAML must resolve to an object.');\n }\n return parsed as WorkflowDefinitionDsl;\n } catch (error: any) {\n throw new BadRequestException(\n error?.message ?? 'Workflow definition YAML could not be parsed.',\n );\n }\n }\n\n private safeParseDefinitionYaml(definitionYaml: string): WorkflowDefinitionDsl | null {\n try {\n return this.parseDefinitionYaml(definitionYaml);\n } catch {\n return null;\n }\n }\n\n private async findDefinitionByReference(\n reference: string,\n ): Promise<WorkflowDefinition | null> {\n const trimmedReference = String(reference ?? '').trim();\n if (!trimmedReference) {\n throw new BadRequestException('Workflow reference is required.');\n }\n\n const numericId = Number(trimmedReference);\n if (Number.isInteger(numericId) && numericId > 0) {\n const byId = await this.entityManager.findOne(WorkflowDefinition, {\n where: { id: numericId } as any,\n });\n if (byId) {\n return byId;\n }\n }\n\n return this.entityManager.findOne(WorkflowDefinition, {\n where: { key: trimmedReference } as any,\n });\n }\n\n private async loadDefinitionWithModule(id: number): Promise<WorkflowDefinition> {\n const definition = await this.entityManager.findOne(WorkflowDefinition, {\n where: { id } as any,\n relations: ['moduleMetadata'],\n withDeleted: true,\n });\n\n if (!definition) {\n throw new BadRequestException(`Workflow definition ${id} not found.`);\n }\n\n return definition;\n }\n\n private isScheduleTriggerDue(\n trigger: WorkflowTriggerDefinition,\n windowStart: Date,\n now: Date,\n ): boolean {\n const cronExpression =\n trigger.configuration?.cronExpression ?? trigger.configuration?.cron;\n if (!cronExpression || typeof cronExpression !== 'string') {\n return false;\n }\n\n try {\n const interval = CronExpressionParser.parse(cronExpression, {\n currentDate: windowStart,\n tz: trigger.configuration?.timezone ?? 'UTC',\n });\n const nextRun = interval.next().toDate();\n return nextRun.getTime() <= now.getTime();\n } catch {\n return false;\n }\n }\n\n private buildDefaultInputPayload(inputs: Record<string, any>): Record<string, any> {\n return Object.entries(inputs).reduce<Record<string, any>>((acc, [key, value]) => {\n if (value && typeof value === 'object' && !Array.isArray(value)) {\n acc[key] = value.default;\n } else {\n acc[key] = value;\n }\n return acc;\n }, {});\n }\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ModuleRef } from "@nestjs/core";
|
|
2
|
+
import { EntityManager } from 'typeorm';
|
|
3
|
+
import { CRUDService } from '../services/crud.service';
|
|
4
|
+
import { WorkflowExecutionArtifact } from '../entities/workflow-execution-artifact.entity';
|
|
5
|
+
import { WorkflowExecutionArtifactRepository } from '../repository/workflow-execution-artifact.repository';
|
|
6
|
+
export declare class WorkflowExecutionArtifactService extends CRUDService<WorkflowExecutionArtifact> {
|
|
7
|
+
readonly entityManager: EntityManager;
|
|
8
|
+
readonly repo: WorkflowExecutionArtifactRepository;
|
|
9
|
+
readonly moduleRef: ModuleRef;
|
|
10
|
+
constructor(entityManager: EntityManager, repo: WorkflowExecutionArtifactRepository, moduleRef: ModuleRef);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=workflow-execution-artifact.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-execution-artifact.service.d.ts","sourceRoot":"","sources":["../../src/services/workflow-execution-artifact.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAG,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAC3F,OAAO,EAAE,mCAAmC,EAAE,MAAM,sDAAsD,CAAC;AAE3G,qBACa,gCAAiC,SAAQ,WAAW,CAAC,yBAAyB,CAAC;IAGxF,QAAQ,CAAC,aAAa,EAAE,aAAa;IACrC,QAAQ,CAAC,IAAI,EAAE,mCAAmC;IAClD,QAAQ,CAAC,SAAS,EAAE,SAAS;gBAFpB,aAAa,EAAE,aAAa,EAC5B,IAAI,EAAE,mCAAmC,EACzC,SAAS,EAAE,SAAS;CAKhC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.WorkflowExecutionArtifactService = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
18
|
+
const core_1 = require("@nestjs/core");
|
|
19
|
+
const typeorm_2 = require("typeorm");
|
|
20
|
+
const crud_service_1 = require("./crud.service");
|
|
21
|
+
const workflow_execution_artifact_repository_1 = require("../repository/workflow-execution-artifact.repository");
|
|
22
|
+
let WorkflowExecutionArtifactService = class WorkflowExecutionArtifactService extends crud_service_1.CRUDService {
|
|
23
|
+
constructor(entityManager, repo, moduleRef) {
|
|
24
|
+
super(entityManager, repo, 'workflowExecutionArtifact', 'solid-core', moduleRef);
|
|
25
|
+
this.entityManager = entityManager;
|
|
26
|
+
this.repo = repo;
|
|
27
|
+
this.moduleRef = moduleRef;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
exports.WorkflowExecutionArtifactService = WorkflowExecutionArtifactService;
|
|
31
|
+
exports.WorkflowExecutionArtifactService = WorkflowExecutionArtifactService = __decorate([
|
|
32
|
+
(0, common_1.Injectable)(),
|
|
33
|
+
__param(0, (0, typeorm_1.InjectEntityManager)("default")),
|
|
34
|
+
__metadata("design:paramtypes", [typeorm_2.EntityManager,
|
|
35
|
+
workflow_execution_artifact_repository_1.WorkflowExecutionArtifactRepository,
|
|
36
|
+
core_1.ModuleRef])
|
|
37
|
+
], WorkflowExecutionArtifactService);
|
|
38
|
+
//# sourceMappingURL=workflow-execution-artifact.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-execution-artifact.service.js","sourceRoot":"","sources":["../../src/services/workflow-execution-artifact.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAsD;AACtD,uCAA0C;AAC1C,qCAAwC;AACxC,iDAAwD;AAExD,iHAA2G;AAGpG,IAAM,gCAAgC,GAAtC,MAAM,gCAAiC,SAAQ,0BAAsC;IAC1F,YAEW,aAA4B,EAC5B,IAAyC,EACzC,SAAoB;QAG9B,KAAK,CAAC,aAAa,EAAE,IAAI,EAAE,2BAA2B,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;QALvE,kBAAa,GAAb,aAAa,CAAe;QAC5B,SAAI,GAAJ,IAAI,CAAqC;QACzC,cAAS,GAAT,SAAS,CAAW;IAIhC,CAAC;CACD,CAAA;AAVY,4EAAgC;2CAAhC,gCAAgC;IAD5C,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,6BAAmB,EAAC,SAAS,CAAC,CAAA;qCACP,uBAAa;QACtB,4EAAmC;QAC9B,gBAAS;GALpB,gCAAgC,CAU5C","sourcesContent":["import { Injectable } from '@nestjs/common';\nimport { InjectEntityManager } from '@nestjs/typeorm';\nimport { ModuleRef } from \"@nestjs/core\";\nimport { EntityManager } from 'typeorm';\nimport { CRUDService } from 'src/services/crud.service';\nimport { WorkflowExecutionArtifact } from '../entities/workflow-execution-artifact.entity';\nimport { WorkflowExecutionArtifactRepository } from '../repository/workflow-execution-artifact.repository';\n\n@Injectable()\nexport class WorkflowExecutionArtifactService extends CRUDService<WorkflowExecutionArtifact>{\n constructor(\n @InjectEntityManager(\"default\")\n readonly entityManager: EntityManager,\n readonly repo: WorkflowExecutionArtifactRepository,\n readonly moduleRef: ModuleRef,\n \n ) {\n super(entityManager, repo, 'workflowExecutionArtifact', 'solid-core', moduleRef);\n }\n}"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ModuleRef } from "@nestjs/core";
|
|
2
|
+
import { EntityManager } from 'typeorm';
|
|
3
|
+
import { CRUDService } from '../services/crud.service';
|
|
4
|
+
import { WorkflowExecutionLog } from '../entities/workflow-execution-log.entity';
|
|
5
|
+
import { WorkflowExecutionLogRepository } from '../repository/workflow-execution-log.repository';
|
|
6
|
+
export declare class WorkflowExecutionLogService extends CRUDService<WorkflowExecutionLog> {
|
|
7
|
+
readonly entityManager: EntityManager;
|
|
8
|
+
readonly repo: WorkflowExecutionLogRepository;
|
|
9
|
+
readonly moduleRef: ModuleRef;
|
|
10
|
+
constructor(entityManager: EntityManager, repo: WorkflowExecutionLogRepository, moduleRef: ModuleRef);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=workflow-execution-log.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-execution-log.service.d.ts","sourceRoot":"","sources":["../../src/services/workflow-execution-log.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAG,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,8BAA8B,EAAE,MAAM,iDAAiD,CAAC;AAEjG,qBACa,2BAA4B,SAAQ,WAAW,CAAC,oBAAoB,CAAC;IAG9E,QAAQ,CAAC,aAAa,EAAE,aAAa;IACrC,QAAQ,CAAC,IAAI,EAAE,8BAA8B;IAC7C,QAAQ,CAAC,SAAS,EAAE,SAAS;gBAFpB,aAAa,EAAE,aAAa,EAC5B,IAAI,EAAE,8BAA8B,EACpC,SAAS,EAAE,SAAS;CAKhC"}
|