-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IWF-107: Updating iwf-idl submodule to reflect changes for IdReusePol… (
#243)
- Loading branch information
1 parent
9fe4201
commit 4c9025f
Showing
4 changed files
with
77 additions
and
1 deletion.
There are no files selected for viewing
Submodule iwf-idl
updated
from 257dd6 to fdd0d8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
src/test/java/io/iworkflow/integ/basic/AbnormalExitState1.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package io.iworkflow.integ.basic; | ||
|
||
import io.iworkflow.core.Context; | ||
import io.iworkflow.core.StateDecision; | ||
import io.iworkflow.core.WorkflowState; | ||
import io.iworkflow.core.command.CommandResults; | ||
import io.iworkflow.core.communication.Communication; | ||
import io.iworkflow.core.persistence.Persistence; | ||
import io.iworkflow.gen.models.RetryPolicy; | ||
import io.iworkflow.gen.models.WorkflowStateOptions; | ||
|
||
public class AbnormalExitState1 implements WorkflowState<Integer> { | ||
|
||
@Override | ||
public Class<Integer> getInputType() { | ||
return Integer.class; | ||
} | ||
|
||
@Override | ||
public StateDecision execute( | ||
final Context context, | ||
final Integer input, | ||
final CommandResults commandResults, | ||
Persistence persistence, | ||
final Communication communication) { | ||
throw new RuntimeException("abnormal exit state"); | ||
} | ||
|
||
@Override | ||
public WorkflowStateOptions getStateOptions() { | ||
return new WorkflowStateOptions().executeApiRetryPolicy( | ||
new RetryPolicy() | ||
.maximumAttempts(1) | ||
.backoffCoefficient(2f) | ||
); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/test/java/io/iworkflow/integ/basic/AbnormalExitWorkflow.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package io.iworkflow.integ.basic; | ||
|
||
import com.google.common.collect.ImmutableList; | ||
import io.iworkflow.core.ObjectWorkflow; | ||
import io.iworkflow.core.StateDef; | ||
import org.springframework.stereotype.Component; | ||
|
||
import java.util.List; | ||
|
||
@Component | ||
public class AbnormalExitWorkflow implements ObjectWorkflow { | ||
|
||
@Override | ||
public List<StateDef> getWorkflowStates() { | ||
return ImmutableList.of(StateDef.startingState(new AbnormalExitState1())); | ||
} | ||
} |