Camunda-BPM-Rest-Api的基本调用
- 1. 如何执行一个流程(Rest-API官方使用教程)
- the process(通知process-definition):
- for the Task(找到具体的task):
- the Task(改变task状态):
- 2. 创建一个流程(官网Model-API)
1. 如何执行一个流程(Rest-API官方使用教程)
Start and step through a process with rest(Camunda官方教程)
the process(通知process-definition):
rest: http://localhost:8080/engine-rest/process-definition/key/{processDefinitionKey}/start
for the Task(找到具体的task):
rest: http://localhost:8080/engine-rest/task?processInstanceId={processInstanceId}/
the Task(改变task状态):
rest: http://localhost:8080/engine-rest/task/{taskId}/complete
2. 创建一个流程(官网Model-API)
Create a Model(BPMN)
不可以直接使用,仅作为参考
- 要从头开始创建新的 BPMN 模型,您必须使用以下方法创建一个空的 BPMN 模型实例:
BpmnModelInstance modelInstance = Bpmn.createEmptyModel();
- 创建一个 BPMN Definitions元素:
Definitions definitions = modelInstance.newInstance(Definitions.class);
definitions.setTargetNamespace("/examples");
modelInstance.setDefinitions(definitions);
- 创建Process:
Process process = modelInstance.newInstance(Process.class);
process.setId("process");
definitions.addChildElement(process);
- 创建其他元素(task、startEvent等等)
/** 和创建Process类似**/
- 将startEvent、task、gateway等等元素联系起来