04-21-2011 07:32 AM
<?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">
<process id="Timer1" name="Timer1">
<startEvent id="startevent1" name="Start">
</startEvent>
<endEvent id="endevent1" name="End"></endEvent>
<serviceTask id="servicetask1" name="Service Task" activiti:class="org.activity.timer.Service2"></serviceTask>
<intermediateCatchEvent id="timer1" name="Timer1">
<timerEventDefinition id="tmrcfg1">
<timeDuration>PT100S</timeDuration>
</timerEventDefinition>
</intermediateCatchEvent>
<sequenceFlow id="flow1003" name="" sourceRef="timer1" targetRef="servicetask1"></sequenceFlow>
<sequenceFlow id="flow1001" name="" sourceRef="startevent1" targetRef="timer1"></sequenceFlow>
<sequenceFlow id="flow1002" name="" sourceRef="servicetask1" targetRef="endevent1"></sequenceFlow>
</process>
</definitions>
public static void main(String[] args) {
Deployment deployment = ProcessEngines.getDefaultProcessEngine().getRepositoryservice()
.createDeployment().addClasspathResource("Timer1").deploy();
ProcessEngines.getDefaultProcessEngine().getRuntimeservice().startProcessInstanceByKey("Timer1").getId();
}
public class Service2 implements JavaDelegate {
public void execute(DelegateExecution execution) throws Exception {
System.out.println("Process 2 done");
}
}
04-22-2011 03:06 AM
04-22-2011 03:32 AM
When execution arrives at the timer event, it doesnt use your thread for waiting. If we would do that, it woudldnt be good for performance.Thanks for the reply, but
So a background threadpool is taking care of executing the rest of the process.
So that explains what you see: the main method executed, but the background thread pool has never the time to kick in.
04-22-2011 03:49 AM
10-09-2015 06:13 AM
10-13-2015 06:53 AM
12-22-2015 09:15 AM
12-23-2015 04:04 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.