dev.sixpack.api.rpc.RegistrationW 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.Manifest;
import dev.sixpack.api.data.RegistrationResult;
import io.temporal.client.WorkflowOptions;
import io.temporal.common.RetryOptions;
import io.temporal.workflow.WorkflowInterface;
import io.temporal.workflow.WorkflowMethod;
import static dev.sixpack.api.rpc.NormalisationUtils.safe;
import static io.temporal.api.enums.v1.WorkflowIdReusePolicy.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE;
@WorkflowInterface
public interface RegistrationW {
interface Options {
String WAREHOUSE_INBOUND_QUEUE = "warehouse_queue";
static WorkflowOptions get(String environment, String supplier) {
return WorkflowOptions.newBuilder()
.setTaskQueue(WAREHOUSE_INBOUND_QUEUE)
.setWorkflowId(safe(environment + "_" + supplier))
.setWorkflowIdReusePolicy(WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE)
.setRetryOptions(RetryOptions.newBuilder()
.setMaximumAttempts(1)
.validateBuildWithDefaults())
.validateBuildWithDefaults();
}
}
@WorkflowMethod
RegistrationResult register(String tenant, Manifest manifest);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy