任务实例ID
Optional
options: OptionItem可选,可部分置空或全部置空
import * as bp from 'bp'
let queryTaskClient = bp.newQueryTaskClient()
let res = taskClient.getComments("taskInsId")
console.log(res.recs) // 数组结果
console.log(res.total) // 统计数
返回相关的评论记录
查询活跃状态的BPM任务列表,这里激活状态包括New/Dispatched/InProcess这三种任务状态,与bp.newTaskClient的queryActiveList用法完全一样,只是多返回total值
Optional
cond: ActiveTaskCondition查询活跃状态任务的条件,可部分留空或全部留空
import * as bp from 'bp'
let queryTaskClient = bp.newQueryTaskClient()
let res = queryTaskClient.queryActiveList({
owner: "002I000000VBjYt2OCYK",
rootID: "002N000000VBjj8I66gC",
options: {
fields: ["assignee", "assigneeID", "assigneeType", "assigneeName", "name", "state", "rootID", "owner"],
}
})
console.log(res.recs) // 数组结果
console.log(res.total) // 统计数
返回匹配的任务列表
查询BPM任务的文件附件信息记录,与bp.newTaskClient的queryAttachments用法完全一样,只是多返回total值
Optional
options: OptionItem可选,可部分置空或全部置空
import * as bp from 'bp'
let queryTaskClient = bp.newQueryTaskClient()
let res = queryTaskClient.queryAttachments("002N000000VwBrSDISbQ", {
fields: ["taskID", "name", "fileName", "url"],
limit: 5,
})
console.log(res.recs) // 数组结果
console.log(res.total) // 统计数
查询到的文件附件信息记录
Optional
cond: "bp".ConditionOptionimport * as bp from 'bp'
import * as db from 'db'
let queryTaskClient = bp.newQueryTaskClient()
let res = queryTaskClient.queryByCondition({
condition: {
conjunction: db.Conjunction.AND,
conditions: [
{
field: "createdDate",
operator: db.Operator.gt,
value: "2019-08-01 00:00:00"
}
]
},
options: {
fields: ["assignee", "assigneeID", "assigneeType", "assigneeName", "name"],
orderby: [
{
field: "assignee",
order: db.Order.desc
}
],
}
})
console.log(res.recs) // 数组结果
console.log(res.total) // 统计数
返回查询出的BPM任务的记录
查询closed状态的bpm任务,与bp.newTaskClient的queryClosedList用法完全一样,只是多返回total值
Optional
cond: QueryCondition查询条件,可以全部为空或部分为空
import * as bp from 'bp'
let queryTaskClient = bp.newQueryTaskClient()
let res = queryTaskClient.queryClosedList({
creator: "002I000000VBjYt2OCYK",
owner: "002I000000VBjYt2OCYK"
})
console.log(res.recs) // 数组结果
console.log(res.total) // 统计数
查询返回的任务列表
查询closed状态的bpm任务,支持同时查询多个rootID
Optional
cond: TerminatedTasksRootIDListCondition查询条件,可以全部为空或部分为空
import * as bp from 'bp'
let queryTaskClient = bp.queryTaskClient()
let res = queryTaskClient.queryClosedListWithMultipleRootID({
creator: "002I000000VBjYt2OCYK",
owner: "002I000000VBjYt2OCYK",
rootIDList: ["002N000000VBjj8I66gC","002N000000VBjj8I66gD","002N000000VBjj8I66gE"]
})
console.log(res.recs) // 数组结果
console.log(res.total) // 统计数
查询返回的任务列表
查询completed状态的bpm任务,与bp.newTaskClient的queryCompletedList用法完全一样,只是多返回total值
Optional
cond: QueryCondition查询条件,可以全部为空或部分为空
import * as bp from 'bp'
let queryTaskClient = bp.newQueryTaskClient()
let res = queryTaskClient.queryCompletedList({
creator: "002I000000VBjYt2OCYK",
owner: "002I000000VBjYt2OCYK"
})
console.log(res.recs) // 数组结果
console.log(res.total) // 统计数
查询返回的任务列表
按照指定条件查询BPM任务列表,与bp.newTaskClient的queryList用法完全一样,只是多返回total值
Optional
cond: QueryTaskListCondition查询条件
import * as bp from 'bp'
let queryTaskClient = bp.newQueryTaskClient()
let res = queryTaskClient.queryList({
rootID: "002N000000VBk5qqWi1I",
states: [bp.State.Terminated, bp.State.New],
procInsID: "xxxxxxxxxxxxxxxxxx",
})
console.log(res.recs) // 数组结果
console.log(res.total) // 统计数
查询返回的任务列表
查询属主是调用者本人的BPM任务列表,与bp.newTaskClient的queryMyList用法完全一样,只是多返回total值
Optional
cond: MyTaskCondition查询自己BPM任务的条件,可部分留空或全部留空
import * as bp from 'bp'
let queryTaskClient = bp.newQueryTaskClient()
let res = queryTaskClient.queryMyLis({
instID: "002N000000VwBrSDISbQ",
rootID: "002N000000VBjj8I66gC",
options: {
fields: ["assignee", "assigneeID", "assigneeType", "assigneeName", "name", "state", "rootID", "owner"],
}
})
console.log(res.recs) // 数组结果
console.log(res.total) // 统计数
返回匹配的任务列表
查询属主是调用者本人的BPM任务列表和总数,支持同时查询多个rootID
Optional
cond: MyTaskRootIDListCondition查询自己BPM任务的条件,支持同时查询多个rootID留空,可部分留空或全部留空
import * as bp from 'bp'
let queryTaskClient = bp.newQueryTaskClient()
let tasks = queryTaskClient.queryMyListWithMultipleRootID({
rootIDList: ["002N000000VBjj8I66gC","002N000000VBjj8I66gD","002N000000VBjj8I66gE"]
options: {
fields: ["assignee", "assigneeID", "assigneeType", "assigneeName", "name", "state", "rootID", "owner"],
}
})
console.log(tasks)
返回匹配的任务列表和符合条件的统计数量,limit限制5000条
查询属主是调用者本人的BPM任务列表和总数,支持同时查询多个流程定义 ID
Optional
cond: MyTaskProessDefIDListCondition查询自己BPM任务的条件,支持同时查询多个流程定义ID留空,可部分留空或全部留空
import * as bp from 'bp'
let queryTaskClient = bp.newQueryTaskClient()
let tasks = queryTaskClient.queryMyListWithProcDefIDs({
processDefIDList: ["003i000000kmKb3rA8X2"],
options: {
fields: ["assignee", "assigneeID", "assigneeType", "assigneeName", "name", "state", "rootID", "owner"],
}
})
console.log(tasks)
返回匹配的任务列表和符合条件的统计数量,单次查询限制5000条
查询suspended状态的bpm任务,与bp.newTaskClient的querySuspendList用法完全一样,只是多返回total值
Optional
cond: QueryCondition查询条件,可以全部为空或部分为空
import * as bp from 'bp'
let queryTaskClient = bp.newQueryTaskClient()
let res = queryTaskClient.querySuspendList({
creator: "002I000000VBjYt2OCYK",
owner: "002I000000VBjYt2OCYK"
})
console.log(res.recs) // 数组结果
console.log(res.total) // 统计数
查询返回的任务列表
获取BPM任务的评论,与bp.newTaskClient的getComments用法完全一样,只是多返回total值