-
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.
- Loading branch information
1 parent
7a894e4
commit e7b4e70
Showing
67 changed files
with
577 additions
and
577 deletions.
There are no files selected for viewing
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
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
Submodule iwf-idl
updated
from 80e329 to df6cb9
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
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
47 changes: 47 additions & 0 deletions
47
src/main/java/io/github/cadenceoss/iwf/core/ResetWorkflowTypeAndOptions.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,47 @@ | ||
package io.github.cadenceoss.iwf.core; | ||
|
||
import io.github.cadenceoss.iwf.gen.models.WorkflowResetRequest; | ||
import org.immutables.value.Value; | ||
|
||
import java.util.Optional; | ||
|
||
@Value.Immutable | ||
public abstract class ResetWorkflowTypeAndOptions { | ||
|
||
public abstract WorkflowResetRequest.ResetTypeEnum getResetType(); | ||
|
||
public abstract Optional<Integer> getHistoryEventId(); | ||
|
||
public abstract String getReason(); | ||
|
||
public abstract Optional<String> getHistoryEventTime(); | ||
|
||
public abstract Optional<Boolean> getSkipSignalReapply(); | ||
|
||
public static ResetWorkflowTypeAndOptions resetToBeginning(final String reason) { | ||
return builder() | ||
.resetType(WorkflowResetRequest.ResetTypeEnum.BEGINNING) | ||
.reason(reason) | ||
.build(); | ||
} | ||
|
||
public static ResetWorkflowTypeAndOptions resetToHistoryEventId(final int historyEventId, final String reason) { | ||
return builder() | ||
.resetType(WorkflowResetRequest.ResetTypeEnum.HISTORY_EVENT_ID) | ||
.historyEventId(historyEventId) | ||
.reason(reason) | ||
.build(); | ||
} | ||
|
||
public static ResetWorkflowTypeAndOptions resetToHistoryEventId(final String historyEventTime, final String reason) { | ||
return builder() | ||
.resetType(WorkflowResetRequest.ResetTypeEnum.HISTORY_EVENT_ID) | ||
.historyEventTime(historyEventTime) | ||
.reason(reason) | ||
.build(); | ||
} | ||
|
||
public static ImmutableResetWorkflowTypeAndOptions.Builder builder() { | ||
return ImmutableResetWorkflowTypeAndOptions.builder(); | ||
} | ||
} |
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
Oops, something went wrong.