Output non-Alloy items from workflow nodes

In Alloy Workflows, the inputs and outputs of actions are item IDs. Depending on the setting of the Single Instance switch, a next node may execute once, or as many times as the number of outputs of the previous node. Sometimes, however, we need more flexibility than that.
Consider the following example:

  1. A Query action retrieves two asset items.
  2. A WFC on the Query nodes generates 3 dates of future inspections on those assets. The inspection dates are not Alloy items under any design, they are just held in a variable of the WFC.
  3. A Create action follows that produces 6 inspections, 3 for each asset based on those dates.

In this example, we need the output to be 2 (assets) x 3 (dates) = 6. So we need the next node that follows (i.e., the Create node) to execute 6 times.
Is such a multiplicative output possible?

Additional observation: The Output action does not seem to help, as the output items need to be item IDs too (so, for example, they cannot be dates or numbers in a List). If the Output node allowed to output not just Alloy items, but also other primitives, such as a list of numbers, or dates, the above scenario would seem possible.

Thanks for the question/idea. It is currently possible to work around the item id restriction by using the output action node to output ‘fake’ item ids to iterate over. This is clearly not a recommended approach so please raise an idea via the ideas portal for potentially supporting other primitives and we’ll take a look.

1 Like

Thanks, I will raise this as an idea.