[jboss-user] [JBoss jBPM] - Re: Getting context variable

roccolocko do-not-reply at jboss.com
Mon Mar 5 19:35:58 EST 2007


I don't know if anybody can see my posts, but here is the answer to my previous post in case somebody was wondering hehe
public class AmountUpdate implements ActionHandler {
  |   public void execute(ExecutionContext ctx) throws Exception {
  |     // business logic
  |     Float erpAmount = ...get amount from erp-system...;
  |     Float processAmount = (Float) ctx.getContextInstance().getVariable("amount");
  |     float result = erpAmount.floatValue() + processAmount.floatValue();
  |     ...update erp-system with the result...;
  |     
  |     // graph execution propagation
  |     if (result > 5000) {
  |       ctx.leaveNode(ctx, "big amounts");
  |     } else {
  |       ctx.leaveNode(ctx, "small amounts");
  |     }
  |   }
  | }

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4025255#4025255

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4025255



More information about the jboss-user mailing list