执行流程链

因为不依赖Spring,所以需要你手动的初始化FlowExecutor,建议放在启动时初始化,然后把FlowExecutor对象缓存起来。

  1. FlowExecutor executor = new FlowExecutor();
  2. LiteflowConfig liteflowConfig = new LiteflowConfig();
  3. liteflowConfig.setRuleSource("config/flow.xml");
  4. executor.setLiteflowConfig(liteflowConfig);
  5. executor.init();
  6. LiteflowResponse<DefaultSlot> response = executor.execute2Resp("chain1", "arg");