error end event 和 error boundary event
java 中处理异常
ws设计
流程图,java处理异常 结合 error end and boundary event
用bpmn designer 设计
在Activiti designer 上展示流程图
设计分支条件
配form
<endEvent id="errorendevent1">
<errorEventDefinition errorRef="customerNotFound" />
</endEvent>
error end event code配置
<error id="customerNotFound" errorCode="123" />
错误定义
<boundaryEvent id="boundaryerror1"
attachedToRef="subprocess1">
<errorEventDefinition errorRef="customerNotFound" />
</boundaryEvent>
error bounday event 定义
<build>
<plugins>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>2.3.4</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>generated/cxf</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>src/main/resources/chapter7/errorevent/
wsdl/customerService.wsdl</wsdl>
<wsdlLocation>http://localhost:8081/book-sales-app/
services/customer?wsdl</wsdlLocation>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
在maven中添加插件,启动WS
java service中调用WS
配置service task
java service
生成 deploy artifacts
使用 Activiti explorer
使用java logic error handling
用于service task 的Java Service
<serviceTask id="RetrieveCustomerTask" activiti:class="org.bpmnwithactiviti.chapter7. errorjava.RetrieveCustomerTask" />
<sequenceFlow id="customerNotFound" sourceRef="RetrieveCustomerTask" targetRef="HandleCustomerNotFoundTask" />
<sequenceFlow id="customerFound" sourceRef="RetrieveCustomerTask" targetRef="StoreOpportunityTask" />
主要配置