Flowable multi-person sign-off_Flowable workflow (to-sign, to-do, transfer, delegate) related functions

1. The candidate's task signature / the candidate group's task signature / task completion

2. Transfer tasks

3. Delegated tasks and delegated tasks

Second, the main interfaces are:

1. Candidate task list to be signed:

List tasks = taskService.createTaskQuery().taskCandidateUser(userId).list();

The list of tasks to be signed by the candidate group:

List tasks = taskService.createTaskQuery().taskCandidateGroup(userGroup).list();

Signing action:

taskService.claim(task.getId(), userId);//When the receipt is completed, the Assignee property of the task has a value

The task list (to-do list) that has been signed and received, in a sense, has the real manager


List tasks = taskService.createTaskQuery().taskAssignee(userId).list();

mission accomplished

After the task that needs to be processed is obtained in the unsigned/pending process

//Call task.getId() = taskId to complete the processing of the task, and the taskService service automatically flows to the next processing node

taskService.complete(task.getId());

//taskService.complete() method provides overloading and provides 3 ways for you to choose

complete(String taskId)

complete(String taskId, Mapvariables)

complete(String taskId, Mapvariables, boolean localScope)

The task does not have to be signed first and then processed, it can go directly to pending, not pending

can put

taskService.claim(task.getId(), userId);方法

replace with

setAssignee(String taskId, String userId)

After the above steps, the task is already in the state of being processed

2. Transfer tasks

taskService.setOwner(taskId, curUserId);

taskService.setAssignee(taskId,acceptUserId );

3. Delegate tasks:

It is to assign task nodes to other people for processing. After other people process it, the delegated task will automatically return to the task of the delegator.

taskService.setOwner(taskId, curUserId);

taskService.delegateTask(taskId,acceptUserId);

Handling of the delegated task: After the handling is completed, the delegated task will automatically return to the task of the delegator

taskService.resolveTask(taskId, variables);

{{o.name}}
{{m.name}}

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324133922&siteId=291194637