05-20-2016 12:21 PM
<process id="XZY" name="XYZ Process" isExecutable="true">
<startEvent id="startevent1" name="Start"></startEvent>
<serviceTask id="CreateTask" name="Create Task" activiti:async="true" activiti:expression="${TaskManager.createTask(execution.getId())}"></serviceTask>
<sequenceFlow id="flow1" sourceRef="startevent1" targetRef="CreateTask"></sequenceFlow>
<endEvent id="endevent1" name="End"></endEvent>
<sequenceFlow id="flow2" sourceRef="CreateTask" targetRef="endevent1"></sequenceFlow>
</process>
protected ProcessInstance initProcessInstance(String processKey, Map variables) {
System.out.println("1. Inside initProcessInstance for " + processKey);
ProcessInstance processInstance = null;
System.out.println("2. Inside initProcessInstance for " + processKey);
RuntimeService runTimeService = ProcessEngines.getDefaultProcessEngine().getRuntimeService();
System.out.println("3. Inside initProcessInstance for " + runTimeService);
if (variables == null) {
System.out.println("4. Inside initProcessInstance for " + variables);
processInstance = runTimeService.startProcessInstanceByKey(processKey);
} else {
System.out.println("5. Inside initProcessInstance for " + variables);
processInstance = runTimeService.startProcessInstanceByKey(processKey, variables);
}
System.out.println("6. Inside initProcessInstance for " + variables);
return processInstance;
}
05-20-2016 01:46 PM
05-31-2016 04:59 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.