use of io.camunda.zeebe.engine.processing.bpmn.behavior.BpmnEventPublicationBehavior in project zeebe by zeebe-io.
the class EngineProcessors method createEngineProcessors.
public static TypedRecordProcessors createEngineProcessors(final ProcessingContext processingContext, final int partitionsCount, final SubscriptionCommandSender subscriptionCommandSender, final DeploymentDistributor deploymentDistributor, final DeploymentResponder deploymentResponder, final Consumer<String> onJobsAvailableCallback) {
final var actor = processingContext.getActor();
final MutableZeebeState zeebeState = processingContext.getZeebeState();
final var writers = processingContext.getWriters();
final TypedRecordProcessors typedRecordProcessors = TypedRecordProcessors.processors(zeebeState.getKeyGenerator(), writers);
// register listener that handles migrations immediately, so it is the first to be called
typedRecordProcessors.withListener(new DbMigrationController());
typedRecordProcessors.withListener(processingContext.getZeebeState());
final LogStream stream = processingContext.getLogStream();
final int partitionId = stream.getPartitionId();
final var variablesState = zeebeState.getVariableState();
final var expressionProcessor = new ExpressionProcessor(ExpressionLanguageFactory.createExpressionLanguage(), variablesState::getVariable);
final DueDateTimerChecker timerChecker = new DueDateTimerChecker(zeebeState.getTimerState());
final CatchEventBehavior catchEventBehavior = new CatchEventBehavior(zeebeState, expressionProcessor, subscriptionCommandSender, writers.state(), timerChecker, partitionsCount);
final var eventTriggerBehavior = new EventTriggerBehavior(zeebeState.getKeyGenerator(), catchEventBehavior, writers, zeebeState);
final var eventPublicationBehavior = new BpmnEventPublicationBehavior(zeebeState, zeebeState.getKeyGenerator(), eventTriggerBehavior, writers);
addDeploymentRelatedProcessorAndServices(catchEventBehavior, partitionId, zeebeState, typedRecordProcessors, deploymentResponder, expressionProcessor, writers, partitionsCount, actor, deploymentDistributor, zeebeState.getKeyGenerator());
addMessageProcessors(eventTriggerBehavior, subscriptionCommandSender, zeebeState, typedRecordProcessors, writers);
final var jobMetrics = new JobMetrics(partitionId);
final TypedRecordProcessor<ProcessInstanceRecord> bpmnStreamProcessor = addProcessProcessors(zeebeState, expressionProcessor, typedRecordProcessors, subscriptionCommandSender, catchEventBehavior, eventTriggerBehavior, writers, timerChecker, jobMetrics);
JobEventProcessors.addJobProcessors(typedRecordProcessors, zeebeState, onJobsAvailableCallback, eventPublicationBehavior, writers, jobMetrics, eventTriggerBehavior);
addIncidentProcessors(zeebeState, bpmnStreamProcessor, typedRecordProcessors, writers, zeebeState.getKeyGenerator());
return typedRecordProcessors;
}
use of io.camunda.zeebe.engine.processing.bpmn.behavior.BpmnEventPublicationBehavior in project zeebe by camunda-cloud.
the class EngineProcessors method createEngineProcessors.
public static TypedRecordProcessors createEngineProcessors(final ProcessingContext processingContext, final int partitionsCount, final SubscriptionCommandSender subscriptionCommandSender, final DeploymentDistributor deploymentDistributor, final DeploymentResponder deploymentResponder, final Consumer<String> onJobsAvailableCallback) {
final var actor = processingContext.getActor();
final MutableZeebeState zeebeState = processingContext.getZeebeState();
final var writers = processingContext.getWriters();
final TypedRecordProcessors typedRecordProcessors = TypedRecordProcessors.processors(zeebeState.getKeyGenerator(), writers);
// register listener that handles migrations immediately, so it is the first to be called
typedRecordProcessors.withListener(new DbMigrationController());
typedRecordProcessors.withListener(processingContext.getZeebeState());
final LogStream stream = processingContext.getLogStream();
final int partitionId = stream.getPartitionId();
final var variablesState = zeebeState.getVariableState();
final var expressionProcessor = new ExpressionProcessor(ExpressionLanguageFactory.createExpressionLanguage(), variablesState::getVariable);
final DueDateTimerChecker timerChecker = new DueDateTimerChecker(zeebeState.getTimerState());
final CatchEventBehavior catchEventBehavior = new CatchEventBehavior(zeebeState, expressionProcessor, subscriptionCommandSender, writers.state(), timerChecker, partitionsCount);
final var eventTriggerBehavior = new EventTriggerBehavior(zeebeState.getKeyGenerator(), catchEventBehavior, writers, zeebeState);
final var eventPublicationBehavior = new BpmnEventPublicationBehavior(zeebeState, zeebeState.getKeyGenerator(), eventTriggerBehavior, writers);
addDeploymentRelatedProcessorAndServices(catchEventBehavior, partitionId, zeebeState, typedRecordProcessors, deploymentResponder, expressionProcessor, writers, partitionsCount, actor, deploymentDistributor, zeebeState.getKeyGenerator());
addMessageProcessors(eventTriggerBehavior, subscriptionCommandSender, zeebeState, typedRecordProcessors, writers);
final var jobMetrics = new JobMetrics(partitionId);
final TypedRecordProcessor<ProcessInstanceRecord> bpmnStreamProcessor = addProcessProcessors(zeebeState, expressionProcessor, typedRecordProcessors, subscriptionCommandSender, catchEventBehavior, eventTriggerBehavior, writers, timerChecker, jobMetrics);
JobEventProcessors.addJobProcessors(typedRecordProcessors, zeebeState, onJobsAvailableCallback, eventPublicationBehavior, writers, jobMetrics, eventTriggerBehavior);
addIncidentProcessors(zeebeState, bpmnStreamProcessor, typedRecordProcessors, writers, zeebeState.getKeyGenerator());
return typedRecordProcessors;
}
use of io.camunda.zeebe.engine.processing.bpmn.behavior.BpmnEventPublicationBehavior in project zeebe by zeebe-io.
the class EngineProcessors method createEngineProcessors.
public static TypedRecordProcessors createEngineProcessors(final ProcessingContext processingContext, final int partitionsCount, final SubscriptionCommandSender subscriptionCommandSender, final DeploymentDistributor deploymentDistributor, final DeploymentResponder deploymentResponder, final Consumer<String> onJobsAvailableCallback, final FeatureFlags featureFlags) {
final var actor = processingContext.getActor();
final MutableZeebeState zeebeState = processingContext.getZeebeState();
final var writers = processingContext.getWriters();
final TypedRecordProcessors typedRecordProcessors = TypedRecordProcessors.processors(zeebeState.getKeyGenerator(), writers);
// register listener that handles migrations immediately, so it is the first to be called
typedRecordProcessors.withListener(new DbMigrationController());
typedRecordProcessors.withListener(processingContext.getZeebeState());
final LogStream stream = processingContext.getLogStream();
final int partitionId = stream.getPartitionId();
final var variablesState = zeebeState.getVariableState();
final var expressionProcessor = new ExpressionProcessor(ExpressionLanguageFactory.createExpressionLanguage(), new VariableStateEvaluationContextLookup(variablesState));
final DueDateTimerChecker timerChecker = new DueDateTimerChecker(zeebeState.getTimerState(), featureFlags);
final CatchEventBehavior catchEventBehavior = new CatchEventBehavior(zeebeState, zeebeState.getKeyGenerator(), expressionProcessor, subscriptionCommandSender, writers.state(), timerChecker, partitionsCount);
final var eventTriggerBehavior = new EventTriggerBehavior(zeebeState.getKeyGenerator(), catchEventBehavior, writers, zeebeState);
final var eventPublicationBehavior = new BpmnEventPublicationBehavior(zeebeState, zeebeState.getKeyGenerator(), eventTriggerBehavior, writers);
addDeploymentRelatedProcessorAndServices(catchEventBehavior, partitionId, zeebeState, typedRecordProcessors, deploymentResponder, expressionProcessor, writers, partitionsCount, actor, deploymentDistributor, zeebeState.getKeyGenerator());
addMessageProcessors(eventTriggerBehavior, subscriptionCommandSender, zeebeState, typedRecordProcessors, writers);
final var jobMetrics = new JobMetrics(partitionId);
final TypedRecordProcessor<ProcessInstanceRecord> bpmnStreamProcessor = addProcessProcessors(zeebeState, expressionProcessor, typedRecordProcessors, subscriptionCommandSender, catchEventBehavior, eventTriggerBehavior, writers, timerChecker, jobMetrics);
JobEventProcessors.addJobProcessors(typedRecordProcessors, zeebeState, onJobsAvailableCallback, eventPublicationBehavior, writers, jobMetrics, eventTriggerBehavior);
addIncidentProcessors(zeebeState, bpmnStreamProcessor, typedRecordProcessors, writers, zeebeState.getKeyGenerator());
return typedRecordProcessors;
}
use of io.camunda.zeebe.engine.processing.bpmn.behavior.BpmnEventPublicationBehavior in project zeebe by camunda-cloud.
the class EngineProcessors method createEngineProcessors.
public static TypedRecordProcessors createEngineProcessors(final ProcessingContext processingContext, final int partitionsCount, final SubscriptionCommandSender subscriptionCommandSender, final DeploymentDistributor deploymentDistributor, final DeploymentResponder deploymentResponder, final Consumer<String> onJobsAvailableCallback, final FeatureFlags featureFlags) {
final var actor = processingContext.getActor();
final MutableZeebeState zeebeState = processingContext.getZeebeState();
final var writers = processingContext.getWriters();
final TypedRecordProcessors typedRecordProcessors = TypedRecordProcessors.processors(zeebeState.getKeyGenerator(), writers);
// register listener that handles migrations immediately, so it is the first to be called
typedRecordProcessors.withListener(new DbMigrationController());
typedRecordProcessors.withListener(processingContext.getZeebeState());
final LogStream stream = processingContext.getLogStream();
final int partitionId = stream.getPartitionId();
final var variablesState = zeebeState.getVariableState();
final var expressionProcessor = new ExpressionProcessor(ExpressionLanguageFactory.createExpressionLanguage(), new VariableStateEvaluationContextLookup(variablesState));
final DueDateTimerChecker timerChecker = new DueDateTimerChecker(zeebeState.getTimerState(), featureFlags);
final CatchEventBehavior catchEventBehavior = new CatchEventBehavior(zeebeState, zeebeState.getKeyGenerator(), expressionProcessor, subscriptionCommandSender, writers.state(), timerChecker, partitionsCount);
final var eventTriggerBehavior = new EventTriggerBehavior(zeebeState.getKeyGenerator(), catchEventBehavior, writers, zeebeState);
final var eventPublicationBehavior = new BpmnEventPublicationBehavior(zeebeState, zeebeState.getKeyGenerator(), eventTriggerBehavior, writers);
addDeploymentRelatedProcessorAndServices(catchEventBehavior, partitionId, zeebeState, typedRecordProcessors, deploymentResponder, expressionProcessor, writers, partitionsCount, actor, deploymentDistributor, zeebeState.getKeyGenerator());
addMessageProcessors(eventTriggerBehavior, subscriptionCommandSender, zeebeState, typedRecordProcessors, writers);
final var jobMetrics = new JobMetrics(partitionId);
final TypedRecordProcessor<ProcessInstanceRecord> bpmnStreamProcessor = addProcessProcessors(zeebeState, expressionProcessor, typedRecordProcessors, subscriptionCommandSender, catchEventBehavior, eventTriggerBehavior, writers, timerChecker, jobMetrics);
JobEventProcessors.addJobProcessors(typedRecordProcessors, zeebeState, onJobsAvailableCallback, eventPublicationBehavior, writers, jobMetrics, eventTriggerBehavior);
addIncidentProcessors(zeebeState, bpmnStreamProcessor, typedRecordProcessors, writers, zeebeState.getKeyGenerator());
return typedRecordProcessors;
}
use of io.camunda.zeebe.engine.processing.bpmn.behavior.BpmnEventPublicationBehavior in project zeebe by camunda.
the class EngineProcessors method createEngineProcessors.
public static TypedRecordProcessors createEngineProcessors(final ProcessingContext processingContext, final int partitionsCount, final SubscriptionCommandSender subscriptionCommandSender, final DeploymentDistributor deploymentDistributor, final DeploymentResponder deploymentResponder, final Consumer<String> onJobsAvailableCallback) {
final var actor = processingContext.getActor();
final MutableZeebeState zeebeState = processingContext.getZeebeState();
final var writers = processingContext.getWriters();
final TypedRecordProcessors typedRecordProcessors = TypedRecordProcessors.processors(zeebeState.getKeyGenerator(), writers);
// register listener that handles migrations immediately, so it is the first to be called
typedRecordProcessors.withListener(new DbMigrationController());
typedRecordProcessors.withListener(processingContext.getZeebeState());
final LogStream stream = processingContext.getLogStream();
final int partitionId = stream.getPartitionId();
final var variablesState = zeebeState.getVariableState();
final var expressionProcessor = new ExpressionProcessor(ExpressionLanguageFactory.createExpressionLanguage(), variablesState::getVariable);
final DueDateTimerChecker timerChecker = new DueDateTimerChecker(zeebeState.getTimerState());
final CatchEventBehavior catchEventBehavior = new CatchEventBehavior(zeebeState, expressionProcessor, subscriptionCommandSender, writers.state(), timerChecker, partitionsCount);
final var eventTriggerBehavior = new EventTriggerBehavior(zeebeState.getKeyGenerator(), catchEventBehavior, writers, zeebeState);
final var eventPublicationBehavior = new BpmnEventPublicationBehavior(zeebeState, zeebeState.getKeyGenerator(), eventTriggerBehavior, writers);
addDeploymentRelatedProcessorAndServices(catchEventBehavior, partitionId, zeebeState, typedRecordProcessors, deploymentResponder, expressionProcessor, writers, partitionsCount, actor, deploymentDistributor, zeebeState.getKeyGenerator());
addMessageProcessors(eventTriggerBehavior, subscriptionCommandSender, zeebeState, typedRecordProcessors, writers);
final var jobMetrics = new JobMetrics(partitionId);
final TypedRecordProcessor<ProcessInstanceRecord> bpmnStreamProcessor = addProcessProcessors(zeebeState, expressionProcessor, typedRecordProcessors, subscriptionCommandSender, catchEventBehavior, eventTriggerBehavior, writers, timerChecker, jobMetrics);
JobEventProcessors.addJobProcessors(typedRecordProcessors, zeebeState, onJobsAvailableCallback, eventPublicationBehavior, writers, jobMetrics, eventTriggerBehavior);
addIncidentProcessors(zeebeState, bpmnStreamProcessor, typedRecordProcessors, writers, zeebeState.getKeyGenerator());
return typedRecordProcessors;
}
Aggregations