🎢Chain input parameter
In actual use, many people will have doubts about the concept of chain input parameters.
In a chain, there are always some initial parameters, such as order number, user ID, etc. You need to pass in the second parameter of the following method:
public LiteflowResponse execute2Resp(String chainId, Object param, Class<?>... contextBeanClazzArray)
Please note that the input parameter of this chain can be any object. In general production business scenarios, you can pass in your bean.
You can get this value from the component in the following way:
@LiteflowComponent("a")
public class ACmp extends NodeComponent {
@Override
public void process() {
YourBean requestBean = this.getRequestData();
}
}
tip
The chain input parameter can be any object. If you pass in the instance of the data context, it does not mean that the data context you get has value. Because these 2 objects are 2 different instances.
Process input parameters can only be obtained through this.getRequestData()
.
If your real purpose is to pass in the initialized context object, you can refer to the Pass initialized context chapter.