Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 935571 Details for
Bug 1139528
java.lang.NullPointerException at org.jbpm.process.core.timer.impl.QuartzSchedulerService$InmemoryTimerJobInstanceDelegate.getJobHandle()
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
BZ1139528-testcase-6.0.x-incomplete.diff
BZ1139528-testcase-6.0.x-incomplete.diff (text/plain), 7.81 KB, created by
Toshiya Kobayashi
on 2014-09-09 08:03:42 UTC
(
hide
)
Description:
BZ1139528-testcase-6.0.x-incomplete.diff
Filename:
MIME Type:
Creator:
Toshiya Kobayashi
Created:
2014-09-09 08:03:42 UTC
Size:
7.81 KB
patch
obsolete
>diff --git a/jbpm-test/src/test/java/org/jbpm/test/timer/GlobalQuartzDBTimerServiceTest.java b/jbpm-test/src/test/java/org/jbpm/test/timer/GlobalQuartzDBTimerServiceTest.java >index 1256c94..664631a 100644 >--- a/jbpm-test/src/test/java/org/jbpm/test/timer/GlobalQuartzDBTimerServiceTest.java >+++ b/jbpm-test/src/test/java/org/jbpm/test/timer/GlobalQuartzDBTimerServiceTest.java >@@ -3,7 +3,9 @@ package org.jbpm.test.timer; > import java.util.ArrayList; > import java.util.Arrays; > import java.util.Collection; >+import java.util.HashMap; > import java.util.List; >+import java.util.Map; > > import org.drools.core.time.TimerService; > import org.jbpm.process.core.timer.TimerServiceRegistry; >@@ -208,5 +210,61 @@ public class GlobalQuartzDBTimerServiceTest extends GlobalTimerServiceBaseTest { > Thread.sleep(5000); > > } >+ >+ @Test >+ public void testContinueLoopTimer() throws Exception { >+ // BZ-1139528 >+ >+ // prepare listener to assert results >+ final List<Long> timerExporations = new ArrayList<Long>(); >+ ProcessEventListener listener = new DefaultProcessEventListener(){ >+ @Override >+ public void afterNodeLeft(ProcessNodeLeftEvent event) { >+ if (event.getNodeInstance().getNodeName().equals("timer")) { >+ timerExporations.add(event.getProcessInstance().getId()); >+ } >+ } >+ }; >+ >+ // No special configuration for TimerService in order to test RuntimeManager default >+ environment = RuntimeEnvironmentBuilder.Factory.get() >+ .newDefaultBuilder() >+ .addAsset(ResourceFactory.newClassPathResource("BPMN2-IntermediateCatchEventTimerLoop.bpmn2"), ResourceType.BPMN2) >+ .registerableItemsFactory(new TestRegisterableItemsFactory(listener)) >+ .get(); >+ manager = getManager(environment); >+ >+ RuntimeEngine runtime = manager.getRuntimeEngine(ProcessInstanceIdContext.get()); >+ KieSession ksession = runtime.getKieSession(); >+ >+ Map<String, Object> params = new HashMap<String, Object>(); >+ params.put("counter", 0); >+ ProcessInstance processInstance = ksession.startProcess("IntermediateCatchEvent", params); >+ >+ Thread.sleep(5000); // Make sure a Timer is triggered once >+ >+ assertEquals(1, timerExporations.size()); >+ >+ manager.disposeRuntimeEngine(runtime); >+ manager.close(); >+ >+ Thread.sleep(5000); // Wait so the timer gets overdue >+ >+ // ---- restart ---- >+ >+ environment = RuntimeEnvironmentBuilder.Factory.get() >+ .newDefaultBuilder() >+ .addAsset(ResourceFactory.newClassPathResource("BPMN2-IntermediateCatchEventTimerLoop.bpmn2"), ResourceType.BPMN2) >+ .registerableItemsFactory(new TestRegisterableItemsFactory(listener)) >+ .get(); >+ manager = getManager(environment); >+ >+ Thread.sleep(5000); >+ >+ assertEquals(2, timerExporations.size()); >+ >+ manager.disposeRuntimeEngine(runtime); >+ manager.close(); >+ } > > } >diff --git a/jbpm-test/src/test/resources/BPMN2-IntermediateCatchEventTimerLoop.bpmn2 b/jbpm-test/src/test/resources/BPMN2-IntermediateCatchEventTimerLoop.bpmn2 >new file mode 100644 >index 0000000..d1e2d34 >--- /dev/null >+++ b/jbpm-test/src/test/resources/BPMN2-IntermediateCatchEventTimerLoop.bpmn2 >@@ -0,0 +1,100 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<definitions id="Definition" >+ targetNamespace="http://www.example.org/MinimalExample" >+ typeLanguage="http://www.java.com/javaTypes" >+ expressionLanguage="http://www.mvel.org/2.0" >+ xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" >+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >+ xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" >+ xmlns:g="http://www.jboss.org/drools/flow/gpd" >+ xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" >+ xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" >+ xmlns:di="http://www.omg.org/spec/DD/20100524/DI" >+ xmlns:tns="http://www.jboss.org/drools"> >+ >+ <itemDefinition id="_counterItem" structureRef="Integer" /> >+ >+ <process processType="Private" isExecutable="true" id="IntermediateCatchEvent" name="IntermediateCatchEvent Process" > >+ >+ <!-- process variables --> >+ <property id="counter" itemSubjectRef="_counterItem"/> >+ >+ <!-- nodes --> >+ <startEvent id="_1" name="StartProcess" isInterrupting="true"/> >+ <intermediateCatchEvent id="_3" name="timer" > >+ <timerEventDefinition> >+ <timeCycle xsi:type="tFormalExpression">3s</timeCycle> >+ </timerEventDefinition> >+ </intermediateCatchEvent> >+ <scriptTask id="_4" name="Event" scriptFormat="http://www.java.com/java" > >+ <script>System.out.println("Timer triggered"); >+System.out.println("counter = " + kcontext.getVariable("counter")); >+kcontext.setVariable("counter", counter+1); >+</script> >+ </scriptTask> >+ <endEvent id="_5" name="EndProcess" /> >+ <exclusiveGateway id="_6" name="Gateway" gatewayDirection="Diverging" /> >+ <exclusiveGateway id="_7" name="Gateway" gatewayDirection="Converging" /> >+ >+ <!-- connections --> >+ <sequenceFlow id="_7-_3" sourceRef="_7" targetRef="_3" /> >+ <sequenceFlow id="_3-_4" sourceRef="_3" targetRef="_4" /> >+ <sequenceFlow id="_6-_5" sourceRef="_6" targetRef="_5" name="constraint" tns:priority="1" > >+ <conditionExpression xsi:type="tFormalExpression" language="http://www.java.com/java" >return (counter > 2);</conditionExpression> >+ </sequenceFlow> >+ <sequenceFlow id="_4-_6" sourceRef="_4" targetRef="_6" /> >+ <sequenceFlow id="_1-_7" sourceRef="_1" targetRef="_7" /> >+ <sequenceFlow id="_6-_7" sourceRef="_6" targetRef="_7" name="constraint" tns:priority="1" > >+ <conditionExpression xsi:type="tFormalExpression" language="http://www.java.com/java" >return (counter <= 2);</conditionExpression> >+ </sequenceFlow> >+ >+ </process> >+ >+ <bpmndi:BPMNDiagram> >+ <bpmndi:BPMNPlane bpmnElement="IntermediateCatchEvent" > >+ <bpmndi:BPMNShape bpmnElement="_1" > >+ <dc:Bounds x="50" y="51" width="48" height="48" /> >+ </bpmndi:BPMNShape> >+ <bpmndi:BPMNShape bpmnElement="_3" > >+ <dc:Bounds x="161" y="151" width="48" height="48" /> >+ </bpmndi:BPMNShape> >+ <bpmndi:BPMNShape bpmnElement="_4" > >+ <dc:Bounds x="292" y="150" width="80" height="48" /> >+ </bpmndi:BPMNShape> >+ <bpmndi:BPMNShape bpmnElement="_5" > >+ <dc:Bounds x="430" y="54" width="48" height="48" /> >+ </bpmndi:BPMNShape> >+ <bpmndi:BPMNShape bpmnElement="_6" > >+ <dc:Bounds x="305" y="50" width="48" height="48" /> >+ </bpmndi:BPMNShape> >+ <bpmndi:BPMNShape bpmnElement="_7" > >+ <dc:Bounds x="158" y="51" width="48" height="48" /> >+ </bpmndi:BPMNShape> >+ <bpmndi:BPMNEdge bpmnElement="_7-_3" > >+ <di:waypoint x="182" y="75" /> >+ <di:waypoint x="185" y="175" /> >+ </bpmndi:BPMNEdge> >+ <bpmndi:BPMNEdge bpmnElement="_3-_4" > >+ <di:waypoint x="185" y="175" /> >+ <di:waypoint x="332" y="174" /> >+ </bpmndi:BPMNEdge> >+ <bpmndi:BPMNEdge bpmnElement="_6-_5" > >+ <di:waypoint x="329" y="74" /> >+ <di:waypoint x="454" y="78" /> >+ </bpmndi:BPMNEdge> >+ <bpmndi:BPMNEdge bpmnElement="_4-_6" > >+ <di:waypoint x="332" y="174" /> >+ <di:waypoint x="329" y="74" /> >+ </bpmndi:BPMNEdge> >+ <bpmndi:BPMNEdge bpmnElement="_1-_7" > >+ <di:waypoint x="74" y="75" /> >+ <di:waypoint x="182" y="75" /> >+ </bpmndi:BPMNEdge> >+ <bpmndi:BPMNEdge bpmnElement="_6-_7" > >+ <di:waypoint x="329" y="74" /> >+ <di:waypoint x="182" y="75" /> >+ </bpmndi:BPMNEdge> >+ </bpmndi:BPMNPlane> >+ </bpmndi:BPMNDiagram> >+ >+</definitions> >\ No newline at end of file
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1139528
:
935558
| 935571 |
935991