This use case describes a realistic scenario using the Collections BP tasks: deduplicating and enriching incoming EDI 850 Purchase Orders before routing them to an ERP.
Business Process: "PO_Intake_Enrichment"
-
Dictionary - Create → initialize an empty
vendorLookupDictionary at the start of the BP. This will hold vendor-code-to-internal-ID mappings pulled from a reference file or database query earlier in the process. -
List - Create → initialize an empty
lineItemErrorsList to collect any line items that fail validation as the BP loops through the incoming PO. - Loop over each vendor record returned from a lookup query (e.g., a JDBC or file read task upstream):
-
Dictionary - Put → for each vendor row, put the vendor code as the
Keyand the internal customer/vendor ID as theEntryintovendorLookup.
-
Dictionary - Put → for each vendor row, put the vendor code as the
- Now loop over each line item in the incoming 850 document:
-
Dictionary - Has Key → check if the line item's vendor code exists in
vendorLookup. If not found, this flags a data issue. - If Has Key is false: List - Add → add the problematic line item (or an error message string) to
lineItemErrors. - If Has Key is true: Dictionary - Get → retrieve the correct internal vendor ID from
vendorLookupusing the vendor code, and use it to overwrite/enrich the outgoing record before mapping it to the ERP's expected format.
-
Dictionary - Has Key → check if the line item's vendor code exists in
- After the loop:
-
List - Size → check the size of
lineItemErrors. If greater than 0, branch the BP to send an email alert or write the errors to an exceptions folder/table for someone to review. - List - First / List - Get (index 0, 1, 2…) → pull specific error entries to include in that alert email body.
- Dictionary - Size / Dictionary - Keys → optionally log how many vendors were matched, or output the full list of vendor codes processed for an audit trail.
-
List - Size → check the size of
- If no errors, the enriched document continues downstream to the ERP connector (e.g., a NetSuite or D365 connector task) for final delivery.
Why this is realistic: Dictionary tasks are the natural fit for lookup/mapping problems (vendor codes, currency codes, UOM conversions) that come up constantly in EDI/B2B integration, while List tasks fit error/exception collection and iteration patterns - both extremely common patterns in CIC Studio BPs that sit between trading partner documents and back-end systems.
Comments
0 comments
Please sign in to leave a comment.