public interface WorkflowClient
Modifier and Type | Method and Description |
---|---|
CancelWorkflowInstanceCommandStep1 |
newCancelInstanceCommand(long workflowInstanceKey)
Command to cancel a workflow instance.
|
CreateWorkflowInstanceCommandStep1 |
newCreateInstanceCommand()
Command to create/start a new instance of a workflow.
|
DeployWorkflowCommandStep1 |
newDeployCommand()
Command to deploy new workflows.
|
PublishMessageCommandStep1 |
newPublishMessageCommand()
Command to publish a message which can be correlated to a workflow instance.
|
WorkflowResourceRequestStep1 |
newResourceRequest()
Request to get the resource of a workflow (i.e.
|
UpdatePayloadWorkflowInstanceCommandStep1 |
newUpdatePayloadCommand(long activityInstanceKey)
Command to update the payload of a workflow instance.
|
WorkflowRequestStep1 |
newWorkflowRequest()
Request to get all deployed workflows.
|
DeployWorkflowCommandStep1 newDeployCommand()
workflowClient .newDeployCommand() .addResourceFile("~/wf/workflow1.bpmn") .addResourceFile("~/wf/workflow2.bpmn") .send();
CreateWorkflowInstanceCommandStep1 newCreateInstanceCommand()
workflowClient .newCreateInstanceCommand() .bpmnProcessId("my-process") .latestVersion() .payload(json) .send();
CancelWorkflowInstanceCommandStep1 newCancelInstanceCommand(long workflowInstanceKey)
workflowClient .newCancelInstanceCommand(workflowInstanceEvent) .send();The workflow instance is specified by the given event. The event must be the latest event of the workflow instance to ensure that the command is based on the latest state of the workflow instance. If it's not the latest one then the command is rejected.
event
- the latest workflow instance eventUpdatePayloadWorkflowInstanceCommandStep1 newUpdatePayloadCommand(long activityInstanceKey)
workflowClient .newUpdatePayloadCommand(workflowInstanceEvent) .payload(json) .send();The workflow instance is specified by the given event. The event must be the latest event of the workflow instance to ensure that the command is based on the latest state of the workflow instance. If it's not the latest one then the command is rejected.
If the workflow instance failed because of a payload-related incident then it will try to resolve the incident with the given payload.
event
- the latest workflow instance eventPublishMessageCommandStep1 newPublishMessageCommand()
workflowClient .newPublishMessageCommand() .messageName("order canceled") .correlationKey(orderId) .payload(json) .send();
WorkflowResourceRequestStep1 newResourceRequest()
WorkflowResource resource = workflowClient .newResourceRequest() .bpmnProcessId("my-process") .lastestVersion() .send() .join(); String bpmnXml = resoure.getBpmnXml();
WorkflowRequestStep1 newWorkflowRequest()
List<Workflow> workflows = workflowClient .newWorkflowRequest() .send() .join() .getWorkflows(); String bpmnProcessId = workflow.getBpmnProcessId();The response does not contain the resources of the workflows. Use
newResourceRequest()
to get the resource of a workflow.newResourceRequest()
Copyright © 2017–2018 camunda services GmbH. All rights reserved.