-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathSetDataAttributeWorkflowState1.java
More file actions
44 lines (37 loc) · 1.37 KB
/
SetDataAttributeWorkflowState1.java
File metadata and controls
44 lines (37 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package io.iworkflow.integ.persistence;
import io.iworkflow.core.Context;
import io.iworkflow.core.ImmutableStateDecision;
import io.iworkflow.core.StateDecision;
import io.iworkflow.core.StateMovement;
import io.iworkflow.core.WorkflowState;
import io.iworkflow.core.command.CommandRequest;
import io.iworkflow.core.command.CommandResults;
import io.iworkflow.core.communication.Communication;
import io.iworkflow.core.persistence.Persistence;
import java.util.Arrays;
public class SetDataAttributeWorkflowState1 implements WorkflowState<String> {
public static final String STATE_ID = "setDataObject-s1";
@Override
public String getStateId() {
return STATE_ID;
}
@Override
public Class<String> getInputType() {
return String.class;
}
@Override
public CommandRequest waitUntil(Context context, String input, Persistence persistence, Communication communication) {
return CommandRequest.empty;
}
@Override
public StateDecision execute(
final Context context,
final String input,
final CommandResults commandResults,
final Persistence persistence,
final Communication communication) {
return ImmutableStateDecision.builder()
.nextStates(Arrays.asList(StateMovement.gracefulCompleteWorkflow("test-result")))
.build();
}
}