01-10-2013 05:04 AM
processEngine.getRepositoryService()
.createDeployment()
.name("Sync contact")
.addClasspathResource("cz/ness/itaas/fxb/SyncContactProcess.bpmn20.xml")
.deploy();<?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://activiti.org/bpmn20">
<process id="syncGAPFXBContact" name="New FXB contact process">
<startEvent id="startevent1" name="Start"></startEvent>
<userTask id="createContactUsertask" name="create contact" activiti:candidateGroups="aro_fxb_contact_employ">
<extensionElements>
<activiti:formProperty id="nextCandidateGroup" value="aro_fxb_contact_approver" default="aro_fxb_contact_approver" required="true" readable="true" writable="false"></activiti:formProperty>
</extensionElements>
</userTask>
<userTask id="approveContactUsertask" name="approve contact" activiti:assignee="${approver}" activiti:candidateGroups="aro_fxb_contact_approver"></userTask>
<exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway"></exclusiveGateway>
<serviceTask id="createFXBContactServicetask" name="create FXB contact" activiti:async="true" activiti:class="cz.ness.itaas.v1.fxb.FXBSendContactService"></serviceTask>
<endEvent id="endevent1" name="End"></endEvent>
<serviceTask id="sendRejectMail" name="send reject mail" activiti:async="true" activiti:class="cz.ness.itaas.v1.fxb.FXBSendRejectMailService"></serviceTask>
<serviceTask id="sendRequestMail" name="send request mail" activiti:async="true" activiti:class="cz.ness.itaas.v1.fxb.FXBSendRequestMailService"></serviceTask>
<parallelGateway id="parallelgateway1" name="Parallel Gateway"></parallelGateway>
<sequenceFlow id="flow1" name="" sourceRef="startevent1" targetRef="createContactUsertask"></sequenceFlow>
<sequenceFlow id="flow3" name="" sourceRef="approveContactUsertask" targetRef="exclusivegateway1"></sequenceFlow>
<sequenceFlow id="flow4" name="approved" sourceRef="exclusivegateway1" targetRef="createFXBContactServicetask">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${choice == 'approved'}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow6" name="" sourceRef="createFXBContactServicetask" targetRef="endevent1"></sequenceFlow>
<sequenceFlow id="flow7" name="rejected" sourceRef="exclusivegateway1" targetRef="sendRejectMail">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${choice == 'rejected'}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow8" name="" sourceRef="sendRejectMail" targetRef="endevent1"></sequenceFlow>
<sequenceFlow id="flow9" name="" sourceRef="createContactUsertask" targetRef="parallelgateway1"></sequenceFlow>
<sequenceFlow id="flow10" name="" sourceRef="parallelgateway1" targetRef="approveContactUsertask"></sequenceFlow>
<sequenceFlow id="flow11" name="" sourceRef="parallelgateway1" targetRef="sendRequestMail"></sequenceFlow>
<sequenceFlow id="flow12" name="" sourceRef="sendRequestMail" targetRef="endevent1"></sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_syncGAPFXBContact">
<bpmndi:BPMNPlane bpmnElement="syncGAPFXBContact" id="BPMNPlane_syncGAPFXBContact">
<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
<omgdc:Bounds height="35" width="35" x="110" y="220"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="createContactUsertask" id="BPMNShape_createContactUsertask">
<omgdc:Bounds height="55" width="105" x="190" y="210"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="approveContactUsertask" id="BPMNShape_approveContactUsertask">
<omgdc:Bounds height="55" width="105" x="400" y="210"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="exclusivegateway1" id="BPMNShape_exclusivegateway1">
<omgdc:Bounds height="40" width="40" x="549" y="218"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="createFXBContactServicetask" id="BPMNShape_createFXBContactServicetask">
<omgdc:Bounds height="55" width="105" x="609" y="141"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
<omgdc:Bounds height="35" width="35" x="729" y="221"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sendRejectMail" id="BPMNShape_sendRejectMail">
<omgdc:Bounds height="55" width="105" x="609" y="284"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sendRequestMail" id="BPMNShape_sendRequestMail">
<omgdc:Bounds height="55" width="105" x="400" y="90"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="parallelgateway1" id="BPMNShape_parallelgateway1">
<omgdc:Bounds height="40" width="40" x="330" y="217"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
<omgdi:waypoint x="145" y="237"></omgdi:waypoint>
<omgdi:waypoint x="190" y="237"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
<omgdi:waypoint x="505" y="237"></omgdi:waypoint>
<omgdi:waypoint x="549" y="238"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
<omgdi:waypoint x="569" y="218"></omgdi:waypoint>
<omgdi:waypoint x="568" y="168"></omgdi:waypoint>
<omgdi:waypoint x="609" y="168"></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds height="14" width="100" x="2" y="31"></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
<omgdi:waypoint x="714" y="168"></omgdi:waypoint>
<omgdi:waypoint x="746" y="168"></omgdi:waypoint>
<omgdi:waypoint x="746" y="221"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
<omgdi:waypoint x="569" y="258"></omgdi:waypoint>
<omgdi:waypoint x="568" y="311"></omgdi:waypoint>
<omgdi:waypoint x="609" y="311"></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds height="14" width="100" x="2" y="-47"></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">
<omgdi:waypoint x="714" y="311"></omgdi:waypoint>
<omgdi:waypoint x="746" y="311"></omgdi:waypoint>
<omgdi:waypoint x="746" y="256"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
<omgdi:waypoint x="295" y="237"></omgdi:waypoint>
<omgdi:waypoint x="330" y="237"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">
<omgdi:waypoint x="370" y="237"></omgdi:waypoint>
<omgdi:waypoint x="400" y="237"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11">
<omgdi:waypoint x="350" y="217"></omgdi:waypoint>
<omgdi:waypoint x="349" y="118"></omgdi:waypoint>
<omgdi:waypoint x="400" y="117"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12">
<omgdi:waypoint x="505" y="117"></omgdi:waypoint>
<omgdi:waypoint x="746" y="117"></omgdi:waypoint>
<omgdi:waypoint x="746" y="221"></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>01-10-2013 05:26 AM
01-10-2013 06:37 AM
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:cache="http://www.springframework.org/schema/cache" xmlns:smileytongue:="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.1.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache-3.1.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
<bean id="demoDataGenerator" class="DemoDataGenerator" init-method="init">
<property name="processEngine" ref="processEngine" />
</bean>
<jee:jndi-lookup id="dataSource" jndi-name="java:jboss/datasources/ACTDS" />
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
<property name="dataSource" ref="dataSource" />
<property name="transactionManager" ref="transactionManager" />
<property name="databaseSchemaUpdate" value="true" />
<property name="jobExecutorActivate" value="true" />
</bean>
<bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
<property name="processEngineConfiguration" ref="processEngineConfiguration" />
</bean>
<bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
<bean id="runtimeService" factory-bean="processEngine" factory-method="getRuntimeService" />
<bean id="taskService" factory-bean="processEngine" factory-method="getTaskService" />
<bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService" />
<bean id="managementService" factory-bean="processEngine" factory-method="getManagementService" />
<tx:annotation-driven transaction-manager="transactionManager" />
</beans>public class DemoDataGenerator {
…
public void setProcessEngine(ProcessEngine processEngine) {
this.processEngine = processEngine;
this.identityService = processEngine.getIdentityService();
}
public void init(){
initDemoGroups();
initDemoUsers();
initProcessDefinitions();
}
…
protected void initProcessDefinitions() {
processEngine.getRepositoryService()
.createDeployment()
.name("Sync contact")
.addClasspathResource("cz/ness/itaas/fxb/SyncContactProcess.bpmn20.xml")
.deploy();
}
}
01-10-2013 08:05 AM
01-10-2013 09:20 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.