2017-08-02 505 views
0

我已經通過引導從https://www.activiti.org/migration.html 處理遷移的Activiti從5.21.0至6.0.0(我已經更新文件activiti-rest/WEB-INF/classes/activiti-custom-context.xml設置activiti5CompatibilityEnabled和activiti5CompatibilityHandlerFactoryActiviti的 - 錯誤時遷移過程例如從Activiti的5.21.0至Activiti的6

<bean id="activiti5CompabilityFactory" class="org.activiti.compatibility.spring.SpringActiviti5CompatibilityHandlerFactory" /> 
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration"> 
......... 
<property name="activiti5CompatibilityEnabled" value="true" /> 
<property name="activiti5CompatibilityHandlerFactory" ref="activiti5CompabilityFactory" /> 
</bean> 

和複製activiti5-compatibility-6.0.0.jar,activiti5-engine-6.0.0.jar,activiti5-spring-6.0.0.jar,activiti5-spring-compatibility-6.0.0.jar到activiti-休息的庫和activiti-app的庫)

我在舊版本中有一個活動的進程實例錫永如下

enter image description here

遷移後,我仍然有一個流程實例,但是當我提交用戶任務,服務任務執行並拋出BpmnError,該BoundaryEvent不能趕上這個例外,我得到了一個錯誤在日誌

03:29:59,686 [activiti-async-job-executor-thread-2] ERROR org.activiti.engine.impl.interceptor.CommandContext - Error while closing command context 
org.activiti.engine.ActivitiException: Programmatic error: no parent scope execution found for boundary event 
at org.activiti.engine.impl.bpmn.behavior.BoundaryEventActivityBehavior.executeInterruptingBehavior(BoundaryEventActivityBehavior.java:85) 
at org.activiti.engine.impl.bpmn.behavior.BoundaryEventActivityBehavior.trigger(BoundaryEventActivityBehavior.java:56) 

編程錯誤:沒有在BoundaryEventActivityBehavior.executeInterruptingBehavior(BoundaryEventActivityBehavior.java:85)發現邊界事件的父範圍執行 =>我不知道爲什麼BoundaryE發泄找不到父母(服務任務 - 它在舊版本上正常工作)。

回答

0

由於Activiti User Guide定義邊界錯誤事件 -

Defining a boundary error event makes most sense on an embedded subprocess, or a call activity, as a subprocess creates a scope for all activities inside the subprocess. Errors are thrown by error end events. Such an error will propagate its parent scopes upwards until a scope is found on which a boundary error event is defined that matches the error event definition.

When an error event is caught, the activity on which the boundary event is defined is destroyed, also destroying all current executions within (e.g. concurrent activities, nested subprocesses, etc.). Process execution continues following the outgoing sequence flow of the boundary event.

解決方法: 嘗試網關服務任務後檢查的條件,以完成該過程被滿足或不 - explanation