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>


本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/569342.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

bloc

示例分为两个文件 main.dart import package:flutter/material.dart;import bloc.dart;void main()>runApp(MyApp());class MyApp extends StatelessWidget { override Widget build(BuildContext context) { return MaterialApp( home: HomePage(), ); }}cla…

activiti5第六弹 手动任务、接收任务、邮件任务

手动任务和接收任务几乎不在程序中做什么事情---只是在流程的历史中留下一点痕迹&#xff0c;表明流程是走过某些节点的。。。而且这两个任务是无法用taskservice查询到的 但是接收任务比手动任务多一个功能&#xff0c;就是确认功能。。。 activiti.cfg.xml配置 <?xml v…

手把手教你用原始方式上传项目至GitHub

小编GitHub&#xff1a;https://github.com/ds1889 首先你得注册一个自己的GitHub账号&#xff0c;注册网址&#xff1a;https://github.com/join 有了自己的账号以后&#xff0c;就可以进行登录&#xff0c;开始创建一个新的项目 创建一个新的项目&#xff0c;填写项目名称&am…

office如何快速删除重复数据

1、首先打开如下文档&#xff0c;在A列删除重复日期星期一&#xff0c;星期二&#xff1b; 2、选中编号栏&#xff0c;&#xff21;1-&#xff21;10&#xff0c;如下图: 3、点击数据——删除重复项&#xff1b;如下图红色剪头所指: 4、删除后&#xff0c;重复项就被删除成功。…

亲依止缘

前前诸善法对后后诸善法以亲依止缘为缘。前前诸善法对后后诸不善法有时以亲依止缘为缘。前前诸善法对后后诸无记法以亲依止缘为缘。 前前诸不善法对后后诸不善法以亲依止缘为缘。前前诸不善法对后后诸善法有时以亲依止缘为缘。前前诸不善法对后后诸无记法以亲依止缘为缘。 前前…

Activiti5第七弹,自己实现一个ProcessEngineConfiguration同时自定义拦截器

首先是我自己定义的MyProcessEngineConfiguration的activiti.cfg.xml文件的内容 <?xml version"1.0"?> <beans default-lazy-init"false"xsi:schemaLocation" http://www.springframework.org/schema/util http://www.springframework.org…

SQL中and和or的区别是?

今天有这样得一个需求&#xff0c;如果登陆人是客服的话&#xff0c;会查询订单是’该客服’以及还没有匹配客服的&#xff0c;刚开始想的是直接在sql语句上拼写 or assigned_id is null 的&#xff0c;测试了一下发现这样的话&#xff0c;前面的其他条件都没有用了 这样的话…

Java编程设计---数组Arrays

数组的的定义 数组是存放在连续存储空间的元素集合 数组定义的格式&#xff1a; int[] arrnew int[5]; int&#xff1a;数组元素的数据类型&#xff0c;可以是基本数据类型&#xff0c;也可以是引用 arr&#xff1a;数组名称 5&#xff1a;数组中元素个数 第一步&#xff1a;定…

装饰器模式 decorator

所有的说明和解释都在代码中有注释来标明 package mode.decorator;/*** * 这里定义一个接口&#xff0c;在接口中定义我们要执行的操作。* * 以后所有的装饰器以及我们要装饰的对象都要实现这个接口。有了这样的大前提&#xff0c;我们就可以其用 Sourcable来定义我们的装饰器和…

bzoj1176: [Balkan2007]Mokia cdq

链接 bzoj 思路 cdq入门题&#xff0c;拆成4个矩阵&#xff0c;然后cdq。 代码 /**************************************************************Problem: 1176User: gryz2016Language: CResult: AcceptedTime:2652 msMemory:13012 kb *************************************…

桥接模式(Bridge)

桥接模式&#xff0c;就是把向多个方向发展的变化由继承的实现变为了耦合的实现。 package mode.bridge.test;/*** * 首先是一个抽象的咖啡类&#xff0c;有一个抽象的倒咖啡的方法* * 在这个类中有一个咖啡伴侣的属性&#xff0c;为什么会有这个属性。因为我们在冲咖啡的时候可…

python 中的if else 和in

python中if else 和in的用法php python a3 //python中‘:’是引入一个缩进的代码块 if a1:print(1) elif a3:print(3) else:print("查不到") python中的in 查看一个对象是否在另一个对象中 a[1,2,3,4,5,6] b3 if b in a:print("b在a中") else: 转载于:http…

15年1月的每天小程序

package everyworkdayprogramming._2015_1_04;public class Java_1_4 {/*** * * 打印出所有的水仙花数&#xff0c;所谓水仙花数是指一个三位数&#xff0c;其各位数字立方和等于该数本身。* * */public static void main(String[] args) {int bit 0, ten 0, hun 0;for (int…

SpringBoot整合升级Spring Security 报错 【The request was rejected because the URL was not normalized】...

前言 最近LZ给项目框架升级&#xff0c; 从Spring1.x升级到Spring2.x, 在这里就不多赘述两个版本之间的区别以及升级的原因。 关于升级过程中踩的坑&#xff0c;在其他博文中会做比较详细的记录&#xff0c;以便给读者参考&#xff0c;不要掉进同样的坑里。 这里我们讨论一个关…

个人测试作业

作业所属课程&#xff1a;https://edu.cnblogs.com/campus/xnsy/SoftwareEngineeringClass2 作业地址&#xff1a;https://edu.cnblogs.com/campus/xnsy/SoftwareEngineeringClass2/homework/3340 作业目标&#xff1a;测试其他同学项目 姓名&#xff1a;潘云峰201731062423 所…

安装Nvida 显示环境

查看是否能正确加载nvidia 驱动 在终端输入 &#xff08;glxinfo 需要安装mesa-utils&#xff09; 如果可以正确加载了nvidia驱动 那么在输入的内容中可以看到NVIDIA 字样 如果GPU是IntelGPU 正确加载类似 卸载 老版本 驱动 sudo apt-get purge nvidia* 把显卡驱动加入PPA sudo…

Activiti5第十一弹,流程监听器与任务监听器

首先创建流程监听器和任务监听器的实体类&#xff0c;个人比较喜欢使用Delegate Expression方式&#xff0c;其他两种方式也可以 流程监听器 package org.mpc.final_activiti;import java.io.Serializable;import org.activiti.engine.delegate.DelegateExecution; import org.…

06_go语言基础

// 07枚举 package main import ( "fmt" ) func main() { // 1.iota常量自动生成器&#xff0c;每个一行&#xff0c;自动累加1 // 2.iota给常量赋值使用 const ( a iota // 0 b iota // 1 c iota // 2 ) fmt.Printf("a %d,b %d,c %d\n", a, b, c) /…

通过继承来实现注解方式的属性注入

要使用注解来注入属性&#xff0c;首先就要定义一个注解&#xff0c;注解的定义如下&#xff1a; package everyworkdayprogramming._2015_1_23;import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; im…

ASCII码对照表

1、字母转换成ASCII码 1 string str "hello";2 byte[] array new byte[1]; 3 array System.Text.Encoding.ASCII.GetBytes(str); //把str的每个字符转换成ascii码4 5 int asciicode1 (short)(array[0]);//h 的…