创建一个bpm流程定义
bpm definition data
include bpm definition compile info and record id
import * as bpmmeta from 'bpmmeta';
let client = bpmmeta.newBPMDefinitionClient();
client.create({
"name":"bpmNameTest",
"startEvents": [
{
"connector": "userTask",
"connectorPoint": "{\"fromPort\":\"R1\",\"toPort\":\"L1\",\"joints\":[\"174 80\",\"238 80\",\"238 75\"]}",
"label": "Start",
"locationX": 125,
"locationY": 80,
"name": "start",
"type": "Start",
"startType": "",
"renderType": "",
"render": "",
"document": "",
"description": ""
}
],
...
});
创建一个新的bpm流程定义版本
bpm definition data
include bpm definition compile info and record id
import * as bpmmeta from 'bpmmeta';
let client = bpmmeta.newBPMDefinitionClient();
client.createNewVersion({
"name":"bpmNameTest",
"startEvents": [
{
"connector": "userTask",
"connectorPoint": "{\"fromPort\":\"R1\",\"toPort\":\"L1\",\"joints\":[\"174 80\",\"238 80\",\"238 75\"]}",
"label": "Start",
"locationX": 125,
"locationY": 80,
"name": "start",
"type": "Start",
"startType": "",
"renderType": "",
"render": "",
"document": "",
"description": ""
}
],
...
});
Optional
condition: "bpmmeta".ConditionOption根据id查询bpm定义
bpm definition id
import * as bpmmeta from 'bpmmeta';
let client = bpmmeta.newBPMDefinitionClient()
let res = client.queryByID(defId)
查询bpm流程定义列表
import * as bpmmeta from 'bpmmeta';
let client = bpmmeta.newBPMDefinitionClient();
client.queryList({
"like":true,
"name":"BpmName",
"limit":10,
"skip":0,
"active":true
})
更新指定的流程定义
bpm definition id
bpm definition data
import * as bpmmeta from 'bpmmeta';
let client = bpmmeta.newBPMDefinitionClient()
let res = client.update(defId,{
"name":"bpmNameTest",
"startEvents": [
{
"connector": "userTask",
"connectorPoint": "{\"fromPort\":\"R1\",\"toPort\":\"L1\",\"joints\":[\"174 80\",\"238 80\",\"238 75\"]}",
"label": "Start",
"locationX": 125,
"locationY": 80,
"name": "start",
"type": "Start",
"startType": "",
"renderType": "",
"render": "",
"document": "",
"description": ""
}
],
...
})
激活指定的流程定义