activiti5第五弹 serviceTask中的webserviceTask 以及 shellTask
web service task是BPMN2.0中的一種任務類型,在activiti5中它并沒有專門的標簽表示,而是使用了service task 來表示。而且有很多要配置的內容是無法用圖形化工具來完成的。要使用web service task,當然要先有web service。所以首先要編寫一個web service。
首先是JAR包:
編寫webservice的接口:
package org.mpc.activiti.webservice;import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; import javax.jws.WebService;@WebService public interface MpcService {@WebMethod@WebResult(name = "address")//返回值的名稱為addressString createMpc(@WebParam(name = "name") String name);//定義了一個名稱為name的String類型的參數 } 編寫webservice的實現類: package org.mpc.activiti.webservice;import javax.jws.WebService;@WebService(endpointInterface = "org.mpc.activiti.webservice.MpcService", serviceName = "MpcService") public class MpcServiceImpl implements MpcService {public String createMpc(String name) {System.out.println("創建人:" + name);Mpc mpc = new Mpc();mpc.setAdd("香格里拉");return mpc.getAdd();} }
實體類Mpc package org.mpc.activiti.webservice;public class Mpc {private String name;private String add;public String getName() {return name;}public void setName(String name) {this.name = name;}public String getAdd() {return add;}public void setAdd(String add) {this.add = add;} }
在主程序中發布web service:
package org.mpc.activiti.webservice;import javax.xml.ws.Endpoint;public class Main {public static void main(String args[]) throws Exception {//實例化一個MpcServiceImpl的對象,并在http://localhost:9090/mpc的地址中發布webserviceEndpoint.publish("http://localhost:9090/mpc", new MpcServiceImpl());System.out.println("服務啟動...");Thread.sleep(100 * 60 * 1000);//隨意設個時間,不要立馬退出程序,最好長一點System.exit(0);}}運行main以后在瀏覽器中輸入http://localhost:9090/mpc?wsdl會看到如下內容: <wsdl:definitions xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://webservice.activiti.mpc.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="MpcService" targetNamespace="http://webservice.activiti.mpc.org/"> <wsdl:types> <xs:schema xmlns:tns="http://webservice.activiti.mpc.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified" targetNamespace="http://webservice.activiti.mpc.org/" version="1.0"> <xs:element name="createMpc" type="tns:createMpc"/> <xs:element name="createMpcResponse" type="tns:createMpcResponse"/> <xs:complexType name="createMpc"> <xs:sequence> <xs:element minOccurs="0" name="name" type="xs:string"/> </xs:sequence> </xs:complexType> <xs:complexType name="createMpcResponse"> <xs:sequence> <xs:element minOccurs="0" name="address" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:schema> </wsdl:types> <wsdl:message name="createMpcResponse"> <wsdl:part element="tns:createMpcResponse" name="parameters"></wsdl:part> </wsdl:message> <wsdl:message name="createMpc"> <wsdl:part element="tns:createMpc" name="parameters"></wsdl:part> </wsdl:message> <wsdl:portType name="MpcService"> <wsdl:operation name="createMpc"> <wsdl:input message="tns:createMpc" name="createMpc"></wsdl:input> <wsdl:output message="tns:createMpcResponse" name="createMpcResponse"></wsdl:output> </wsdl:operation> </wsdl:portType> <wsdl:binding name="MpcServiceSoapBinding" type="tns:MpcService"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="createMpc"> <soap:operation soapAction="" style="document"/> <wsdl:input name="createMpc"> <soap:body use="literal"/> </wsdl:input> <wsdl:output name="createMpcResponse"> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="MpcService"> <wsdl:port binding="tns:MpcServiceSoapBinding" name="MpcServiceImplPort"> <soap:address location="http://localhost:9090/mpc"/> </wsdl:port> </wsdl:service> </wsdl:definitions>
在這份wsdl文檔結構中,我們可以得到如下信息:
有name 和 address 兩個string類型的變量;有兩個消息,分別是createMpc和createMpcResponse,兩者都是用來和activiti交互的消息,前者接受參數,后者返回信息; 還有MpcService中的creatreMpc方法,供activiti調用。
在activiti5中訪問webservice
方式一 直接的、純粹的webservice
JAR包:
流程圖:
該流程對應的xml
<?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn"xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema"expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test"xmlns:mpc="http://webservice.activiti.mpc.org/"><!-- 這里的namespace是對應于wsdl中的namespace的,在這里定義一下方便后面使用 --><!--引入外部的wsdl文件中存儲的數據,也就是我們的webservice生成的wsdl數據 --><import importType="http://schemas.xmlsoap.org/wsdl/" location="http://localhost:9090/mpc?wsdl"namespace="http://webservice.activiti.mpc.org/" /><process id="service1" name="service1"><startEvent id="startevent1" name="Start"></startEvent><userTask id="usertask1" name="Ready Task"></userTask><serviceTask id="servicetask1" name="Web service invocation"implementation="##WebService" operationRef="createMpcOper"><!-- 這里的 implementation="##WebService" 表明這是一個webservice任務 operationRef="createPostOper"指明了這個webservice要執行的操作 --><dataInputAssociation><!-- 要輸入的參數 ,可以有多個 --><sourceRef>nameVar</sourceRef><!--輸入變量在流程中名稱 --><targetRef>name</targetRef><!--輸入變量在wsdl中的名稱 --></dataInputAssociation><dataOutputAssociation><!--輸出的參數,只可以有一個 --><sourceRef>address</sourceRef><!-- 輸出變量在wsdl中名稱 --><targetRef>addVar</targetRef><!-- 輸出變量在流程中的名稱 --></dataOutputAssociation><!-- sourceRef就是變量在來源中的名稱 targetRef就是變量在目標中的名稱 --></serviceTask><userTask id="usertask2" name="EndTask"></userTask><endEvent id="endevent1" name="End"></endEvent><sequenceFlow id="flow1" name="" sourceRef="startevent1"targetRef="usertask1"></sequenceFlow><sequenceFlow id="flow2" name="" sourceRef="usertask1"targetRef="servicetask1"></sequenceFlow><sequenceFlow id="flow3" name="" sourceRef="servicetask1"targetRef="usertask2"></sequenceFlow><sequenceFlow id="flow4" name="" sourceRef="usertask2"targetRef="endevent1"></sequenceFlow></process><!-- 所謂的message 就是activiti 和 webservice 之間的數據交流的信息 --><message id="createMpcMsg" itemRef="createMpcItem"></message><message id="createMpcResponseMsg" itemRef="createMpcResponseItem"></message><!-- 這里定義了消息,itemRef="createMpcResponseItem" 定義了這個消息的類型 --><itemDefinition id="createMpcItem" structureRef="mpc:createMpc" /><itemDefinition id="createMpcResponseItem" structureRef="mpc:createMpcResponse" /><!-- 類型對應于wsdl中的文檔結構 --><!--start --><itemDefinition id="nameVar" structureRef="string" /><itemDefinition id="name" structureRef="string" /><itemDefinition id="address" structureRef="string" /><itemDefinition id="addVar" structureRef="string" /><!-- end --><!-- 指定每個變量的類型 --><interface name="Mpc Service" implementationRef="MpcService"><operation id="createMpcOper" name="Create Mpc Operation"implementationRef="mpc:createMpc"><inMessageRef>createMpcMsg</inMessageRef><outMessageRef>createMpcResponseMsg</outMessageRef></operation></interface><bpmndi:BPMNDiagram id="BPMNDiagram_process1"><bpmndi:BPMNPlane bpmnElement="process1" id="BPMNPlane_process1"><bpmndi:BPMNShape bpmnElement="startevent1"id="BPMNShape_startevent1"><omgdc:Bounds height="35" width="35" x="190" y="210"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1"><omgdc:Bounds height="55" width="105" x="280" y="200"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="servicetask1"id="BPMNShape_servicetask1"><omgdc:Bounds height="55" width="105" x="440" y="200"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2"><omgdc:Bounds height="55" width="105" x="610" y="200"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1"><omgdc:Bounds height="35" width="35" x="770" y="210"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1"><omgdi:waypoint x="225" y="227"></omgdi:waypoint><omgdi:waypoint x="280" y="227"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2"><omgdi:waypoint x="385" y="227"></omgdi:waypoint><omgdi:waypoint x="440" y="227"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3"><omgdi:waypoint x="545" y="227"></omgdi:waypoint><omgdi:waypoint x="610" y="227"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4"><omgdi:waypoint x="715" y="227"></omgdi:waypoint><omgdi:waypoint x="770" y="227"></omgdi:waypoint></bpmndi:BPMNEdge></bpmndi:BPMNPlane></bpmndi:BPMNDiagram> </definitions>測試方法:
package bpmn;import java.util.HashMap; import java.util.Map;import org.activiti.engine.impl.test.PluggableActivitiTestCase; import org.activiti.engine.runtime.ProcessInstance; import org.activiti.engine.task.Task; import org.activiti.engine.test.Deployment; import org.junit.Test;public class WebServiceTest extends PluggableActivitiTestCase {@Test@Deployment(resources = "bpmn/WebService1.bpmn")public void test() {// 初始化參數Map<String, Object> vars = new HashMap<String, Object>();vars.put("nameVar", "mpc_test");ProcessInstance pi = runtimeService.startProcessInstanceByKey("service1", vars);// 完成第一個任務Task task = taskService.createTaskQuery().singleResult();taskService.complete(task.getId());// 輸出調用Web Service后的參數String add = (String) runtimeService.getVariable(pi.getId(), "addVar");System.out.println("↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓");System.out.println();System.out.println();System.out.println("mpc_test現在居住的地點是—————————————————————————>" + add);System.out.println();System.out.println();System.out.println("↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑");}}測試的結果是綠條,輸出結果如下:
在webservice端的輸出為:
在測試端的輸出為:
方式二 使用 java delegate來實現web service任務
上面的方式太復雜,而且沒有圖形化的設計界面,容易出錯,下面這種就好多了。
使用的jar包和方式一是一樣的。
流程圖:
然后可以利用圖形化的工具來編輯我們的service task
當然也可以用xml的方式編輯,這是完成后的xml
<?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test"><process id="delegate" name="process1" isExecutable="true"><startEvent id="startevent1" name="Start"></startEvent><serviceTask id="servicetask1" name="Service Task" activiti:class="bpmn.WebServiceDelegate"><extensionElements><activiti:field name="wsdl"><activiti:string><![CDATA[http://localhost:9090/mpc?wsdl]]></activiti:string></activiti:field><activiti:field name="operation"><activiti:string><![CDATA[createMpc]]></activiti:string></activiti:field><activiti:field name="name"><activiti:string><![CDATA[mpc_test]]></activiti:string></activiti:field></extensionElements></serviceTask><endEvent id="endevent1" name="End"></endEvent><sequenceFlow id="flow1" sourceRef="startevent1" targetRef="servicetask1"></sequenceFlow><sequenceFlow id="flow2" sourceRef="servicetask1" targetRef="endevent1"></sequenceFlow></process><bpmndi:BPMNDiagram id="BPMNDiagram_delegate"><bpmndi:BPMNPlane bpmnElement="delegate" id="BPMNPlane_delegate"><bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1"><omgdc:Bounds height="35.0" width="35.0" x="250.0" y="210.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="servicetask1" id="BPMNShape_servicetask1"><omgdc:Bounds height="55.0" width="105.0" x="330.0" y="200.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1"><omgdc:Bounds height="35.0" width="35.0" x="490.0" y="210.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1"><omgdi:waypoint x="285.0" y="227.0"></omgdi:waypoint><omgdi:waypoint x="330.0" y="227.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2"><omgdi:waypoint x="435.0" y="227.0"></omgdi:waypoint><omgdi:waypoint x="490.0" y="227.0"></omgdi:waypoint></bpmndi:BPMNEdge></bpmndi:BPMNPlane></bpmndi:BPMNDiagram> </definitions>代理類: package bpmn;import org.activiti.engine.delegate.DelegateExecution; import org.activiti.engine.delegate.Expression; import org.activiti.engine.delegate.JavaDelegate; import org.apache.cxf.endpoint.Client; import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;public class WebServiceDelegate implements JavaDelegate {/** 這些變量我們都在流程中進行了定義,* 也就是說通過流程注入到了這個代理類中,當然要用activiti流程注入,* 就要使用activiti的數據類型Expression* */private Expression wsdl;private Expression operation;private Expression name;// 要注入當然要有set方法public void setWsdl(Expression wsdl) {this.wsdl = wsdl;}public void setOperation(Expression operation) {this.operation = operation;}public void setName(Expression name) {this.name = name;}@Overridepublic void execute(DelegateExecution execution) throws Exception {JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();// 使用wsdl數據創建ClientClient client = dcf.createClient((String) wsdl.getValue(execution));//創建請求的參數Object [] vars = new Object[] {name.getValue(execution)};//發出請求Object [] results = client.invoke((String)operation.getValue(execution), vars);String result=(String)results[0];System.out.println("↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓");System.out.println();System.out.println();System.out.println("mpc_test現在居住的地點是—————————————————————————>" + result);System.out.println();System.out.println();System.out.println("↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑");}}
測試類: package bpmn;import org.activiti.engine.impl.test.PluggableActivitiTestCase; import org.activiti.engine.test.Deployment; import org.junit.Test;public class JavaDelegateWebServiceTest extends PluggableActivitiTestCase {@Test@Deployment(resources = "bpmn/JavaDelegateWebService1.bpmn")public void test() {runtimeService.startProcessInstanceByKey("delegate");}}
測試結果:
綠條沒問題
web service的輸出:(有上次的測試輸出,所以是兩條)
測試端的輸出:
下面是service task 的另一種變化 shell service
和以上兩個測試在同一個工程下,所以JAR包們是沒有變化的。
流程圖:
流程圖對應的xml:
<?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath"targetNamespace="http://www.activiti.org/test"><process id="shellservice" name="shellservice" isExecutable="true"><startEvent id="startevent1" name="Start"></startEvent><serviceTask id="servicetask1" name="Service Task"activiti:type="shell"><!-- 這里要制定這個servicetask是 activiti:type="shell" --><extensionElements><!-- 這些屬性可以在圖形化界面中添加,也可以在xml模式下添加,這些屬性是要注入給ActivitiBehaviour類的,有該類實現shell任務 --><activiti:field name="command"><activiti:string><![CDATA[cmd]]></activiti:string></activiti:field><activiti:field name="arg1"><activiti:string><![CDATA[/c]]></activiti:string></activiti:field><activiti:field name="arg2"><activiti:string><![CDATA[echo]]></activiti:string></activiti:field><activiti:field name="arg3"><activiti:string><![CDATA[%TEMP%]]></activiti:string></activiti:field><activiti:field name="outputVariable"><activiti:string><![CDATA[TEMP]]></activiti:string></activiti:field></extensionElements></serviceTask><sequenceFlow id="flow1" sourceRef="startevent1"targetRef="servicetask1"></sequenceFlow><userTask id="usertask1" name="User Task"></userTask><sequenceFlow id="flow2" sourceRef="servicetask1"targetRef="usertask1"></sequenceFlow><endEvent id="endevent1" name="End"></endEvent><sequenceFlow id="flow3" sourceRef="usertask1" targetRef="endevent1"></sequenceFlow></process><bpmndi:BPMNDiagram id="BPMNDiagram_shellservice"><bpmndi:BPMNPlane bpmnElement="shellservice"id="BPMNPlane_shellservice"><bpmndi:BPMNShape bpmnElement="startevent1"id="BPMNShape_startevent1"><omgdc:Bounds height="35.0" width="35.0" x="250.0" y="160.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="servicetask1"id="BPMNShape_servicetask1"><omgdc:Bounds height="55.0" width="105.0" x="330.0" y="150.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1"><omgdc:Bounds height="55.0" width="105.0" x="480.0" y="150.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1"><omgdc:Bounds height="35.0" width="35.0" x="630.0" y="160.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1"><omgdi:waypoint x="285.0" y="177.0"></omgdi:waypoint><omgdi:waypoint x="330.0" y="177.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2"><omgdi:waypoint x="435.0" y="177.0"></omgdi:waypoint><omgdi:waypoint x="480.0" y="177.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3"><omgdi:waypoint x="585.0" y="177.0"></omgdi:waypoint><omgdi:waypoint x="630.0" y="177.0"></omgdi:waypoint></bpmndi:BPMNEdge></bpmndi:BPMNPlane></bpmndi:BPMNDiagram> </definitions>測試類:
package bpmn;import org.activiti.engine.impl.test.PluggableActivitiTestCase; import org.activiti.engine.runtime.ProcessInstance; import org.activiti.engine.test.Deployment; import org.junit.Test;public class ShellTaskTest extends PluggableActivitiTestCase {@Test@Deployment(resources = "bpmn/shellTask.bpmn")public void test() {ProcessInstance pi = runtimeService.startProcessInstanceByKey("shellservice");String result = (String) runtimeService.getVariable(pi.getId(), "TEMP");System.out.println(result);}}這里我在測試類中通過shell命令獲得了我的計算機的TEMP變量的值并輸出了
測試結果如下:
啊,所有的測試案例中的activiti.cfg.xml都是如下定義的:
<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"><beanclass="org.activiti.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration"id="processEngineConfiguration"><property name="jdbcUrl" value="jdbc:mysql://localhost:3306/activi" /><property name="jdbcDriver" value="com.mysql.jdbc.Driver" /><property name="jdbcUsername" value="root" /><property name="jdbcPassword" value="root" /><property name="databaseSchemaUpdate" value="true" /><property name="jobExecutorActivate" value="true" /><property name="mailServerHost" value="mail.my-corp.com" /><property name="mailServerPort" value="5025" /><property name="history" value="full"></property></bean></beans>總結
以上是生活随笔為你收集整理的activiti5第五弹 serviceTask中的webserviceTask 以及 shellTask的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 在storm中使用定时保存
- 下一篇: activiti5第一弹-----基本的