add history record of BP to db
bp interview id
message
inserted record id
import {addHistory} bp from 'bp';
addHistory("iid","message");
deactivate one FSM in BP
record id
import * as bp from 'bp'
let client = bp.newClientV1()
let fsm = client.createFSM("data");
fsm.deactivateFSM("fsmId");
delegate task to another user or queue to process
bp interview id
import * as bp from 'bp'
let client = bp.newClientV1()
client.delegate("002N000000VwBrSDISbQ","user","resons")
delete one bp record
record id
deleted number
import {delete} from 'bp'
let res=delete("002N000000VwBrSDISbQ");
delete flow instance and related resource
delete reason
import {deleteInstance} from 'bp'
let client = bp.newClientV1()
client.deleteInstance("flowId","Unnecessary flow");
delete one fsm SLA
record id
Optional
objName: stringoptional
deleted count
import {fsmDeleteSLA} from 'bp'
let res=fsm.fsmDeleteSLA("002N000000VwBrSDISbQ")
delete one fsm step
record id
Optional
objName: stringoptional
deleted count
import {fsmDeleteStep} from 'bp
fsm.fsmDeleteStep("002N000000VwBrSDISbQ")
get values of variables
instance id
get values by names. if names is empty then get values of all variables
variable values
import * as bp from 'bp'
let client=bp.newClientV1();
let vars = client.getVars("002N000000VwBrSDISbQ", ["foo", "bar"])
console.log(vars)
resume bp
instance id
import * as bp from 'bp'
let client = bp.newClientV1()
let res = client.resume("002N000000VwBrSDISbQ")
set values to according variables
instance id
variables
import * as bp from 'bp'
let client = bp.newClientV1()
client.setVars("002N000000VwBrSDISbQ", {"foo": "aaa","bar": "bbb"})
start executing a BP
the name of the bp
Optional
version: stringthe version of bp, optional
result. For example,
{
"interviewId": "002N000000FdtN6xwgjI",
"screen": {
"allowBack": false,
"allowFinish": true,
"allowNext": true,
"allowPause": false,
"helpText": "",
"label": "input phone number",
"name": "inputphonenumber",
"pausedText": "",
"screenFields": [
{
"dataType": "text",
"defaultValue": "135xxxxxxxx",
"fieldType": "InputField",
"helpText": "",
"isRequired": false,
"label": "phone number",
"name": "phoneNumber"
}
]
}
import * as bp from 'bp'
let client = bp.newClientV1()
let res = client.start("test", { "foo": 1, "bar": 3}, "1.0.1")
input the parameters of bp
suspend bp
instance id
import * as bp from 'bp'
let client = bp.newClientV1()
let res = client.suspend("002N000000VwBrSDISbQ")
terminate BP and related resource
instance id
terminate reason
import * as bp from 'bp'
let client = bp.newClientV1()
client.terminate("bpId","bp is end")
active one FSM in BP