优化 BpmParallelMultiInstanceBehavior 逻辑,实现会签、或签的任务分配

This commit is contained in:
YunaiV
2022-05-28 17:52:24 +08:00
parent 39e89bd378
commit 692daf900b
26 changed files with 148 additions and 222 deletions

View File

@ -9,8 +9,15 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* Flowable 相关的工具方法
*
* @author 芋道源码
*/
public class FlowableUtils {
// ========== User 相关的工具方法 ==========
public static void setAuthenticatedUserId(Long userId) {
Authentication.setAuthenticatedUserId(String.valueOf(userId));
}
@ -19,6 +26,8 @@ public class FlowableUtils {
Authentication.setAuthenticatedUserId(null);
}
// ========== BPMN 相关的工具方法 ==========
/**
* 获得 BPMN 流程中,指定的元素们
*
@ -59,4 +68,15 @@ public class FlowableUtils {
BpmnXMLConverter converter = new BpmnXMLConverter();
return converter.convertToXML(model);
}
// ========== Execution 相关的工具方法 ==========
public static String formatCollectionVariable(String activityId) {
return activityId + "_assignees";
}
public static String formatCollectionElementVariable(String activityId) {
return activityId + "_assignee";
}
}