我正在构建审核并批准审核人员和任务受让人应该能够从任务表单交换消息的工作流程,问题是如果审核人员点击拒绝按钮时未重新创建任务,当执行返回到此任务时,没有调用create listener,有没有办法强制alfresco每次到达时都重新创建一个任务?
更新: 问题发生在以下嵌入式子流程中,
<subProcess id="subprocess3" name="Sub Process">
<multiInstanceLoopCharacteristics isSequential="false" activiti:collection="${swwf_splitAssignees}" activiti:elementVariable="splitAssignee"></multiInstanceLoopCharacteristics>
<userTask id="splittedDelegatedTask" name="DelegatedTask" activiti:assignee="${splitAssignee.properties.userName}" activiti:formKey="swwf:splittedDelegatedTask">
<extensionElements>
<activiti:taskListener event="create" class="com.smartway_me.translation_amp.listeners.delegatedTaskCreatedListener"></activiti:taskListener>
<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>
execution.setVariableLocal('swwf_messageToSplitter',task.getVariable('swwf_messageToSplitter'))
execution.setVariableLocal('swwf_delegatedMessage',task.getVaraible('swwf_messageToSplitter'))
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
<sequenceFlow id="flow5" sourceRef="splittedDelegatedTask" targetRef="splitterReview"></sequenceFlow>
<userTask id="splitterReview" name="SplitterReview" activiti:assignee="${inAssignee.properties.userName}" activiti:formKey="swwf:splitterReview">
<extensionElements>
<activiti:taskListener event="create" class="com.smartway_me.translation_amp.listeners.DelegatorReviewTaskCreateListener"></activiti:taskListener>
<activiti:taskListener event="complete" class="com.smartway_me.translation_amp.listeners.DelegatorReviewTaskCompleteListener"></activiti:taskListener>
</extensionElements>
</userTask>
<sequenceFlow id="flow6" sourceRef="splitterReview" targetRef="exclusivegateway2"></sequenceFlow>
<exclusiveGateway id="exclusivegateway2" name="Exclusive Gateway"></exclusiveGateway>
<sequenceFlow id="flow7" sourceRef="exclusivegateway2" targetRef="splittedDelegatedTask">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${swwf_splitterReviewOutcome=='Reject'}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow20" sourceRef="exclusivegateway2" targetRef="endevent3">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${swwf_splitterReviewOutcome=='Approve'}]]></conditionExpression>
</sequenceFlow>
<endEvent id="endevent3" name="End"></endEvent>
<startEvent id="startevent3" name="Start"></startEvent>
<sequenceFlow id="flow36" sourceRef="startevent3" targetRef="splittedDelegatedTask"></sequenceFlow>
</subProcess>