[JBoss jBPM] - A question to the DecisionNode
by hamtho2
Hi,
I´ve got a question concerning the DecisionNode. As far as I can read from the documentation the first transition, that resolves to true within a DecisionNode will be used.
Unfortunately I experienced a different behaviour for my test-process.
This is part of what I have defined:
| <start-state name="start">
| <transition to="isExceedingOrdered" />
| </start-state>
|
| <decision name="isExceedingOrdered">
| <event type="node-enter">
| <script><expression>System.out.println(executionContext.getNode().getName() + " entered");</expression></script>
| </event>
| <transition name="yes" to="isExceedingBuilt">
| <condition expression="#{contextInstance.variables.orderingState >= 160}" />
| </transition>
| <transition name="no" to="ordered">
| <!-- <condition expression="#{contextInstance.variables.orderingState.ivsCode lt 160}" /> -->
| </transition>
| </decision>
|
| <state name="ordered">
| <transition to="isExceedingOrdered" name="state change"></transition>
| </state>
|
| <decision name="isExceedingBuilt">
| <transition to="built" name="no">
| <condition expression="#{orderingState >= 182}"></condition>
| </transition>
| <transition to="fork" name="yes"></transition>
| </decision>
|
| <state name="built">
| <transition to="isExceedingBuilt" name="state change"></transition>
| </state>
|
In my first state a set the variable through a java test-class using
| pi.getContextInstance().setVariable(orderingstate, 1);
|
So as I would say, in the first decision-node (named "isExceedingOrdered") after the starte-node, the first transition should result in false and then use the second transition (named "no"), because it does not have condition, therefor should result in true and then wait in the state "ordered". Unfortunately this works only if I put a condition in the second transition as well (as seen commented in my code above) otherwise it goes directly in the state-node "built". But this is only the case, when I define my transition "no" in "isExceedingBuilt" at first, no matter of what the result of the condition is.
So this seems a bit strange to me, but possiblly I misunderstood something. So maybe someone can point me to the right direction.
Thanks
Thomas
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4156355#4156355
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4156355
17 years, 10 months
[Installation, Configuration & DEPLOYMENT] - SOS: pb circular dependency between EJBs
by Nouredine13
I have asked the last time the problem of circular dependencies between EJB, there is someone who responded me and telling me to use the annotation @IgnoreDependency to one of the instance of Ejb injection.
it solves the problem by half:
I explain: when I use default injecting dependance with @EJB without specifying the name attribute, Jboss solve reference, in this case @ IgnoreDependency works well. By when I specifie the name of reference( @EJB(name="ejb/someEJB"...) that does not work.
example:
Hello1Bean classe :
@EJBs(
{ @EJB(name="ejb/Hello2", beanInterface=Hello2.class, beanName="Hello2Bean")
})
public @Stateless class Hello1Bean implements Hello1 {
@IgnoreDependency
@EJB(name="ejb/Hello2")
private Hello2 hello;
and Hello2Bean Classe :
@EJBs(
{@EJB(name="ejb/Hello1", beanInterface=Hello1.class,beanName="Hello1Bean")
})
public @Stateless class Hello2LocalBean implements Hello2Local {
@IgnoreDependency
@EJB(name="ejb/Hello1")
private Hello1 hello;
with this case , i Have this probleme :
--- MBeans waiting for other MBeans ---
ObjectName: jboss.j2ee:jar=cyclic.jar,name=Hello2Bean,service=EJB3
State: NOTYETINSTALLED
I Depend On:
jboss.j2ee:jar=cyclic.jar,name=Hello1Bean,service=EJB3
Depends On Me:
jboss.j2ee:jar=cyclic.jar,name=Hello1Bean,service=EJB3
ObjectName: jboss.j2ee:jar=cyclic.jar,name=Hello1Bean,service=EJB3
State: NOTYETINSTALLED
I Depend On:
jboss.j2ee:jar=cyclic.jar,name=Hello2Bean,service=EJB3
Depends On Me:
jboss.j2ee:jar=cyclic.jar,name=Hello2Bean,service=EJB3
if someone has a solution, I currently work on the migration of a real application, and I have a major problem for progress.
Thank's a lot.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4156353#4156353
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4156353
17 years, 10 months
[JBoss jBPM] - Re: replication of task at runtime
by WalterTaus
Hi,
I have now implemented this ForEachForkHandler and it works. However, I have now come up with an extended scenario.
In my ForEachForkHandler I create 4 tasks. However, in specific situations I want already to continue when the first two tasks are completed. Therefore, I have tried to implement a kind of housekeeping handler which I call from the join to get rid of the "unnecessary" tasks.
My process consists of
1) fork
2) 4 activities which have been generated by the ForEachForkHandler
3) join
When entering the join I call setNOutOfM with an appropriate value. Secondly I invoke the handler listed below:
| ublic class MultiinstanceHouseKeepingHandler implements ActionHandler {
|
| @Override
| public void execute(ExecutionContext ctx) throws Exception {
| // TODO Auto-generated method stub
| Token t = ctx.getToken();
| Collection til = ctx.getTaskMgmtInstance().getTaskInstances();
| Map childTokenList = t.getParent().getChildren();
| Set ks = childTokenList.keySet();
| Iterator it = ks.iterator();
| while (it.hasNext()) {
| Token ct = (Token)childTokenList.get(it.next());
| if (ct == t)
| continue;
| Iterator itil = til.iterator();
| while (itil.hasNext()) {
| TaskInstance ti = (TaskInstance)itil.next();
| if (ti.getToken() == ct) {
| ti.cancel();
| ct.end();
| break;
| }
| }
| }
| }
| }
|
The process continues correctly with the task following the join. However, I cannot get rid of the other unwanted tasks and they stay forever on my worklist.
What am I doing wrong here?
Thanks,
Walter
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4156348#4156348
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4156348
17 years, 10 months