UNPKG

@5minds/processcube_engine

Version:

The ProcessCube Engine. Stores and executes BPMNs.

341 lines • 35.4 kB
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 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; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var __param = (this && this.__param) || function (paramIndex, decorator) { return function (target, key) { decorator(target, key, paramIndex); } }; Object.defineProperty(exports, "__esModule", { value: true }); exports.FlowNodeHandlerFactory = void 0; const inversify_1 = require("inversify"); const processcube_engine_sdk_1 = require("@5minds/processcube_engine_sdk"); const IocRegistrations_1 = require("../../Contracts/IocRegistrations"); const ActivityHandler_1 = require("./ActivityHandlers/ActivityHandler"); const ConditionalBoundaryEventHandler_1 = require("./BoundaryEventHandlers/ConditionalBoundaryEventHandler"); const ErrorBoundaryEventHandler_1 = require("./BoundaryEventHandlers/ErrorBoundaryEventHandler"); const EscalationBoundaryEventHandler_1 = require("./BoundaryEventHandlers/EscalationBoundaryEventHandler"); const MessageBoundaryEventHandler_1 = require("./BoundaryEventHandlers/MessageBoundaryEventHandler"); const SignalBoundaryEventHandler_1 = require("./BoundaryEventHandlers/SignalBoundaryEventHandler"); const TimerBoundaryEventHandler_1 = require("./BoundaryEventHandlers/TimerBoundaryEventHandler"); const EndErrorEventHandler_1 = require("./EventHandlers/EndErrorEventHandler"); const EndEscalationEventHandler_1 = require("./EventHandlers/EndEscalationEventHandler"); const EndEventHandler_1 = require("./EventHandlers/EndEventHandler"); const EndMessageEventHandler_1 = require("./EventHandlers/EndMessageEventHandler"); const EndSignalEventHandler_1 = require("./EventHandlers/EndSignalEventHandler"); const EndTerminateEventHandler_1 = require("./EventHandlers/EndTerminateEventHandler"); const IntermediateConditionalCatchEventHandler_1 = require("./EventHandlers/IntermediateConditionalCatchEventHandler"); const IntermediateEmptyEventHandler_1 = require("./EventHandlers/IntermediateEmptyEventHandler"); const IntermediateEscalationThrowEventHandler_1 = require("./EventHandlers/IntermediateEscalationThrowEventHandler"); const IntermediateLinkCatchEventHandler_1 = require("./EventHandlers/IntermediateLinkCatchEventHandler"); const IntermediateLinkThrowEventHandler_1 = require("./EventHandlers/IntermediateLinkThrowEventHandler"); const IntermediateMessageCatchEventHandler_1 = require("./EventHandlers/IntermediateMessageCatchEventHandler"); const IntermediateMessageThrowEventHandler_1 = require("./EventHandlers/IntermediateMessageThrowEventHandler"); const IntermediateSignalCatchEventHandler_1 = require("./EventHandlers/IntermediateSignalCatchEventHandler"); const IntermediateSignalThrowEventHandler_1 = require("./EventHandlers/IntermediateSignalThrowEventHandler"); const IntermediateTimerCatchEventHandler_1 = require("./EventHandlers/IntermediateTimerCatchEventHandler"); const StartEventHandler_1 = require("./EventHandlers/StartEventHandler"); const StartMessageEventHandler_1 = require("./EventHandlers/StartMessageEventHandler"); const StartSignalEventHandler_1 = require("./EventHandlers/StartSignalEventHandler"); const StartTimerEventHandler_1 = require("./EventHandlers/StartTimerEventHandler"); const EventBasedGatewayHandler_1 = require("./GatewayHandlers/EventBasedGatewayHandler"); const ExclusiveGatewayHandler_1 = require("./GatewayHandlers/ExclusiveGatewayHandler"); const InclusiveJoinGatewayHandler_1 = require("./GatewayHandlers/InclusiveJoinGatewayHandler"); const InclusiveSplitGatewayHandler_1 = require("./GatewayHandlers/InclusiveSplitGatewayHandler"); const ParallelJoinGatewayHandler_1 = require("./GatewayHandlers/ParallelJoinGatewayHandler"); const ParallelSplitGatewayHandler_1 = require("./GatewayHandlers/ParallelSplitGatewayHandler"); let FlowNodeHandlerFactory = class FlowNodeHandlerFactory { container; constructor(container) { this.container = container; } create(flowNode, processInstance) { switch (flowNode.bpmnType) { case processcube_engine_sdk_1.BpmnType.intermediateCatchEvent: const catchEvent = flowNode; if (catchEvent.eventType === processcube_engine_sdk_1.EventType.linkEvent) { return this.createIntermediateLinkCatchEventHandler(catchEvent, processInstance); } if (catchEvent.eventType === processcube_engine_sdk_1.EventType.messageEvent) { return this.createIntermediateMessageCatchEventHandler(catchEvent, processInstance); } if (catchEvent.eventType === processcube_engine_sdk_1.EventType.signalEvent) { return this.createIntermediateSignalCatchEventHandler(catchEvent, processInstance); } if (catchEvent.eventType === processcube_engine_sdk_1.EventType.timerEvent) { return this.createIntermediateTimerCatchEventHandler(catchEvent, processInstance); } if (catchEvent.eventType === processcube_engine_sdk_1.EventType.conditionalEvent) { return this.createIntermediateConditionalCatchEventHandler(catchEvent, processInstance); } return this.createIntermediateEmptyEventHandler(catchEvent, processInstance); case processcube_engine_sdk_1.BpmnType.intermediateThrowEvent: const throwEvent = flowNode; if (throwEvent.eventType === processcube_engine_sdk_1.EventType.linkEvent) { return this.createIntermediateLinkThrowEventHandler(throwEvent, processInstance); } if (throwEvent.eventType === processcube_engine_sdk_1.EventType.messageEvent) { return this.createIntermediateMessageThrowEventHandler(throwEvent, processInstance); } if (throwEvent.eventType === processcube_engine_sdk_1.EventType.signalEvent) { return this.createIntermediateSignalThrowEventHandler(throwEvent, processInstance); } if (throwEvent.eventType === processcube_engine_sdk_1.EventType.escalationEvent) { return this.createIntermediateEscalationThrowEventHandler(throwEvent, processInstance); } return this.createIntermediateEmptyEventHandler(throwEvent, processInstance); case processcube_engine_sdk_1.BpmnType.startEvent: const startEvent = flowNode; if (startEvent.eventType === processcube_engine_sdk_1.EventType.messageEvent) { return this.createStartMessageEventHandler(startEvent, processInstance); } if (startEvent.eventType === processcube_engine_sdk_1.EventType.signalEvent) { return this.createStartSignalEventHandler(startEvent, processInstance); } if (startEvent.eventType === processcube_engine_sdk_1.EventType.timerEvent) { return this.createStartTimerEventHandler(startEvent, processInstance); } return this.createStartEventHandler(startEvent, processInstance); case processcube_engine_sdk_1.BpmnType.endEvent: const endEvent = flowNode; if (endEvent.eventType === processcube_engine_sdk_1.EventType.errorEvent) { return this.createErrorEndEventHandler(endEvent, processInstance); } if (endEvent.eventType === processcube_engine_sdk_1.EventType.messageEvent) { return this.createMessageEndEventHandler(endEvent, processInstance); } if (endEvent.eventType === processcube_engine_sdk_1.EventType.signalEvent) { return this.createSignalEndEventHandler(endEvent, processInstance); } if (endEvent.eventType === processcube_engine_sdk_1.EventType.terminateEvent) { return this.createTerminateEndEventHandler(endEvent, processInstance); } if (endEvent.eventType === processcube_engine_sdk_1.EventType.escalationEvent) { return this.createEscalationEndEventHandler(endEvent, processInstance); } return this.createEndEventHandler(endEvent, processInstance); case processcube_engine_sdk_1.BpmnType.eventBasedGateway: return this.createEventBasedGatewayHandler(flowNode, processInstance); case processcube_engine_sdk_1.BpmnType.exclusiveGateway: return this.createExclusiveGatewayHandler(flowNode, processInstance); case processcube_engine_sdk_1.BpmnType.parallelGateway: return this.createParallelGatewayHandler(flowNode, processInstance); case processcube_engine_sdk_1.BpmnType.inclusiveGateway: return this.createInclusiveGatewayHandler(flowNode, processInstance); case processcube_engine_sdk_1.BpmnType.businessRuleTask: case processcube_engine_sdk_1.BpmnType.callActivity: case processcube_engine_sdk_1.BpmnType.untypedTask: case processcube_engine_sdk_1.BpmnType.manualTask: case processcube_engine_sdk_1.BpmnType.receiveTask: case processcube_engine_sdk_1.BpmnType.scriptTask: case processcube_engine_sdk_1.BpmnType.sendTask: case processcube_engine_sdk_1.BpmnType.serviceTask: case processcube_engine_sdk_1.BpmnType.subProcess: case processcube_engine_sdk_1.BpmnType.userTask: return this.createActivityHandler(flowNode, processInstance); case processcube_engine_sdk_1.BpmnType.boundaryEvent: throw new processcube_engine_sdk_1.InternalServerError('Must use `createBoundaryEvent` to create BoundaryEventHandler instances.'); default: throw new processcube_engine_sdk_1.InternalServerError(`BPMN type \`${flowNode.bpmnType}\` is not supported.`, 'process'); } } createBoundaryEventHandler(boundaryEvent, processInstance, processTokenOfAttachedFlowNode) { switch (boundaryEvent.eventType) { case processcube_engine_sdk_1.EventType.errorEvent: return this.createErrorBoundaryEventHandler(boundaryEvent, processInstance, processTokenOfAttachedFlowNode); case processcube_engine_sdk_1.EventType.messageEvent: return this.createMessageBoundaryEventHandler(boundaryEvent, processInstance, processTokenOfAttachedFlowNode); case processcube_engine_sdk_1.EventType.signalEvent: return this.createSignalBoundaryEventHandler(boundaryEvent, processInstance, processTokenOfAttachedFlowNode); case processcube_engine_sdk_1.EventType.timerEvent: return this.createTimerBoundaryEventHandler(boundaryEvent, processInstance, processTokenOfAttachedFlowNode); case processcube_engine_sdk_1.EventType.conditionalEvent: return this.createConditionalBoundaryEventHandler(boundaryEvent, processInstance, processTokenOfAttachedFlowNode); case processcube_engine_sdk_1.EventType.escalationEvent: return this.createEscalationBoundaryEventHandler(boundaryEvent, processInstance, processTokenOfAttachedFlowNode); default: throw new processcube_engine_sdk_1.InternalServerError(`Invalid definition on BoundaryEvent ${boundaryEvent.id} detected.`, 'process'); } } createParallelGatewayHandler(gatewayModel, processInstance) { switch (gatewayModel.gatewayDirection) { case processcube_engine_sdk_1.Model.Gateways.GatewayDirection.Converging: const joinGatewayRegistration = `ParallelJoinGatewayHandlerInstance-${processInstance.getProcessInstanceId()}-${gatewayModel.id}`; // If a matching instance for the requested Join-Gateway already exists, return that one. if (this.container.isBound(joinGatewayRegistration)) { return this.container.get(joinGatewayRegistration); } // If no such instance exists, create a new one and store it in the container for later use. // This way, the Join-Gateway can be used across multiple parallel branches. const createdParallelJoinGatewayHandlerInstance = this.parallelJoinGatewayHandlerFactory(gatewayModel, processInstance); this.container.bind(joinGatewayRegistration).toConstantValue(createdParallelJoinGatewayHandlerInstance); return createdParallelJoinGatewayHandlerInstance; case processcube_engine_sdk_1.Model.Gateways.GatewayDirection.Diverging: return this.parallelSplitGatewayHandlerFactory(gatewayModel, processInstance); default: const unsupportedErrorMessage = `Parallel Gateway \`${gatewayModel.id}\` is not connected correctly.\n` + 'Only Split Gateways (one incoming and multiple outgoing Sequence Flows) and ' + 'Join Gateways (multiple incoming and one outgoing Sequence Flow) are supported.'; throw new processcube_engine_sdk_1.UnprocessableEntityError(unsupportedErrorMessage, 'process'); } } createInclusiveGatewayHandler(gatewayModel, processInstance) { switch (gatewayModel.gatewayDirection) { case processcube_engine_sdk_1.Model.Gateways.GatewayDirection.Converging: const joinGatewayRegistration = `InclusiveJoinGatewayHandlerInstance-${processInstance.getProcessInstanceId()}-${gatewayModel.id}`; // If a matching instance for the requested Join-Gateway already exists, return that one. if (this.container.isBound(joinGatewayRegistration)) { return this.container.get(joinGatewayRegistration); } // If no such instance exists, create a new one and store it in the container for later use. // This way, the Join-Gateway can be used across multiple inclusive branches. const createdInclusiveJoinGatewayHandlerInstance = this.inclusiveJoinGatewayHandlerFactory(gatewayModel, processInstance); this.container.bind(joinGatewayRegistration).toConstantValue(createdInclusiveJoinGatewayHandlerInstance); return createdInclusiveJoinGatewayHandlerInstance; case processcube_engine_sdk_1.Model.Gateways.GatewayDirection.Diverging: return this.inclusiveSplitGatewayHandlerFactory(gatewayModel, processInstance); default: const unsupportedErrorMessage = `Inclusive Gateway \`${gatewayModel.id}\` is not connected correctly.\n` + 'Only Split Gateways (one incoming and multiple outgoing Sequence Flows) and ' + 'Join Gateways (multiple incoming and one outgoing Sequence Flow) are supported.'; throw new processcube_engine_sdk_1.UnprocessableEntityError(unsupportedErrorMessage, 'process'); } } createActivityHandler(model, processInstance) { const handler = new ActivityHandler_1.ActivityHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), processInstance, model); return handler; } createStartEventHandler(startEventModel, processInstance) { const handler = new StartEventHandler_1.StartEventHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), startEventModel, processInstance); return handler; } createStartMessageEventHandler(startEventModel, processInstance) { const handler = new StartMessageEventHandler_1.StartMessageEventHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), startEventModel, processInstance); return handler; } createStartSignalEventHandler(startEventModel, processInstance) { const handler = new StartSignalEventHandler_1.StartSignalEventHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), startEventModel, processInstance); return handler; } createStartTimerEventHandler(startEventModel, processInstance) { const handler = new StartTimerEventHandler_1.StartTimerEventHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.services.TimerFacade), startEventModel, processInstance); return handler; } createEndEventHandler(endEventModel, processInstance) { const handler = new EndEventHandler_1.EndEventHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), endEventModel, processInstance); return handler; } createErrorEndEventHandler(endEventModel, processInstance) { const handler = new EndErrorEventHandler_1.EndErrorEventHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), endEventModel, processInstance); return handler; } createMessageEndEventHandler(endEventModel, processInstance) { const handler = new EndMessageEventHandler_1.EndMessageEventHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), endEventModel, processInstance, this.container.get(IocRegistrations_1.IocRegistrationKeys.core.services.MessageEventService)); return handler; } createSignalEndEventHandler(endEventModel, processInstance) { const handler = new EndSignalEventHandler_1.EndSignalEventHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), endEventModel, processInstance, this.container.get(IocRegistrations_1.IocRegistrationKeys.core.services.SignalEventService)); return handler; } createEscalationEndEventHandler(endEventModel, processInstance) { const handler = new EndEscalationEventHandler_1.EndEscalationEventHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), endEventModel, processInstance, this.container.get(IocRegistrations_1.IocRegistrationKeys.core.services.EscalationEventService)); return handler; } createTerminateEndEventHandler(endEventModel, processInstance) { const handler = new EndTerminateEventHandler_1.EndTerminateEventHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), endEventModel, processInstance); return handler; } createIntermediateEmptyEventHandler(intermediateEmptyEventModel, processInstance) { const handler = new IntermediateEmptyEventHandler_1.IntermediateEmptyEventHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), intermediateEmptyEventModel, processInstance); return handler; } createIntermediateLinkCatchEventHandler(intermediateLinkCatchEventModel, processInstance) { const handler = new IntermediateLinkCatchEventHandler_1.IntermediateLinkCatchEventHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), intermediateLinkCatchEventModel, processInstance); return handler; } createIntermediateLinkThrowEventHandler(intermediateLinkThrowEventModel, processInstance) { const handler = new IntermediateLinkThrowEventHandler_1.IntermediateLinkThrowEventHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), intermediateLinkThrowEventModel, processInstance); return handler; } createIntermediateMessageCatchEventHandler(intermediateMessageCatchEventModel, processInstance) { const handler = new IntermediateMessageCatchEventHandler_1.IntermediateMessageCatchEventHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), intermediateMessageCatchEventModel, processInstance, this.container.get(IocRegistrations_1.IocRegistrationKeys.core.services.MessageEventService)); return handler; } createIntermediateMessageThrowEventHandler(intermediateMessageThrowEventModel, processInstance) { const handler = new IntermediateMessageThrowEventHandler_1.IntermediateMessageThrowEventHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), intermediateMessageThrowEventModel, processInstance, this.container.get(IocRegistrations_1.IocRegistrationKeys.core.services.MessageEventService)); return handler; } createIntermediateSignalCatchEventHandler(intermediateSignalCatchEventModel, processInstance) { const handler = new IntermediateSignalCatchEventHandler_1.IntermediateSignalCatchEventHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), intermediateSignalCatchEventModel, processInstance, this.container.get(IocRegistrations_1.IocRegistrationKeys.core.services.SignalEventService)); return handler; } createIntermediateSignalThrowEventHandler(intermediateSignalThrowEventModel, processInstance) { const handler = new IntermediateSignalThrowEventHandler_1.IntermediateSignalThrowEventHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), intermediateSignalThrowEventModel, processInstance, this.container.get(IocRegistrations_1.IocRegistrationKeys.core.services.SignalEventService)); return handler; } createIntermediateEscalationThrowEventHandler(intermediateEscalationThrowEventModel, processInstance) { const handler = new IntermediateEscalationThrowEventHandler_1.IntermediateEscalationThrowEventHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), intermediateEscalationThrowEventModel, processInstance, this.container.get(IocRegistrations_1.IocRegistrationKeys.core.services.EscalationEventService)); return handler; } createIntermediateTimerCatchEventHandler(intermediateTimerCatchEventModel, processInstance) { const handler = new IntermediateTimerCatchEventHandler_1.IntermediateTimerCatchEventHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.services.TimerFacade), intermediateTimerCatchEventModel, processInstance); return handler; } createIntermediateConditionalCatchEventHandler(intermediateConditionalCatchEventModel, processInstance) { const handler = new IntermediateConditionalCatchEventHandler_1.IntermediateConditionalCatchEventHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), intermediateConditionalCatchEventModel, processInstance); return handler; } createEventBasedGatewayHandler(eventBasedGatewayModel, processInstance) { return new EventBasedGatewayHandler_1.EventBasedGatewayHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), eventBasedGatewayModel, processInstance); } createExclusiveGatewayHandler(exclusiveGatewayModel, processInstance) { const handler = new ExclusiveGatewayHandler_1.ExclusiveGatewayHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), exclusiveGatewayModel, processInstance); return handler; } parallelSplitGatewayHandlerFactory(parallelGatewayModel, processInstance) { const handler = new ParallelSplitGatewayHandler_1.ParallelSplitGatewayHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), parallelGatewayModel, processInstance); return handler; } parallelJoinGatewayHandlerFactory(parallelGatewayModel, processInstance) { const handler = new ParallelJoinGatewayHandler_1.ParallelJoinGatewayHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), parallelGatewayModel, processInstance); return handler; } inclusiveSplitGatewayHandlerFactory(inclusiveGatewayModel, processInstance) { const handler = new InclusiveSplitGatewayHandler_1.InclusiveSplitGatewayHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), inclusiveGatewayModel, processInstance); return handler; } inclusiveJoinGatewayHandlerFactory(inclusiveGatewayModel, processInstance) { const handler = new InclusiveJoinGatewayHandler_1.InclusiveJoinGatewayHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), inclusiveGatewayModel, processInstance); return handler; } createErrorBoundaryEventHandler(errorBoundaryEventModel, processInstance, processTokenOfAttachedFlowNode) { return new ErrorBoundaryEventHandler_1.ErrorBoundaryEventHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), errorBoundaryEventModel, processInstance, processTokenOfAttachedFlowNode); } createMessageBoundaryEventHandler(messageBoundaryEventModel, processInstance, processTokenOfAttachedFlowNode) { return new MessageBoundaryEventHandler_1.MessageBoundaryEventHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), messageBoundaryEventModel, processInstance, processTokenOfAttachedFlowNode, this.container.get(IocRegistrations_1.IocRegistrationKeys.core.services.MessageEventService)); } createSignalBoundaryEventHandler(signalBoundaryEventModel, processInstance, processTokenOfAttachedFlowNode) { return new SignalBoundaryEventHandler_1.SignalBoundaryEventHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), signalBoundaryEventModel, processInstance, processTokenOfAttachedFlowNode, this.container.get(IocRegistrations_1.IocRegistrationKeys.core.services.SignalEventService)); } createTimerBoundaryEventHandler(timerBoundaryEventModel, processInstance, processTokenOfAttachedFlowNode) { return new TimerBoundaryEventHandler_1.TimerBoundaryEventHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.services.TimerFacade), timerBoundaryEventModel, processInstance, processTokenOfAttachedFlowNode); } createConditionalBoundaryEventHandler(conditionalBoundaryEventModel, processInstance, processTokenOfAttachedFlowNode) { return new ConditionalBoundaryEventHandler_1.ConditionalBoundaryEventHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), conditionalBoundaryEventModel, processInstance, processTokenOfAttachedFlowNode); } createEscalationBoundaryEventHandler(escalationBoundaryEventModel, processInstance, processTokenOfAttachedFlowNode) { return new EscalationBoundaryEventHandler_1.EscalationBoundaryEventHandler(this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.EventMiddlewareHandler), this.container.get(IocRegistrations_1.IocRegistrationKeys.internal.FlowNodeInstanceDatabaseAdapter), this.container.get(IocRegistrations_1.IocRegistrationKeys.core.handlerFactories.FlowNodeHandlerFactory), escalationBoundaryEventModel, processInstance, processTokenOfAttachedFlowNode, this.container.get(IocRegistrations_1.IocRegistrationKeys.core.services.EscalationEventService)); } }; exports.FlowNodeHandlerFactory = FlowNodeHandlerFactory; exports.FlowNodeHandlerFactory = FlowNodeHandlerFactory = __decorate([ (0, inversify_1.injectable)(), __param(0, (0, inversify_1.inject)(IocRegistrations_1.IocRegistrationKeys.internal.Container)), __metadata("design:paramtypes", [inversify_1.Container]) ], FlowNodeHandlerFactory); //# sourceMappingURL=FlowNodeHandlerFactory.js.map