-
1. Re: jbpm 4.3 auto transition in state
ammallex Feb 2, 2010 6:18 AM (in response to ammallex)may be it is a simple question? -
2. Re: jbpm 4.3 auto transition in state
sebastian.s Feb 2, 2010 6:24 AM (in response to ammallex)If this is a transition coming from an automatic acitivity (java task) and there is just one outgoing transition this should be taken regardless of the name. -
3. Re: jbpm 4.3 auto transition in state
ammallex Feb 2, 2010 6:34 AM (in response to sebastian.s)no. i have 3 states -
<state name="s1">
<transition name ="n1" to="s2"/>
<transition name ="n2" to="..."/>
</state><state name="s2">
<transition to="s3"/>
</state><state name="s3">
</state>at the start i am in s1. I make a transition to s2 and i don't want to stay in state s2 (immediately transition from s2 to s3). How can i do it?
actualy i can replace s2 state with <java> block and there declare one transition - but i jast want use a state block.
-
4. Re: jbpm 4.3 auto transition in state
sebastian.s Feb 2, 2010 6:41 AM (in response to ammallex)If you want to proceed from a state-activity to the next activity you are responsible of signaling the execution. Quite logical since this is what a state is used for: to wait for an external signal. It does not make sense to me to have state if you don't want to stay in it for a specific time. So remove the state and use a java activity if you want to perform an action. Otherwise use a custom task which permits you to implement the complete behaviour of the acitvity yourself. -
5. Re: jbpm 4.3 auto transition in state
ammallex Feb 4, 2010 2:33 AM (in response to sebastian.s)you are right. but if we use <java> or <custom> block - we MUST create reference to class and method. i just want create 2 states and in both - create event listeners. and i want that if i enter in first - process go to the second. i can use <java> or <custom> - but it this case i must define java class. -
6. Re: jbpm 4.3 auto transition in state
sebastian.s Feb 4, 2010 4:01 AM (in response to ammallex)You seem to want to have a custom behaviour of an activity, and a very strange one in my eyes. So you have to use a custom task and implement the behaviour yourself. If you have to use such an activity several times you can think about extending jPDL with your own activity. Then you don't need to put a reference to the Java class anymore. However I don't see the point in implementing such kind of behaviour. Maybe I don't understand your use case because I am lacking information. -
7. Re: jbpm 4.3 auto transition in state
ammallex Feb 10, 2010 3:00 AM (in response to sebastian.s)Imagine the situation - You have a state of "Registration". When you log into this state the process should add the event in the history of the document. In this state the process can return. the events of history should not be duplicated and for this reason we divide this state into two states - "pre-registration" and "registration". In a state of "pre-registration" we create the event handler that will add an event in history. And in the state of "registration" we go back - when we want. So when we go into the "pre-registration" we should automatically slipped into "registration".
I can do this by sending a signal to the process - but this is not a good solution - send 2 times the signal (1 for enter to "pre-registration" ans second for go to "registration"). There is only one solution - make block "pre-registration" - "java" or "custom" with one transition by default. But in these blocks, I must define a Java class. But I do not have Java class - I want create only event handler.
-
8. Re: jbpm 4.3 auto transition in state
kukeltje Feb 10, 2010 2:43 PM (in response to ammallex)But I do not have Java class - I want create only event handler.
What do you have in the event handler then? Scripting?
-
9. Re: jbpm 4.3 auto transition in state
ammallex Feb 11, 2010 11:52 AM (in response to kukeltje)my event handler is java code, that create and add history event about document. -
10. Re: jbpm 4.3 auto transition in state
kukeltje Feb 11, 2010 1:58 PM (in response to ammallex)Then I do not get it anymore. You say you have no java class, but you do use a java class..... -
11. Re: jbpm 4.3 auto transition in state
ammallex Feb 12, 2010 4:42 AM (in response to kukeltje)are you offer me to make transition from event handler code? i think it is very bad idea. -
12. Re: jbpm 4.3 auto transition in state
dondragon2 Feb 18, 2010 1:58 PM (in response to sebastian.s)If it is the case that there are more than one transitions but each have conditions which would be evaluated on the response of the tasks performed then how could we make this automatic?
<state name="eval document">
<transition to="submit document"> <condition expr="#{content=="good"}" /> </transition
<transition to="try again"> <condition expr="#{content=="bad"}" /> </transition
<state>