🛫Execute
The same as SpringBoot's execution, there is no difference, you can inject FlowExecutor
into any of your Spring-managed classes for execution:
@Component
public class YourClass{
@Resource
private FlowExecutor flowExecutor;
@Test
public void testConfig(){
LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg");
}
}
notice
This DefaultContext
is the default context. Users can use their own arbitrary bean as the context to pass in. If they need to pass in their own context, they need to pass the Class attribute of the user bean. For details, please refer to Data context this chapter.
Help us improve this document (opens new window)
last update: 2022/10/13, 00:02:27