Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
apanicker-nflx committed Oct 23, 2018
1 parent cfbe426 commit 26cfd71
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,16 @@ public void setup() {
actionProcessor = new ActionProcessor(workflowExecutor, new ParametersUtils(), new JsonUtils());
}

@SuppressWarnings("unchecked")
@Test
public void testStartWorkflow() throws Exception {
StartWorkflow startWorkflow = new StartWorkflow();
startWorkflow.setName("testWorkflow");
startWorkflow.getInput().put("testInput", "${testId}");

Action action = new Action();
action.setAction(Type.START_WORKFLOW);
action.setStartWorkflow(startWorkflow);
action.setAction(Type.start_workflow);
action.setStart_workflow(startWorkflow);

Object payload = new ObjectMapper().readValue("{\"testId\":\"test_1\"}", Object.class);

Expand Down Expand Up @@ -92,8 +93,8 @@ public void testCompleteTask() throws Exception {
taskDetails.setTaskRefName("testTask");

Action action = new Action();
action.setAction(Type.COMPLETE_TASK);
action.setCompleteTask(taskDetails);
action.setAction(Type.complete_task);
action.setComplete_task(taskDetails);

Object payload = new ObjectMapper().readValue("{\"workflowId\":\"workflow_1\"}", Object.class);

Expand Down Expand Up @@ -122,8 +123,8 @@ public void testCompleteTaskByTaskId() throws Exception {
taskDetails.setTaskId("${taskId}");

Action action = new Action();
action.setAction(Type.COMPLETE_TASK);
action.setCompleteTask(taskDetails);
action.setAction(Type.complete_task);
action.setComplete_task(taskDetails);

Object payload = new ObjectMapper().readValue("{\"workflowId\":\"workflow_1\", \"taskId\":\"task_1\"}", Object.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,9 @@ public StartWorkflowRequestPb.StartWorkflowRequest toProto(StartWorkflowRequest
if (from.getWorkflowDef() != null) {
to.setWorkflowDef( toProto( from.getWorkflowDef() ) );
}
if (from.getExternalInputPayloadStoragePath() != null) {
to.setExternalInputPayloadStoragePath( from.getExternalInputPayloadStoragePath() );
}
return to.build();
}

Expand All @@ -442,6 +445,7 @@ public StartWorkflowRequest fromProto(StartWorkflowRequestPb.StartWorkflowReques
if (from.hasWorkflowDef()) {
to.setWorkflowDef( fromProto( from.getWorkflowDef() ) );
}
to.setExternalInputPayloadStoragePath( from.getExternalInputPayloadStoragePath() );
return to;
}

Expand Down

0 comments on commit 26cfd71

Please sign in to comment.