dev.sixpack.api.rpc.ObtainW Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk Show documentation
Show all versions of sdk Show documentation
SDK to develop generators part of the Sixpack solution
The newest version!
package dev.sixpack.api.rpc;
import dev.sixpack.api.data.Dataset;
import io.temporal.common.RetryOptions;
import io.temporal.workflow.ChildWorkflowOptions;
import io.temporal.workflow.Workflow;
import io.temporal.workflow.WorkflowInterface;
import io.temporal.workflow.WorkflowMethod;
import static io.temporal.api.enums.v1.ParentClosePolicy.PARENT_CLOSE_POLICY_TERMINATE;
import static io.temporal.api.enums.v1.WorkflowIdReusePolicy.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE;
@WorkflowInterface
public interface ObtainW {
String WAREHOUSE_INBOUND_QUEUE = "warehouse_queue";
static ChildWorkflowOptions getChildOptions() {
return ChildWorkflowOptions.newBuilder()
.setParentClosePolicy(PARENT_CLOSE_POLICY_TERMINATE)
.setTaskQueue(WAREHOUSE_INBOUND_QUEUE)
.setWorkflowId(Workflow.randomUUID().toString())
.setWorkflowIdReusePolicy(WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE)
.setRetryOptions(RetryOptions.newBuilder()
.setMaximumAttempts(1)
.validateBuildWithDefaults())
.validateAndBuildWithDefaults();
}
@WorkflowMethod
Dataset obtain(Dataset requestHolder);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy