コード例 #1
0
 @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
ファイル: ProcessForm.java プロジェクト: hreny522/workflow
  @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
ファイル: HelloBlock.java プロジェクト: neuro4j/workflow
  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;
  }