JD Edwards EnterpriseOne Orchestrator introduced logic extensions for an array in Tools Release 9.2.7. This new feature can be beneficial by allowing administrators to enhance a step where it could prepare the data prior to executing the next step.
This feature enhances the capabilities of logic extensions by providing the ability to accept arrays as inputs and return arrays as outputs for efficient iterative processing. The input arrays could come from orchestration inputs or from the results of a previous orchestration step.
Use Case
Since some items in an order are time sensitive, the business analyst must enter each item with a different request date in order to meet the requirements. The business analyst will provide a list of items, quantities, and lead times for each item as Orchestrator Inputs to create a Sales Order with multiple request dates for the different items.
Solution
To achieve this, the user will need to create an array as input, pass the array in a logic extension which will calculate the new request date based on the lead time on each line, and return the array which will be used to create the sales order.
This is how it should work:
- Create an Orchestration with the following information as inputs:
In the Orchestration input include:
- Create a logic extension to accept an array as input, use the lead time to calculate the new request date for each line, and return the array as an output and make sure the IO Type is set to “Both” and the Request Date should be in “String Type”.
- Create a temporary variable to hold the request date.
- Drag and drop the Array Function.
- Select the Array you defined in the input, i.e. Array2, then click on the Iterate Array button on the right panel. The following components will be created for you automatically.
This will include an Assignment Box which initializes the array counter and a While Loop to control the iteration of the array. Within the While Loop you should see the Array function getting the information from a row and the Assignment Box to increment the array counter. - Create a new Assignment Box within the While Loop to calculate the date with lead time and construct the date in the desired format as follows:
- Use the Math Function to calculate the request date which is today’s date + lead time and format the date into MM/DD/YYYY to match the format used by the Form Request, then save it.
- Then add another Array Function to update the array with the current counter information.
- The Orchestration combines data from the input with the logic extension’s array and sends it to the Form Request to generate line items with varying request dates. It’s important to note that the name of the Grid Variable in the Form Request must match the array name from the logic extension.
- Save and test the Orchestration.
Return the Order Number, Order Type, and Order Company as outputs.
Conclusion
This functionality elevates the potential of logic extensions by enabling them to receive arrays as inputs and provide arrays as outputs, facilitating efficient iterative processing of multiple data rows within the logic extension.