09-15-2015 07:44 PM
254 - org.activiti.engine - 5.17.0 | Error while generating process diagram, image will not be stored in repository
java.lang.IllegalArgumentException: input == null!
at javax.imageio.ImageIO.read(ImageIO.java:1348)[:1.7.0_80]…
<?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" 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="assignServiceRequest" name="Assign Service Request" isExecutable="true">
<startEvent id="start">
<documentation>The start of this process is a task looking to be assigned</documentation>
</startEvent>
<serviceTask id="attendantDetailsTask" name="Check Attendents Details" activiti:class="com.vizexplorer.techviz.tasks.AttendantDetailsTask"></serviceTask>
<sequenceFlow id="flow1" sourceRef="start" targetRef="attendantDetailsTask"></sequenceFlow>
<exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway"></exclusiveGateway>
<sequenceFlow id="flow2" sourceRef="attendantDetailsTask" targetRef="exclusivegateway1"></sequenceFlow>
<serviceTask id="assignTaskToUserTask" name="Assign Task to Attendant" activiti:class="com.vizexplorer.techviz.tasks.AttendantAssignTask"></serviceTask>
<sequenceFlow id="flow3" name="Attendants available in section" sourceRef="exclusivegateway1" targetRef="assignTaskToUserTask">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${attendantAvailable == true}]]></conditionExpression>
</sequenceFlow>
<serviceTask id="notifySupervisorTask" name="Notify Supervisor" activiti:class="com.vizexplorer.techviz.tasks.NotifySupervisorTask"></serviceTask>
<sequenceFlow id="flow4" name="No attendants available" sourceRef="exclusivegateway1" targetRef="notifySupervisorTask">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${attendantAvailable == false}]]></conditionExpression>
</sequenceFlow>
<endEvent id="endevent1" name="End"></endEvent>
<sequenceFlow id="flow6" sourceRef="assignTaskToUserTask" targetRef="endevent1"></sequenceFlow>
<intermediateCatchEvent id="timerintermediatecatchevent1" name="TimerCatchEvent">
<timerEventDefinition>
<timeDuration>PT10S</timeDuration>
</timerEventDefinition>
</intermediateCatchEvent>
<sequenceFlow id="flow7" sourceRef="notifySupervisorTask" targetRef="timerintermediatecatchevent1"></sequenceFlow>
<sequenceFlow id="flow8" sourceRef="timerintermediatecatchevent1" targetRef="attendantDetailsTask"></sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_assignServiceRequest">
<bpmndi:BPMNPlane bpmnElement="assignServiceRequest" id="BPMNPlane_assignServiceRequest">
<bpmndi:BPMNShape bpmnElement="start" id="BPMNShape_start">
<omgdc:Bounds height="35.0" width="35.0" x="50.0" y="115.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="attendantDetailsTask" id="BPMNShape_attendantDetailsTask">
<omgdc:Bounds height="65.0" width="105.0" x="160.0" y="100.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="exclusivegateway1" id="BPMNShape_exclusivegateway1">
<omgdc:Bounds height="40.0" width="40.0" x="340.0" y="112.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="assignTaskToUserTask" id="BPMNShape_assignTaskToUserTask">
<omgdc:Bounds height="61.0" width="105.0" x="520.0" y="102.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="notifySupervisorTask" id="BPMNShape_notifySupervisorTask">
<omgdc:Bounds height="55.0" width="105.0" x="308.0" y="240.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
<omgdc:Bounds height="35.0" width="35.0" x="750.0" y="115.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="timerintermediatecatchevent1" id="BPMNShape_timerintermediatecatchevent1">
<omgdc:Bounds height="35.0" width="35.0" x="195.0" y="250.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
<omgdi:waypoint x="85.0" y="132.0"></omgdi:waypoint>
<omgdi:waypoint x="160.0" y="132.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
<omgdi:waypoint x="265.0" y="132.0"></omgdi:waypoint>
<omgdi:waypoint x="340.0" y="132.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
<omgdi:waypoint x="380.0" y="132.0"></omgdi:waypoint>
<omgdi:waypoint x="520.0" y="132.0"></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds height="42.0" width="100.0" x="389.0" y="100.0"></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
<omgdi:waypoint x="360.0" y="152.0"></omgdi:waypoint>
<omgdi:waypoint x="360.0" y="240.0"></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds height="42.0" width="100.0" x="369.0" y="169.0"></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
<omgdi:waypoint x="625.0" y="132.0"></omgdi:waypoint>
<omgdi:waypoint x="750.0" y="132.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
<omgdi:waypoint x="308.0" y="267.0"></omgdi:waypoint>
<omgdi:waypoint x="230.0" y="267.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">
<omgdi:waypoint x="212.0" y="250.0"></omgdi:waypoint>
<omgdi:waypoint x="212.0" y="227.0"></omgdi:waypoint>
<omgdi:waypoint x="212.0" y="165.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
09-16-2015 07:18 PM
09-17-2015 09:44 PM
09-22-2015 02:36 AM
09-23-2015 09:09 AM
09-24-2015 02:58 AM
org.activiti.engine.test.bpmn.event.timer.IntermediateTimerEventTest#testCatchingTimerEvent
uses following bpmn20 process model:
<?xml version="1.0" encoding="UTF-8"?>
<definitions id="definitions" 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"
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:activiti="http://activiti.org/bpmn"
targetNamespace="Examples">
<process id="intermediateTimerEventExample" name="Timer intermediate event example">
<startEvent id="theStart"/>
<sequenceFlow id="flow1" sourceRef="theStart" targetRef="timer"/>
<intermediateCatchEvent id="timer">
<timerEventDefinition>
<timeDuration>PT5M</timeDuration>
</timerEventDefinition>
</intermediateCatchEvent>
<sequenceFlow id="flow2" sourceRef="timer" targetRef="theEnd"/>
<endEvent id="theEnd"/>
</process>
<bpmndi:BPMNDiagram id="diagram">
<bpmndi:BPMNPlane bpmnElement="intermediateTimerEventExample" id="intermediateTimerEventExample_di">
<bpmndi:BPMNShape bpmnElement="theStart" id="theStart_di">
<omgdc:Bounds height="30.0" width="30.0" x="114.0" y="185.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="timer" id="timer_di">
<omgdc:Bounds height="30.0" width="30.0" x="195.0" y="185.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="theEnd" id="theEnd_di">
<omgdc:Bounds height="28.0" width="28.0" x="270.0" y="186.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow1" id="flow1_di">
<omgdi:waypoint x="144.0" y="200.0"/>
<omgdi:waypoint x="195.0" y="200.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow2" id="flow2_di">
<omgdi:waypoint x="225.0" y="200.0"/>
<omgdi:waypoint x="270.0" y="200.0"/>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
<?xml version="1.0" encoding="UTF-8"?>
<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.xsd">
<bean id="processEngineConfiguration"
class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
<property name="jdbcUrl" value="jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000" />
<property name="jdbcDriver" value="org.h2.Driver" />
<property name="jdbcUsername" value="sa" />
<property name="jdbcPassword" value="" />
<!– Database configurations –>
<property name="databaseSchemaUpdate" value="drop-create" />
<!– job executor configurations –>
<property name="jobExecutorActivate" value="false" />
<property name="asyncExecutor" ref="asyncExecutor" />
<property name="asyncExecutorEnabled" value="true" />
<property name="asyncExecutorActivate" value="false" />
<property name="defaultFailedJobWaitTime" value="1" />
<property name="asyncFailedJobWaitTime" value="1" />
<!– mail server configurations –>
<property name="mailServerPort" value="5025" />
<property name="mailServers">
<map>
<entry key="myEmailTenant">
<bean class="org.activiti.engine.cfg.MailServerInfo">
<property name="mailServerHost" value="localhost" />
<property name="mailServerPort" value="5025" />
<property name="mailServerUseSSL" value="false" />
<property name="mailServerUseTLS" value="false" />
<property name="mailServerDefaultFrom" value="activiti@myTenant.com" />
<property name="mailServerUsername" value="activiti@myTenant.com" />
<property name="mailServerPassword" value="password" />
</bean>
</entry>
</map>
</property>
<property name="history" value="full" />
</bean>
<bean id="asyncExecutor" class="org.activiti.engine.impl.asyncexecutor.DefaultAsyncJobExecutor">
<property name="defaultAsyncJobAcquireWaitTimeInMillis" value="1000" />
<property name="defaultTimerJobAcquireWaitTimeInMillis" value="1000" />
</bean>
</beans>
@Deployment// deploys model to the engine (based on the testclass.method name (IntermediateTimerEventTest.testCatchingTimerEvent.bpmn20.xml)
public void testCatchingTimerEvent() throws Exception {
// Set the clock fixed
Date startTime = new Date();
// After process start, there should be timer created
ProcessInstance pi = runtimeService.startProcessInstanceByKey("intermediateTimerEventExample");
JobQuery jobQuery = managementService.createJobQuery().processInstanceId(pi.getId());
assertEquals(1, jobQuery.count());
// After setting the clock to time '50minutes and 5 seconds', the second timer should fire
processEngineConfiguration.getClock().setCurrentTime(new Date(startTime.getTime() + ((50 * 60 * 1000) + 5000))); // setting the time to the future (5 minutes) (yes activiti can work in virtual time)
waitForJobExecutorToProcessAllJobs(5000L, 25L); // starts jobexecutor and process all jobs.
assertEquals(0, jobQuery.count());
assertProcessEnded(pi.getProcessInstanceId());
}
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.