@Test
 public void testLoadNoComponentCustomBlock() throws FlowExecutionException {
   ActionBlock action =
       initStrategy.loadCustomBlock("org.neuro4j.workflow.spring.CustomBlockNoComponent");
   FlowContext context = new FlowContext();
   assertEquals(1, action.execute(context));
   assertEquals("somevalue", context.get("somekey"));
 }
예제 #2
0
  @Override
  public int execute(FlowContext ctx) throws FlowExecutionException {

    FormBean formBean = (FormBean) ctx.get(IN_FORMBEAN);

    String message = "Hello: " + formBean.toString();

    ctx.put(OUT_MESSAGE, message);

    return NEXT;
  }
예제 #3
0
  public int execute(FlowContext ctx) throws FlowExecutionException {

    String name = (String) ctx.get(IN_NAME);

    String message = "Hello ";

    if (name != null) {
      message += name;
    }

    ctx.put(OUT_MESSAGE, message);

    return NEXT;
  }
예제 #4
0
  public int execute(FlowContext ctx) throws FlowExecutionException {

    Object param = ctx.get(IN_PARAM);

    // TODO: put your code here

    if (
    /*error != */ false) {
      return ERROR;
    }

    return NEXT;
  }