04-17-2013 10:35 AM
04-18-2013 07:55 AM
04-18-2013 04:21 PM
04-19-2013 03:27 AM
04-19-2013 04:41 PM
<?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" xmlnsmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlnsmgdi="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="pendProcess" name="pendProcess">
<endEvent id="endevent1" name="End"></endEvent>
<startEvent id="startevent1" name="Start"></startEvent>
<intermediateCatchEvent id="timerintermediatecatchevent1" name="TimerCatchEvent">
<timerEventDefinition>
<timeDuration>PT2M</timeDuration>
</timerEventDefinition>
</intermediateCatchEvent>
<userTask id="usertask1" name="FOOBAR" activiti:candidateUsers="phil" activiti:candidateGroups="enrollment"></userTask>
<sequenceFlow id="flow4" name="" sourceRef="startevent1" targetRef="timerintermediatecatchevent1"></sequenceFlow>
<sequenceFlow id="flow5" name="" sourceRef="timerintermediatecatchevent1" targetRef="usertask1"></sequenceFlow>
<sequenceFlow id="flow6" name="" sourceRef="usertask1" targetRef="endevent1"></sequenceFlow>
</process>
</definitions>
04-19-2013 05:31 PM
public static void main(String[] args) {
org.apache.log4j.BasicConfigurator.configure();
ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext(
"classpath:*wfcoreContext.xml");
TaskService tskService = (TaskService) applicationContext
.getBean("taskService");
HistoryService hisService = (HistoryService) applicationContext
.getBean("historyService");
ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
RepositoryService repositoryService = processEngine.getRepositoryService();
RuntimeService runtimeService = processEngine.getRuntimeService();
Map<String, Object> variableMap = new HashMap<String, Object>();
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("pendProcess",variableMap);
System.out.println("Process Inst ID : "+processInstance.getProcessInstanceId());
}
}
04-19-2013 06:21 PM
04-22-2013 05:48 AM
04-22-2013 12:00 PM
<?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" xmlnsmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlnsmgdi="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="pendProcess" name="pendProcess">
<endEvent id="endevent1" name="End"></endEvent>
<startEvent id="startevent1" name="Start"></startEvent>
<intermediateCatchEvent id="timerintermediatecatchevent1" name="TimerCatchEvent">
<timerEventDefinition>
<timeDuration>PT4M</timeDuration>
</timerEventDefinition>
</intermediateCatchEvent>
<sequenceFlow id="flow4" name="" sourceRef="startevent1" targetRef="timerintermediatecatchevent1"></sequenceFlow>
<serviceTask id="servicetask1" name="Service Task" activiti:class="com.act.TimerService"></serviceTask>
<sequenceFlow id="flow5" name="" sourceRef="timerintermediatecatchevent1" targetRef="servicetask1"></sequenceFlow>
<sequenceFlow id="flow6" name="" sourceRef="servicetask1" targetRef="endevent1"></sequenceFlow>
</process>
</definitions>
<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-3.0.xsd">
<bean id="activitiTransManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="activitiDataSource" />
</bean>
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
<property name="databaseType" value="db2" />
<property name="dataSource" ref="activitiDataSource" />
<property name="transactionManager" ref="activitiTransManager" />
<property name="databaseSchemaUpdate" value="false" />
<property name="jobExecutorActivate" value="true" />
<property name="historyLevel" value="2" />
</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" />
<bean id="identityService" factory-bean="processEngine"
factory-method="getIdentityService" />
<bean id="dbProperties"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="classpath:db.properties" />
<property name="ignoreUnresolvablePlaceholders" value="true" />
</bean>
<bean id="activitiDataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<description>Configuration for a development DB2 data source.
</description>
<property name="driverClassName" value="${jdbc.driver}" />
<property name="url" value="${jdbc.url.activiti}" />
<property name="username" value="${jdbc.username}" />
<property name="password" value="${jdbc.password}" />
</bean>
</beans>
04-24-2013 03:22 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.