Thursday, 14 May 2026

Logic Actions: For-Each, Parallel, Switch,Scope and While in Oracle Integration Cloud

 

Mastering Logic Actions in Oracle Integration Cloud

 

v Oracle Integration Cloud (OIC) provides powerful Logic Actions that help developers design complex integration flows without heavy coding.

v These actions control execution, looping, branching, and grouping of steps in an integration.

 

1.       For-Each

 

Ø  Iterates over a list of items (e.g., repeating for each record in a payload).

Ø  Useful for batch processing, like looping through employee records.

Ø  Runs sequentially — one item at a time.

2.Parallel

Ø  Executes multiple branches simultaneously.

Ø  Ideal for scenarios where independent tasks can run in parallel (e.g., sending notifications + updating DB).

Ø  Improves performance by reducing wait time.

 

3.Scope

Ø  Groups actions together into a logical unit.

Ø  Helps with error handling and transaction management.

Ø  Example: Wrap multiple DB calls in a scope to handle rollback if one fails.

 

4.Switch

Ø  Implements conditional branching (like IF-ELSE).

Ø  Executes different flows based on conditions (e.g., order type = online vs offline).

Ø  Simplifies decision-making logic.

 

5.While

Ø  Loops until a condition is met.

Ø  Example: Retry until a service responds successfully.

Ø  Must be used carefully to avoid infinite loops.

 

 

Why Logic Actions Matter

ü  They reduce coding effort with visual design.

ü  Enable complex workflows like approvals, retries, and parallel processing.

ü  Make integrations scalable and maintainable.


Within OIC, navigate to power symbol on the right side of the page



 

 



 

 

 

 

 

 

 

 

 

 




Logic Actions in OIC — When to Use Them

Action

Execution Type

Best Use Case

Example Scenario

For‑Each

Sequential

Process list items

Loop through invoices

Parallel

Simultaneous

Run independent tasks

Notify + update DB

Scope

Grouped

Error handling

Rollback on failure

Switch

Conditional

Branch logic

Online vs offline orders

While

Iterative

Retry until success

Poll service until response

 

Real-Time Used Cases:

🔸For‑Each

Scenario: Client want to automate Supplier Invoice Processing

  • ERP system sends a batch of supplier orders.
  • OIC uses For‑Each to loop through each order.
  • For every order: validate data, check inventory, calculate invoice, and create invoice record.
  • Benefit: Ensures each order is processed independently without affecting others.

Parallel

Scenario: Client want to automate Customer Order Fulfillment

  • When a customer places an order, OIC triggers two tasks simultaneously:
    • Send confirmation email to the customer.
    • Update the order status in the database.
  • Benefit: Saves time by running independent tasks together, improving responsiveness.

📦 Scope

Scenario: Client want to automate Discount & Invoice Generation

  • OIC groups actions like “Apply Discount” and “Create Invoice” inside a Scope.
  • If any step fails, the error handler inside Scope manages rollback or sends alerts.
  • Benefit: Centralized error handling ensures transactional consistency.

🔀 Switch

Scenario: Client want to automate Payment Routing

  • OIC evaluates the Order_Type field.
    • If Online, route to payment gateway API.
    • If Manual, generate invoice for offline billing.
    • Else, follow default path (log error, notify admin).
  • Benefit: Dynamic routing based on business rules without separate integrations.

🔄 While

Scenario: Automate Payment Confirmation Retry

  • OIC checks if Payment_Status = Confirmed.
  • If not, the While loop retries payment confirmation until success or timeout.
  • Benefit: Ensures reliable payment processing with retry logic.

 

Integration Flow for Parallel function:

Conclusion:

Together, these five logic actions form the backbone of intelligent automation in Oracle Integration Cloud. They transform complex, error‑prone business processes into scalable, resilient, and adaptive workflows.

By combining iteration, parallelism, error management, conditional routing, and retry logic, OIC empowers enterprises to achieve true end‑to‑end digital integration.

It reduces manual effort, accelerating operations, and ensuring business continuity.

OIC Logic Actions are the architecture of modern, automated business flows.

 

Sales Order Comprehensive Line Export in Oracle Fusion

 Sales Order Comprehensive Line Export


SELECT DISTINCT bu.bu_name                                   AS
                "Business Unit Name",
                Trunc(ha.ordered_date)                       AS
                "Sales Ordered Date",
                party.party_name                             AS "Customer Name",
                bill_party.party_name                        AS
                "Bill-to Customer Name",
                bill_acc.account_number                      AS
                "Bill-to Account Number",
                ship_party.party_name                        AS
                "Ship-to Customer Name",
                hl.address1
                || ', '
                || hl.city                                   AS
                "Ship-to Address",
                ha.order_type_code                           AS "Order Type",
                msi.item_number                              AS "Item Number",
                msi.item_number                              AS "Item Name",
                msi.description                              AS
                "Item Description",
                dla.status_code                              AS "Status",
                dla.ordered_qty                              AS "Quantity",
                dla.ordered_uom                              AS "UOM",
                dla.unit_selling_price                       AS "Item Price",
                ship_site.party_site_number                  AS "Ship To Site",
                ( dla.ordered_qty * dla.unit_selling_price ) AS "Amount",
                -- Billing Frequency (usually stored at fulfillment level for recurring)
                (SELECT periodicity_code
                 FROM   doo_billing_plans
                 WHERE  fulfill_line_id = dfa.fulfill_line_id
                        AND ROWNUM = 1)                      AS
                "Billing Frequency",
                -- Number of Billing Periods
                (SELECT billing_num_of_periods
                 FROM   doo_billing_plans
                 WHERE  fulfill_line_id = dfa.fulfill_line_id
                        AND ROWNUM = 1)                      AS
                "Number of Billing Periods",
                dla.line_type_code                           AS "Line Type",
                dla.canceled_flag                            AS
                "Cancel Backorders",
                dla.open_flag                                AS
                "Enforce Single Shipment",
                dla.line_number
FROM   doo_headers_all ha,
       doo_lines_all dla,
       doo_fulfill_lines_all dfa,
       fun_all_business_units_v bu,
       hz_parties party,
       (SELECT header_id,
               Max(cust_acct_id) AS cust_acct_id
        FROM   doo_order_addresses
        WHERE  address_use_type = 'BILL_TO'
        GROUP  BY header_id) bill_addr_fix,
       (SELECT header_id,
               Max(party_id)      AS party_id,
               Max(party_site_id) AS party_site_id
        FROM   doo_order_addresses
        WHERE  address_use_type = 'SHIP_TO'
        GROUP  BY header_id) ship_addr_fix,
       hz_cust_accounts bill_acc,
       hz_parties bill_party,
       hz_parties ship_party,
       hz_party_sites ship_site,
       hz_locations hl,
       egp_system_items_vl msi
WHERE
  -- Primary Joins
  ha.header_id = dla.header_id
  AND dla.line_id = dfa.line_id
  AND ha.org_id = bu.bu_id
  AND ha.sold_to_party_id = party.party_id
  AND dla.inventory_item_id = msi.inventory_item_id
  AND dla.inventory_organization_id = msi.organization_id
  -- Bill-to Joins
  AND ha.header_id = bill_addr_fix.header_id (+)
  AND bill_addr_fix.cust_acct_id = bill_acc.cust_account_id (+)
  AND bill_acc.party_id = bill_party.party_id (+)
  --Ship-to Joins
  AND ha.header_id = ship_addr_fix.header_id (+)
  AND ship_addr_fix.party_id = ship_party.party_id (+)
  AND ship_addr_fix.party_site_id = ship_site.party_site_id (+)
  AND ship_site.location_id = hl.location_id (+)
  -- Parameters
  AND ha.order_number = '98514'
--AND ha.order_number = :p_order_number
--AND bu.bu_name = :p_bu_name
ORDER  BY dla.line_number ASC