Activiyi 多实例调用子例程 子例程候选用户问题

有一个调用式的多实例流程
主流程 call ctivity

<callActivity id="callsub" name="其他部门" calledElement="workplan_sub">
      <extensionElements>
        <activiti:executionListener event="start" delegateExpression="${startSubProcessListener}"/>
      </extensionElements>
      <multiInstanceLoopCharacteristics isSequential="false" activiti:collection="${depts}" activiti:elementVariable="userids">
        <completionCondition>${signComplete.isComplete(execution)}</completionCondition>
      </multiInstanceLoopCharacteristics>
    </callActivity>


子流程:
<process id="workplan_sub" name="其他部门协作(子流程)" isExecutable="true">
    <startEvent id="deptstart"/>
    <userTask id="wtask6" name="其他部门" activiti:candidateUsers="${userids}"/>
    <userTask id="wtask7" name="经办员" activiti:assignee="${userid}"/>
    <endEvent id="deptend"/>
    <sequenceFlow id="sub_flow1" sourceRef="deptstart" targetRef="wtask6"/>
    <sequenceFlow id="sub_flow2" sourceRef="wtask6" targetRef="wtask7"/>
    <sequenceFlow id="sub_flow3" sourceRef="wtask7" targetRef="deptend"/>
  </process>

按照我的理解 流程引擎会循环将候选用户放入userids 中 ,那么这些就会成为wtask6的candidateUsers 但是在实际运行时却报错:
org.activiti.engine.ActivitiException: Unknown property used in expression: ${userids}
at org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:53)
at org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior.handleAssignments(UserTaskActivityBehavior.java:121)
at org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior.execute(UserTaskActivityBehavior.java:89)
at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:44)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:87)
Truncated. see log file for complete stacktrace
Caused By: org.activiti.engine.impl.javax.el.PropertyNotFoundException: Cannot resolve identifier 'userids'
at org.activiti.engine.impl.juel.AstIdentifier.eval(AstIdentifier.java:83)
at org.activiti.engine.impl.juel.AstEval.eval(AstEval.java:50)
at org.activiti.engine.impl.juel.AstNode.getValue(AstNode.java:26)
at org.activiti.engine.impl.juel.TreeValueExpression.getValue(TreeValueExpression.java:114)
at org.activiti.engine.impl.delegate.ExpressionGetInvocation.invoke(ExpressionGetInvocation.java:33)
Truncated. see log file for complete stacktrace

请问各位大神 是什么原因 子流程没有获取到 userids的值

你可能感兴趣的:(Activiti)