我正在创建一个非常简单的工作流程:
<process id="test" name="test" isExecutable="true">
<startEvent id="start" name="start" activiti:initiator="initiator"></startEvent>
<userTask id="user" name="ownertask" activiti:candidateGroups="management"></userTask>
<endEvent id="end" name="end"></endEvent>
<sequenceFlow id="flow1" name="flow1" sourceRef="start" targetRef="user"></sequenceFlow>
<sequenceFlow id="flow2" name="flow2" sourceRef="user" targetRef="end"></sequenceFlow>
</process>
我想为此流程实例定义“所有者”。我怎么能做到这一点。任何帮助表示赞赏。
答案 0 :(得分:0)
将所有者设置为流程实例变量:
Map<String, Object> parameters = new HashMap<>();
parameters.put("Owner", "John");
runtimeService.startProcessInstanceByKey("test", parameters);