MNI Sub-Process only returns last result — how to collect all outputs?

I have a parent PM that passes a list of AOM_AccountHeader to a child PM (which accepts a single item). Using MNI on the Sub-Process works, but when I map the child’s accountHeader directly to pv!updatedAccounts in the parent, I only get the last instance result.

Goal: Collect all processed items into pv!updatedAccounts[].

Current setup:

  • Parent PVs:
    • pv!accounts (array)
    • pv!updatedAccounts (array)
    • pv!childResult (single)
  • Sub-Process:
    • Input: accountHeader <- fv!item
    • Output: pv!childResult <- accountHeader

Fix I’m trying:

  • Add a Script Task after the Sub-Process.
  • Enable MNI on the Script Task (same array).
  • In Script Task Outputs:
    Plain Text
    appian isn’t fully supported. Syntax highlighting is based on Plain Text.
    a!save(pv!updatedAccounts[fv!index], pv!childResult)
    Show more lines
  • Merge branches with an AND Gateway.

Questions:

  1. Is enabling MNI on the Script Task the best way to use fv!index?
  2. Can Sub-Process Output Target be switched to expression mode for pv!updatedAccounts[fv!index] (to skip Script Task)?
  3. Any tips for error handling per instance?

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data