use of com.netflix.conductor.core.execution.mapper.LambdaTaskMapper in project conductor by Netflix.
the class TestWorkflowExecutor method init.
@Before
public void init() {
TestConfiguration config = new TestConfiguration();
executionDAOFacade = mock(ExecutionDAOFacade.class);
metadataDAO = mock(MetadataDAO.class);
queueDAO = mock(QueueDAO.class);
workflowStatusListener = mock(WorkflowStatusListener.class);
ExternalPayloadStorageUtils externalPayloadStorageUtils = mock(ExternalPayloadStorageUtils.class);
executionLockService = mock(ExecutionLockService.class);
ObjectMapper objectMapper = new JsonMapperProvider().get();
ParametersUtils parametersUtils = new ParametersUtils();
Map<String, TaskMapper> taskMappers = new HashMap<>();
taskMappers.put("DECISION", new DecisionTaskMapper());
taskMappers.put("DYNAMIC", new DynamicTaskMapper(parametersUtils, metadataDAO));
taskMappers.put("FORK_JOIN", new ForkJoinTaskMapper());
taskMappers.put("JOIN", new JoinTaskMapper());
taskMappers.put("FORK_JOIN_DYNAMIC", new ForkJoinDynamicTaskMapper(parametersUtils, objectMapper, metadataDAO));
taskMappers.put("USER_DEFINED", new UserDefinedTaskMapper(parametersUtils, metadataDAO));
taskMappers.put("SIMPLE", new SimpleTaskMapper(parametersUtils));
taskMappers.put("SUB_WORKFLOW", new SubWorkflowTaskMapper(parametersUtils, metadataDAO));
taskMappers.put("EVENT", new EventTaskMapper(parametersUtils));
taskMappers.put("WAIT", new WaitTaskMapper(parametersUtils));
taskMappers.put("HTTP", new HTTPTaskMapper(parametersUtils, metadataDAO));
taskMappers.put("LAMBDA", new LambdaTaskMapper(parametersUtils, metadataDAO));
new SubWorkflow(new JsonMapperProvider().get());
new Lambda();
DeciderService deciderService = new DeciderService(parametersUtils, metadataDAO, externalPayloadStorageUtils, taskMappers, config);
MetadataMapperService metadataMapperService = new MetadataMapperService(metadataDAO);
workflowExecutor = new WorkflowExecutor(deciderService, metadataDAO, queueDAO, metadataMapperService, workflowStatusListener, executionDAOFacade, config, executionLockService, parametersUtils);
}
Aggregations