Package io.zeebe.client.impl.command
Class DeployWorkflowCommandImpl
- java.lang.Object
-
- io.zeebe.client.impl.command.DeployWorkflowCommandImpl
-
- All Implemented Interfaces:
DeployWorkflowCommandStep1
,DeployWorkflowCommandStep1.DeployWorkflowCommandBuilderStep2
,FinalCommandStep<DeploymentEvent>
public final class DeployWorkflowCommandImpl extends Object implements DeployWorkflowCommandStep1, DeployWorkflowCommandStep1.DeployWorkflowCommandBuilderStep2
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.zeebe.client.api.command.DeployWorkflowCommandStep1
DeployWorkflowCommandStep1.DeployWorkflowCommandBuilderStep2
-
-
Constructor Summary
Constructors Constructor Description DeployWorkflowCommandImpl(GatewayGrpc.GatewayStub asyncStub, Duration requestTimeout, Predicate<Throwable> retryPredicate)
-
Method Summary
-
-
-
Constructor Detail
-
DeployWorkflowCommandImpl
public DeployWorkflowCommandImpl(GatewayGrpc.GatewayStub asyncStub, Duration requestTimeout, Predicate<Throwable> retryPredicate)
-
-
Method Detail
-
addResourceBytes
public DeployWorkflowCommandStep1.DeployWorkflowCommandBuilderStep2 addResourceBytes(byte[] resource, String resourceName)
Description copied from interface:DeployWorkflowCommandStep1
Add the given resource to the deployment.- Specified by:
addResourceBytes
in interfaceDeployWorkflowCommandStep1
- Parameters:
resource
- the workflow resource as byte arrayresourceName
- the name of the resource (e.g. "workflow.bpmn")- Returns:
- the builder for this command. Call
#send()
to complete the command and send it to the broker.
-
addResourceString
public DeployWorkflowCommandStep1.DeployWorkflowCommandBuilderStep2 addResourceString(String resource, Charset charset, String resourceName)
Description copied from interface:DeployWorkflowCommandStep1
Add the given resource to the deployment.- Specified by:
addResourceString
in interfaceDeployWorkflowCommandStep1
- Parameters:
resource
- the workflow resource as Stringcharset
- the charset of the StringresourceName
- the name of the resource (e.g. "workflow.bpmn")- Returns:
- the builder for this command. Call
#send()
to complete the command and send it to the broker.
-
addResourceStringUtf8
public DeployWorkflowCommandStep1.DeployWorkflowCommandBuilderStep2 addResourceStringUtf8(String resourceString, String resourceName)
Description copied from interface:DeployWorkflowCommandStep1
Add the given resource to the deployment.- Specified by:
addResourceStringUtf8
in interfaceDeployWorkflowCommandStep1
- Parameters:
resourceString
- the workflow resource as UTF-8-encoded StringresourceName
- the name of the resource (e.g. "workflow.bpmn")- Returns:
- the builder for this command. Call
#send()
to complete the command and send it to the broker.
-
addResourceStream
public DeployWorkflowCommandStep1.DeployWorkflowCommandBuilderStep2 addResourceStream(InputStream resourceStream, String resourceName)
Description copied from interface:DeployWorkflowCommandStep1
Add the given resource to the deployment.- Specified by:
addResourceStream
in interfaceDeployWorkflowCommandStep1
- Parameters:
resourceStream
- the workflow resource as streamresourceName
- the name of the resource (e.g. "workflow.bpmn")- Returns:
- the builder for this command. Call
#send()
to complete the command and send it to the broker.
-
addResourceFromClasspath
public DeployWorkflowCommandStep1.DeployWorkflowCommandBuilderStep2 addResourceFromClasspath(String classpathResource)
Description copied from interface:DeployWorkflowCommandStep1
Add the given resource to the deployment.- Specified by:
addResourceFromClasspath
in interfaceDeployWorkflowCommandStep1
- Parameters:
classpathResource
- the path of the workflow resource in the classpath (e.g. "wf/workflow.bpmn")- Returns:
- the builder for this command. Call
#send()
to complete the command and send it to the broker.
-
addResourceFile
public DeployWorkflowCommandStep1.DeployWorkflowCommandBuilderStep2 addResourceFile(String filename)
Description copied from interface:DeployWorkflowCommandStep1
Add the given resource to the deployment.- Specified by:
addResourceFile
in interfaceDeployWorkflowCommandStep1
- Parameters:
filename
- the absolute path of the workflow resource (e.g. "~/wf/workflow.bpmn")- Returns:
- the builder for this command. Call
#send()
to complete the command and send it to the broker.
-
addWorkflowModel
public DeployWorkflowCommandStep1.DeployWorkflowCommandBuilderStep2 addWorkflowModel(BpmnModelInstance workflowDefinition, String resourceName)
Description copied from interface:DeployWorkflowCommandStep1
Add the given workflow to the deployment.- Specified by:
addWorkflowModel
in interfaceDeployWorkflowCommandStep1
- Parameters:
workflowDefinition
- the workflow as modelresourceName
- the name of the resource (e.g. "workflow.bpmn")- Returns:
- the builder for this command. Call
#send()
to complete the command and send it to the broker.
-
requestTimeout
public FinalCommandStep<DeploymentEvent> requestTimeout(Duration requestTimeout)
Description copied from interface:FinalCommandStep
Sets the request timeout for the command. The default request timeout can be configured usingZeebeClientBuilder.defaultRequestTimeout(Duration)
.- Specified by:
requestTimeout
in interfaceFinalCommandStep<DeploymentEvent>
- Parameters:
requestTimeout
- the request timeout- Returns:
- the configured command
-
send
public ZeebeFuture<DeploymentEvent> send()
Description copied from interface:FinalCommandStep
Sends the command to the Zeebe broker. This operation is asynchronous. In case of success, the future returns the event that was generated by the Zeebe broker in response to the command.Call
ZeebeFuture.join()
to wait until the response is available.Future<JobEvent> future = command.send(); JobEvent event = future.join();
- Specified by:
send
in interfaceFinalCommandStep<DeploymentEvent>
- Returns:
- a future tracking state of success/failure of the command.
-
-