12-10-2016 05:10 AM
Hi
I was trying to the effect of shutdown of async executor and then triggered a process. As per my understanding, if the configuration is for AsyncExecutorEnabled set to true and AsyncExecutorActivate set to true and shutdown Async executor service, then there will be an entry to start the process, however execution will not proceed as async executor is not active.
I found that it gets triggered and execution starts. I am not sure if this is the bug as known behavior.
Below is the sample code:
{code:java}
ProcessEngineConfiguration.createStandaloneInMemProcessEngineConfiguration()
.setAsyncExecutorEnabled(true)
.setAsyncExecutorActivate(true)
.setCreateDiagramOnDeploy(true)
.setJobExecutorActivate(false)
.buildProcessEngine();
engine.getProcessEngineConfiguration()
.getAsyncExecutor()
.shutdown();
{code}
12-10-2016 11:50 AM
Hi
I think I found the solution. Its already provided in activiti user guide at below location.
12-10-2016 05:14 AM
This is the sample process that I am trying to test
<?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:xsd="http://www.w3.org/2001/XMLSchema" 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="myProcess" name="My process" isExecutable="true">
<startEvent id="startevent1" name="Start" activiti:async="true" activiti:initiator="anil">
<extensionElements>
<activiti:formProperty id="firstName" name="First Name" type="string" variable="firstName" required="true"></activiti:formProperty>
<activiti:formProperty id="lastName" name="Last Name" type="string" variable="lastName" required="true"></activiti:formProperty>
</extensionElements>
</startEvent>
<scriptTask id="fullName" name="Full Name" scriptFormat="groovy" activiti:autoStoreVariables="false">
<script>execution.setVariable("fullName" , execution.getVariable("firstName") + " " + execution.getVariable("lastName"));</script>
</scriptTask>
<sequenceFlow id="flow5" sourceRef="startevent1" targetRef="fullName"></sequenceFlow>
<endEvent id="endevent1" name="End"></endEvent>
<sequenceFlow id="flow6" sourceRef="fullName" targetRef="printTask"></sequenceFlow>
<scriptTask id="printTask" name="Print Task" scriptFormat="groovy" activiti:autoStoreVariables="false">
<script>System.out.println("First Name :: " + execution.getVariable("firstName"));
System.out.println("Last Name :: " + execution.getVariable("lastName"));
System.out.println("Full Name :: " + execution.getVariable("fullName"));</script>
</scriptTask>
<sequenceFlow id="flow7" sourceRef="printTask" targetRef="endevent1"></sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_myProcess">
<bpmndi:BPMNPlane bpmnElement="myProcess" id="BPMNPlane_myProcess">
<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
<omgdc:Bounds height="35.0" width="35.0" x="30.0" y="150.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="fullName" id="BPMNShape_fullName">
<omgdc:Bounds height="55.0" width="105.0" x="180.0" y="140.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
<omgdc:Bounds height="35.0" width="35.0" x="660.0" y="150.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="printTask" id="BPMNShape_printTask">
<omgdc:Bounds height="55.0" width="105.0" x="400.0" y="140.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
<omgdi:waypoint x="65.0" y="167.0"></omgdi:waypoint>
<omgdi:waypoint x="180.0" y="167.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
<omgdi:waypoint x="285.0" y="167.0"></omgdi:waypoint>
<omgdi:waypoint x="400.0" y="167.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
<omgdi:waypoint x="505.0" y="167.0"></omgdi:waypoint>
<omgdi:waypoint x="660.0" y="167.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
12-10-2016 11:50 AM
Hi
I think I found the solution. Its already provided in activiti user guide at below location.
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.