use of io.zeebe.broker.workflow.processor.WorkflowInstanceStreamProcessor in project zeebe by zeebe-io.
the class WorkflowQueueManagerService method installWorkflowStreamProcessor.
private void installWorkflowStreamProcessor(final LogStream logStream) {
final ServiceName<StreamProcessorController> streamProcessorServiceName = workflowInstanceStreamProcessorServiceName(logStream.getLogName());
final String streamProcessorName = streamProcessorServiceName.getName();
final ServerTransport transport = clientApiTransportInjector.getValue();
final CommandResponseWriter responseWriter = new CommandResponseWriter(transport.getOutput());
final ServiceName<LogStream> logStreamServiceName = logStreamServiceName(logStream.getLogName());
final ServerTransport managementServer = managementServerInjector.getValue();
final CreateWorkflowResponseSender createWorkflowResponseSender = new CreateWorkflowResponseSender(managementServer);
final WorkflowInstanceStreamProcessor workflowInstanceStreamProcessor = new WorkflowInstanceStreamProcessor(responseWriter, createWorkflowResponseSender, workflowCfg.deploymentCacheSize, workflowCfg.payloadCacheSize);
final StreamProcessorService workflowStreamProcessorService = new StreamProcessorService(streamProcessorName, StreamProcessorIds.WORKFLOW_INSTANCE_PROCESSOR_ID, workflowInstanceStreamProcessor).eventFilter(WorkflowInstanceStreamProcessor.eventFilter());
serviceContext.createService(streamProcessorServiceName, workflowStreamProcessorService).dependency(logStreamServiceName, workflowStreamProcessorService.getLogStreamInjector()).dependency(SNAPSHOT_STORAGE_SERVICE, workflowStreamProcessorService.getSnapshotStorageInjector()).install();
}
Aggregations