[jboss-user] [jBPM] - Timer boundary event on WorkItemNode

Alex Pavlov do-not-reply at jboss.com
Sun Apr 17 15:57:11 EDT 2011


Alex Pavlov [http://community.jboss.org/people/rushproject] created the discussion

"Timer boundary event on WorkItemNode"

To view the discussion, visit: http://community.jboss.org/message/600495#600495

--------------------------------------------------------------
jBPM 5 does not allow attaching timer boundary events to WorkItemNode. The following fragment:


<receiveTask completionQuantity="1" id="_2_1_21" implementation="##WebService" instantiate="false"
                     isForCompensation="false" messageRef="ID_30607364_7317_2206_0052_000400200024"
                     name="Receive confirmation" startQuantity="1">
            <incoming>_2_1_22</incoming>
            <outgoing>_2_1_25</outgoing>
        </receiveTask>

        <boundaryEvent attachedToRef="_2_1_21" id="_2_1_21_1" name="48 Hours">
            <outgoing>_2_1_21_2</outgoing>
            <timerEventDefinition id="ID_22607364_7317_2206_0052_000400200027">
                <timeCycle>P48H</timeCycle>
            </timerEventDefinition>
        </boundaryEvent>



results in exception:

java.lang.ClassCastException: org.jbpm.workflow.core.node.WorkItemNode cannot be cast to org.jbpm.workflow.core.node.CompositeContextNode

while executing this line (ProcessHandler.java, line #280):

CompositeContextNode compositeNode = (CompositeContextNode) attachedNode;

Both CompositeContextNode and WorkItemNode extend StateBasedNode class, which defines addTimer() - the only method called from ProcessHandler while processing timer boundary event. In other words, changing the offending line to

StateBasedNode compositeNode = (StateBasedNode) attachedNode;

will compile and will not result in run time exception. However, will it run? In other words, would it be sufficient to enable timer boundary events for work item nodes?
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/600495#600495]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110417/190d58ed/attachment.html 


More information about the jboss-user mailing list