Search in sources :

Example 1 with LambdaTaskMapper

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);
}
Also used : LambdaTaskMapper(com.netflix.conductor.core.execution.mapper.LambdaTaskMapper) SubWorkflowTaskMapper(com.netflix.conductor.core.execution.mapper.SubWorkflowTaskMapper) HashMap(java.util.HashMap) WaitTaskMapper(com.netflix.conductor.core.execution.mapper.WaitTaskMapper) ExternalPayloadStorageUtils(com.netflix.conductor.core.utils.ExternalPayloadStorageUtils) SimpleTaskMapper(com.netflix.conductor.core.execution.mapper.SimpleTaskMapper) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) ExecutionLockService(com.netflix.conductor.service.ExecutionLockService) QueueDAO(com.netflix.conductor.dao.QueueDAO) ForkJoinDynamicTaskMapper(com.netflix.conductor.core.execution.mapper.ForkJoinDynamicTaskMapper) Lambda(com.netflix.conductor.core.execution.tasks.Lambda) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) MetadataDAO(com.netflix.conductor.dao.MetadataDAO) SimpleTaskMapper(com.netflix.conductor.core.execution.mapper.SimpleTaskMapper) LambdaTaskMapper(com.netflix.conductor.core.execution.mapper.LambdaTaskMapper) ForkJoinTaskMapper(com.netflix.conductor.core.execution.mapper.ForkJoinTaskMapper) HTTPTaskMapper(com.netflix.conductor.core.execution.mapper.HTTPTaskMapper) TaskMapper(com.netflix.conductor.core.execution.mapper.TaskMapper) ForkJoinDynamicTaskMapper(com.netflix.conductor.core.execution.mapper.ForkJoinDynamicTaskMapper) UserDefinedTaskMapper(com.netflix.conductor.core.execution.mapper.UserDefinedTaskMapper) WaitTaskMapper(com.netflix.conductor.core.execution.mapper.WaitTaskMapper) JoinTaskMapper(com.netflix.conductor.core.execution.mapper.JoinTaskMapper) SubWorkflowTaskMapper(com.netflix.conductor.core.execution.mapper.SubWorkflowTaskMapper) DecisionTaskMapper(com.netflix.conductor.core.execution.mapper.DecisionTaskMapper) DynamicTaskMapper(com.netflix.conductor.core.execution.mapper.DynamicTaskMapper) EventTaskMapper(com.netflix.conductor.core.execution.mapper.EventTaskMapper) EventTaskMapper(com.netflix.conductor.core.execution.mapper.EventTaskMapper) SubWorkflow(com.netflix.conductor.core.execution.tasks.SubWorkflow) UserDefinedTaskMapper(com.netflix.conductor.core.execution.mapper.UserDefinedTaskMapper) JsonMapperProvider(com.netflix.conductor.common.utils.JsonMapperProvider) ForkJoinTaskMapper(com.netflix.conductor.core.execution.mapper.ForkJoinTaskMapper) DecisionTaskMapper(com.netflix.conductor.core.execution.mapper.DecisionTaskMapper) MetadataMapperService(com.netflix.conductor.core.metadata.MetadataMapperService) HTTPTaskMapper(com.netflix.conductor.core.execution.mapper.HTTPTaskMapper) ForkJoinDynamicTaskMapper(com.netflix.conductor.core.execution.mapper.ForkJoinDynamicTaskMapper) DynamicTaskMapper(com.netflix.conductor.core.execution.mapper.DynamicTaskMapper) ForkJoinTaskMapper(com.netflix.conductor.core.execution.mapper.ForkJoinTaskMapper) JoinTaskMapper(com.netflix.conductor.core.execution.mapper.JoinTaskMapper) ExecutionDAOFacade(com.netflix.conductor.core.orchestration.ExecutionDAOFacade) Before(org.junit.Before)

Aggregations

ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 JsonMapperProvider (com.netflix.conductor.common.utils.JsonMapperProvider)1 DecisionTaskMapper (com.netflix.conductor.core.execution.mapper.DecisionTaskMapper)1 DynamicTaskMapper (com.netflix.conductor.core.execution.mapper.DynamicTaskMapper)1 EventTaskMapper (com.netflix.conductor.core.execution.mapper.EventTaskMapper)1 ForkJoinDynamicTaskMapper (com.netflix.conductor.core.execution.mapper.ForkJoinDynamicTaskMapper)1 ForkJoinTaskMapper (com.netflix.conductor.core.execution.mapper.ForkJoinTaskMapper)1 HTTPTaskMapper (com.netflix.conductor.core.execution.mapper.HTTPTaskMapper)1 JoinTaskMapper (com.netflix.conductor.core.execution.mapper.JoinTaskMapper)1 LambdaTaskMapper (com.netflix.conductor.core.execution.mapper.LambdaTaskMapper)1 SimpleTaskMapper (com.netflix.conductor.core.execution.mapper.SimpleTaskMapper)1 SubWorkflowTaskMapper (com.netflix.conductor.core.execution.mapper.SubWorkflowTaskMapper)1 TaskMapper (com.netflix.conductor.core.execution.mapper.TaskMapper)1 UserDefinedTaskMapper (com.netflix.conductor.core.execution.mapper.UserDefinedTaskMapper)1 WaitTaskMapper (com.netflix.conductor.core.execution.mapper.WaitTaskMapper)1 Lambda (com.netflix.conductor.core.execution.tasks.Lambda)1 SubWorkflow (com.netflix.conductor.core.execution.tasks.SubWorkflow)1 MetadataMapperService (com.netflix.conductor.core.metadata.MetadataMapperService)1 ExecutionDAOFacade (com.netflix.conductor.core.orchestration.ExecutionDAOFacade)1 ExternalPayloadStorageUtils (com.netflix.conductor.core.utils.ExternalPayloadStorageUtils)1