Bug 862506 - Add a Boundary Timer to a Task
Add a Boundary Timer to a Task
Status: NEW
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: jBPM 5 (Show other bugs)
BRMS 5.3.0.GA,BRMS 5.3.1
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Kris Verlaenen
Radovan Synek
Depends On:
  Show dependency treegraph
Reported: 2012-10-03 01:21 EDT by Toshiya Kobayashi
Modified: 2015-07-08 13:31 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 958397 (view as bug list)
Last Closed:
Type: Feature Request
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
jBPMEx70_timer_boundary_event_BRMS531.zip (12.00 KB, application/zip)
2013-03-27 23:09 EDT, Toshiya Kobayashi
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker JBPM-3319 Major Resolved Add a Boundary Event to a Task 2016-04-12 17:16 EDT
JBoss Issue Tracker JBPM-3971 Major Closed Adding a Timer Intermediate Event to a Task causes "java.lang.IllegalArgumentException: Could not parse knowledge" 2016-04-12 17:16 EDT

  None (edit)
Comment 2 JBoss JIRA Server 2013-03-27 06:38:36 EDT
Maciej Swiderski <swiderski.maciej@gmail.com> made a comment on jira JBPM-3971

could you attach the process that you use? Reading the title of this issue looks like you are trying to add intermediate timer event instead of boundary event. They are represented by two different constructs in bpmn2. Boundary events must not have incoming connections as they are attached to another activity where intermediate events must have incoming connection.
Comment 3 JBoss JIRA Server 2013-03-27 06:48:10 EDT
Musharraf Hussain <mhussain@redhat.com> made a comment on jira JBPM-3971

Comment 6 Toshiya Kobayashi 2013-03-27 21:55:07 EDT
Changing the summary to reflect the actual need from a customer.

'Add a Boundary Event to a Task' -> 'Add a Boundary Timer to a Task'
Comment 7 JBoss JIRA Server 2013-03-27 22:58:25 EDT
Toshiya Kobayashi <tkobayas@redhat.com> made a comment on jira JBPM-3971

Hi Maciej,

Yeah, attaching a Timer to an Activity (Task) is the actual requirement from customers. Currently (BRMS 5.3.1) we can attach a Timer Intermediate Event to an Embedded Sub-process (See attached BPMN2-TimerBoundaryEventInterrupting.bpmn2) but customers want to attach it directly to a Task.

Now I think the defaultPackage.newonboarding.bpmn2 is just a wrong process which was written by older Designer which simply generates <bpmn2:intermediateCatchEvent>. I wrote a simple process (defaultPackage.timerBoundaryExample.bpmn2) with BRMS 5.3.1 Designer which generates <bpmn2:boundaryEvent> if I drop a 'Timer Intermediate Event' onto a Task. Then I confirmed that it works with jBPM 5.4.0.Final.

I'm closing this ticket as 'Rejected'.

Comment 8 JBoss JIRA Server 2013-03-27 22:59:09 EDT
Toshiya Kobayashi <tkobayas@redhat.com> updated the status of jira JBPM-3971 to Closed
Comment 10 Toshiya Kobayashi 2013-03-27 23:09:44 EDT
Created attachment 717416 [details]

Attaching a correct test case
Comment 11 Toshiya Kobayashi 2013-03-27 23:14:23 EDT
[Rewriting the description of this BZ]

Description of problem:

Platform BZ for https://issues.jboss.org/browse/JBPM-3319

Steps to Reproduce:
1. Add a Timer Intermediate Event to a Human Task with Web Designer
2. Export as bpmn file
3. Read the bpmn and build the KnowledgeBase

--> Attached jBPMEx70_timer_boundary_event_BRMS531.zip followed these steps.

Actual results:

Throws exception

java.lang.ClassCastException: org.jbpm.workflow.core.node.HumanTaskNode cannot be cast to org.jbpm.workflow.core.node.CompositeContextNode
	at org.jbpm.bpmn2.xml.ProcessHandler.linkBoundaryEvents(ProcessHandler.java:379)
	at org.jbpm.bpmn2.xml.ProcessHandler.end(ProcessHandler.java:136)
	at org.drools.xml.ExtensibleXmlParser.endElement(ExtensibleXmlParser.java:417)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.endElement(XMLSchemaValidator.java:828)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2939)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
	at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
	at org.drools.xml.ExtensibleXmlParser.read(ExtensibleXmlParser.java:296)
	at org.drools.xml.ExtensibleXmlParser.read(ExtensibleXmlParser.java:175)
	at org.jbpm.compiler.xml.XmlProcessReader.read(XmlProcessReader.java:46)
	at org.jbpm.compiler.ProcessBuilderImpl.addProcessFromXml(ProcessBuilderImpl.java:247)
	at org.drools.compiler.PackageBuilder.addProcessFromXml(PackageBuilder.java:621)
	at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:658)
	at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:41)
	at com.sample.ProcessMain.readKnowledgeBase(ProcessMain.java:47)
	at com.sample.ProcessMain.main(ProcessMain.java:27)
ProcessLoadError: unable to parse xml : Exception class java.lang.ClassCastException : org.jbpm.workflow.core.node.HumanTaskNode cannot be cast to org.jbpm.workflow.core.node.CompositeContextNode
Exception in thread "main" java.lang.IllegalArgumentException: Could not parse knowledge.
	at org.drools.builder.impl.KnowledgeBuilderImpl.newKnowledgeBase(KnowledgeBuilderImpl.java:71)
	at com.sample.ProcessMain.readKnowledgeBase(ProcessMain.java:48)
	at com.sample.ProcessMain.main(ProcessMain.java:27)

Expected results:

Run and Timer works

Note You need to log in before you can comment on or make changes to this bug.