[JBoss-user] [JBoss jBPM] - Re: State events fire order
Cpob, kukeltje, thanks a lot for your help and the clarity of your explanations JBaton View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3954286#3954286 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3954286 Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: State events fire order
What you need to think about is separation of processes. You need to ignore the node enter on to your Node(First) That happened with the previous signal, and does not happen in the signal while your token is in 'First' For example, we have a simple graph, made of 2 simple nodes, A and B. Currently your token is on A. You would then signal the token. Before Signal gets fired. The signal would cause the token to leave A. Leave Node (for node A) fires The token would then enter Node B Node Enter (for node B) fires The token would then be done signalling After Signal You're going to see node leave/enter for 2 separate nodes across a signal event, since that signal causes the transition. The signal method is just a way to tell the token to move to the next node/state/etc on a specific transition). You have to signal the token (ending a task does this as well), for it to move to the next node, which is why you have to have a begin signal before you can have a leave node. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3953992#3953992 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3953992 Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: State events fire order
Read the logging again The token is in state "first", then you signal it and get the following logs: | 13:34:14,151 [Thread-0] DEBUG GraphElement : event 'before-signal' on 'State(first)' for 'Token(/)' | 13:34:14,151 [Thread-0] DEBUG GraphElement : event 'node-leave' on 'State(first)' for 'Token(/)' | 13:34:14,151 [Thread-0] DEBUG GraphElement : event 'transition' on 'Transition(to_end)' for 'Token(/)' | 13:34:14,151 [Thread-0] DEBUG GraphElement : executing action 'action[action]' | 13:34:14,167 [Thread-0] DEBUG VariableContainer : update variable 'message' in 'TokenVariableMap18b81e3' to value 'About to finish!' | 13:34:14,167 [Thread-0] DEBUG GraphElement : event 'node-enter' on 'EndState(end)' for 'Token(/)' | 13:34:14,167 [Thread-0] DEBUG GraphElement : event 'process-end' on 'ProcessDefinition(cpob)' for 'Token(/)' | 13:34:14,167 [Thread-0] DEBUG GraphElement : event 'after-signal' on 'State(first)' for 'Token(/)' | Which is correct, you get a - before signal (which is a way of telling the system: 'hey there is a signal comming' - then you leave state "first" - you are taking the "to_end" transition" - you enter state "end" - the process ends - the signal is completely processed So there is nothing wrong with your logging, you just read it wrong. Remember, jBPM does nothing unless you signal it in one way or another. If you start reading the log from the moment you signal it, everything is correct View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3953991#3953991 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3953991 Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: State events fire order
Hi cpob, Thanks for your help. Using your xml in my (process-runner) program, I get the following log (truncated for page's sanity) | 13:34:13,964 [Thread-0] DEBUG GraphElement : event 'process-start' on 'ProcessDefinition(cpob)' for 'Token(/)' | *** signal ! *** | 13:34:13,964 [Thread-0] DEBUG GraphElement : event 'before-signal' on 'StartState(start)' for 'Token(/)' | 13:34:13,964 [Thread-0] DEBUG GraphElement : event 'node-leave' on 'StartState(start)' for 'Token(/)' | 13:34:13,964 [Thread-0] DEBUG GraphElement : event 'transition' on 'Transition(to_state)' for 'Token(/)' | 13:34:13,964 [Thread-0] DEBUG GraphElement : executing action 'action[action]' | 13:34:14,042 [Thread-0] DEBUG VariableContainer : create variable 'message' in 'TokenVariableMap18b81e3' with value 'Going to the first state!' | 13:34:14,073 [Thread-0] DEBUG Converters : adding converter 'D', 'org.jbpm.context.exe.converter.DoubleToStringConverter' | 13:34:14,073 [Thread-0] DEBUG Converters : adding converter 'C', 'org.jbpm.context.exe.converter.CharacterToStringConverter' | 13:34:14,089 [Thread-0] DEBUG Converters : adding converter 'B', 'org.jbpm.context.exe.converter.BooleanToStringConverter' | 13:34:14,089 [Thread-0] DEBUG Converters : adding converter 'Y', 'org.jbpm.context.exe.converter.BytesToByteArrayConverter' | 13:34:14,104 [Thread-0] DEBUG Converters : adding converter 'A', 'org.jbpm.context.exe.converter.DateToLongConverter' | 13:34:14,104 [Thread-0] DEBUG Converters : adding converter 'R', 'org.jbpm.context.exe.converter.SerializableToByteArrayConverter' | 13:34:14,104 [Thread-0] DEBUG Converters : adding converter 'I', 'org.jbpm.context.exe.converter.IntegerToLongConverter' | 13:34:14,104 [Thread-0] DEBUG Converters : adding converter 'H', 'org.jbpm.context.exe.converter.ShortToLongConverter' | 13:34:14,104 [Thread-0] DEBUG Converters : adding converter 'G', 'org.jbpm.context.exe.converter.FloatToDoubleConverter' | 13:34:14,120 [Thread-0] DEBUG Converters : adding converter 'F', 'org.jbpm.context.exe.converter.FloatToStringConverter' | 13:34:14,120 [Thread-0] DEBUG Converters : adding converter 'E', 'org.jbpm.context.exe.converter.ByteToLongConverter' | 13:34:14,151 [Thread-0] DEBUG GraphElement : event 'node-enter' on 'State(first)' for 'Token(/)' | 13:34:14,151 [Thread-0] DEBUG GraphElement : event 'after-signal' on 'StartState(start)' for 'Token(/)' | *** signal ! *** | 13:34:14,151 [Thread-0] DEBUG GraphElement : event 'before-signal' on 'State(first)' for 'Token(/)' | 13:34:14,151 [Thread-0] DEBUG GraphElement : event 'node-leave' on 'State(first)' for 'Token(/)' | 13:34:14,151 [Thread-0] DEBUG GraphElement : event 'transition' on 'Transition(to_end)' for 'Token(/)' | 13:34:14,151 [Thread-0] DEBUG GraphElement : executing action 'action[action]' | 13:34:14,167 [Thread-0] DEBUG VariableContainer : update variable 'message' in 'TokenVariableMap18b81e3' to value 'About to finish!' | 13:34:14,167 [Thread-0] DEBUG GraphElement : event 'node-enter' on 'EndState(end)' for 'Token(/)' | 13:34:14,167 [Thread-0] DEBUG GraphElement : event 'process-end' on 'ProcessDefinition(cpob)' for 'Token(/)' | 13:34:14,167 [Thread-0] DEBUG GraphElement : event 'after-signal' on 'State(first)' for 'Token(/)' | The program's main part is as simple as that | ... | while(!instance.hasEnded()){ | System.out.println("*** signal ! ***"); | instance.signal(); | } | As you can see, I get the same order than previously. nodeEnter > beforeSignal > nodeLeave > afterSignal But I was wondering about some logs having exactly the same time, I did a program that writes the running class name to a disk and to my surprise, the launch order is still the odd looking one. In my opinion, it would had been more intuitive to have something like nodeEnter > (signal sent) > beforeSignal > afterSignal > nodeLeave Although I don't get the use of the *Signal methods, should look deeper into the documentation. Thanks Cpob JBaton View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3953974#3953974 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3953974 Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: State events fire order
Sorry, I forgot to post my log: 12:46:16,671 DEBUG [GraphElement] event 'before-signal' on 'StartState(start)' for 'Token(/)' | 12:46:16,671 DEBUG [GraphElement] event 'node-leave' on 'StartState(start)' for'Token(/)' | 12:46:16,671 DEBUG [GraphElement] event 'transition' on 'Transition(to node)' for 'Token(/)' | 12:46:16,671 DEBUG [GraphElement] event 'node-enter' on 'TaskNode(node1)' for 'Token(/)' | 12:46:16,671 WARN [StatefulPersistenceContext] Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks == | 12:46:16,671 DEBUG [GraphElement] executing action 'action[node enter action]' | 12:46:16,681 DEBUG [VariableContainer] create variable 'message' in 'TokenVariableMap1b7a261' with value 'NODE ENTER' | 12:46:16,681 DEBUG [GraphElement] event 'task-create' on 'Task(task1)' for 'Token(/)' | 12:46:16,681 DEBUG [GraphElement] event 'after-signal' on 'StartState(start)' for 'Token(/)' View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3953778#3953778 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3953778 Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: State events fire order
I got a different order. You have to have a BEFORE SIGNAL, before you can even leave the node, then you leave the node, then you enter the NEXT NODE,a nd then it's the after signal. Below is the processdefinition.xml I used | | | | | | | | | | | | Going to the first state! | | | | | | | | About to finish! | | | | | | | | | BEFORE SIGNAL | | | | | AFTER-SIGNAL | | | | | NODE ENTER | | | | | Node LEAVE | | | | | View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3953777#3953777 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3953777 Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user