Hi,
I have defined a process definition with Nodes. I want to know how Nodes can be used. i got that actions can be added for Node under four different events namely
1. Before Signal
2. After Signal
3. Node enter
4. Node Leave
so to test the sequence of this I created 4 Action Handlers with just a SOP that which handler it is. And assigned to action on each of these events.
When I execute this using Test class I am getting following error:
16:47:30,525 DEBUG JpdlXmlReader : process definition line 24: cvc-complex-type.2.4.a: Invalid content was found starting with element 'transition'. One of '{"http://jbpm.org/3/jpdl":event, "http://jbpm.org/3/jpdl":timer, "http://jbpm.org/3/jpdl":exception-handler}' is expected.
Here is my process definition
<?xml version="1.0" encoding="UTF-8"?>
<process-definition
xmlns="http://jbpm.org/3/jpdl"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jbpm.org/3/jpdl http://jbpm.org/xsd/jpdl-3.0.xsd "
name="simple">
<start-state name="start">
<transition name="to_node1" to="node1"></transition>
</start-state>
<node name="node1">
<event type="node-enter">
<action name="action1" class="com.sample.action.NodeEnterActionHandler"></action>
</event>
<event type="before-signal">
<action name="action1" class="com.sample.action.BeforeSignalActionHandler"></action>
</event>
<event type="after-signal">
<action name="action1" class="com.sample.action.AfterSignalActionHandler"></action>
</event>
<event type="node-leave">
<action name="action1" class="com.sample.action.NodeExitActionHandler"></action>
</event>
<transition name="to_end1" to="end1">
</transition>
</node>
<end-state name="end1"></end-state>
</process-definition>
what I understand from the error is some tag is missing or wrongly placed near 'transition' element. But what I created was from the graphical tool and didnot change the process definition XML. Then what causes the definition XML to be wrong and not to conform with the expected element structure?
Thanks,
Nilesh