Passing Parameters

When you invoke another assembly line via an AL FC (AssemblyLine Function Component) you normally just map the data and you're done. However, you can pass the other assembly line some parameters. This is useful if you want to trigger optional logic in the other AssemblyLine's flow. You do this in the target AssemblyLine's Operations.

Open the AssemblyLine you will be calling, click on Options --> Operations. In the AssemblyLine Parameters, add variables as you desire. Now open the AssemblyLine that will be doing the calling. Add a AL FC and in the connection tab, you'll see that variable you created.

Now that you've passed in a parameter or two, how do you consume it?

You can access this data in a prolog. Here's an example where we've added a prolog (Assembly line, Options, Assembly Line Hooks), accessed the parameter and configured the local connector

Though this may be a bad example seeing that one can set that JDBC parameter more directly. Here is a sample from L3 on setting the called AssemblyLine connector parameters

To use the AssemblyLine Function (AL FC), you do not construct a TCB, simply specify the parameter values to set by naming Attributes in the FC Output Map like this  "$tcb.<connector name>.<param name>":


and so forth. The first value of the Attribute is applied to the parameter value when the called AL is set up.

Here's some feedback from L3 regarding the question: "How to consume assembly line parameters passed in through the operation input schema  ?"

task.logmsg("queryType = " + task.getOpEntry().queryType) 

If you are accessing several parameters, you may want to start with 

var opEntry = task.getOpEntry(); 

and then you can access the individual parameters like this: 

task.logmsg("queryType = " + opEntry.QueryType)