07-09-2013 03:01 PM
Deployment deployment = repositoryService.createDeployment()
.addClasspathResource("bpmn/my-timer.bpmn20.xml")
.deploy();
Map<String, Object> variableMap = new HashMap<String, Object>();
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("myProcessTimer", variableMap);
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
targetNamespace="http://www.bpmnwithactiviti.org"
xmlns:activiti="http://activiti.org/bpmn">
<process id="myProcessTimer" name="Scheduled Process">
<startEvent id="timerstartevent1">
<timerEventDefinition>
<!–run at 3:30, 4:30 and 5:30 every weekday–>
<timeCycle>0 30 15,16,17 ? * MON-FRI</timeCycle>
</timerEventDefinition>
</startEvent>
<sequenceFlow id="flow1" sourceRef="timerstartevent1" targetRef="processVariationMargin"></sequenceFlow>
<serviceTask id="processVariationMargin"
activiti:expression="#{mySerivce.process()}"/>
</process>
</definitions>
07-10-2013 03:33 AM
Note: start timer event is scheduled as soon as process is deployed. There is no need to call startProcessInstanceByXXX, although calling start process methods is not restricted and will cause one more starting of the process at the time of startProcessInstanceByXXX Invocation.
07-10-2013 10:12 AM
07-12-2013 02:58 AM
07-12-2013 09:17 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.