Showing posts with label Oracle integration. Show all posts
Showing posts with label Oracle integration. Show all posts

Thursday, August 14, 2025

More Examples: Assign vs Stitch in OIC Gen3

๐Ÿ“˜ More Examples: Assign vs Stitch in OIC Gen3

๐Ÿงช Example 1: Set Boolean Flag (Assign)

Scenario: Based on a condition, set a flag to true or false.

isEligible = true

Why Assign? Simple scalar assignment.

๐Ÿงช Example 2: Combine Strings (Assign)

Scenario: Generate a unique ID for a transaction.

transactionId = "TXN-" + currentDate + "-" + customerId

Why Assign? String operations with known variables.

๐Ÿงช Example 3: Set a Variable from an Expression (Assign)

Scenario: Calculate tax based on amount.

taxAmount = totalAmount * 0.18

Why Assign? Mathematical expression with constants and variables.


๐Ÿชข Example 4: Append Dynamic Payloads to a List (Stitch)

Scenario: While processing each record from an input array, append valid records to a result list.

validRecords.append(currentRecord)

Why Stitch? You’re dynamically building an array over iterations.

๐Ÿชข Example 5: Merge Customer Profile Data (Stitch)

Scenario: You get partial customer data from two different sources and want to stitch them into one object.


customerProfile.name = source1.name
customerProfile.email = source2.email
customerProfile.address = source1.address
  

Why Stitch? Updating only specific fields inside a nested object.

๐Ÿชข Example 6: Update an Element in a Nested List (Stitch)

Scenario: Change the quantity of the third item in the order list.

orderList[2].quantity = 5

Why Stitch? You're modifying an element deep within a data structure without affecting others.


๐Ÿ“Š Summary Comparison

Use Case Assign Stitch
Set default values
Append item to array
Set calculated value
Update nested field
Build composite object

Wednesday, August 13, 2025

Assign Vs Stich Variable in OIC

Assign vs Stitch in Oracle Integration Cloud (OIC) Gen3 | Complete Guide

Assign vs Stitch in Oracle Integration Cloud (OIC) Gen3: A Complete Guide

Oracle Integration Cloud (OIC) Gen3 introduces powerful enhancements to how variables are managed inside an integration flow. Two key methods available for working with variables are Assign and Stitch.

This blog explains the difference between Assign and Stitch, when to use them, and how they impact your integrations.


๐Ÿ” What is an Assign in OIC Gen3?

Assign is a structured activity used to create or set the value of a variable. It allows you to perform simple, clean assignments from one value to another — whether static, dynamic, or derived from other variables.

✅ Key Features of Assign

  • Clear and readable
  • Used to create new variables or set existing ones
  • Ideal for scalar values or basic data structure manipulation
Assign in OIC Gen3
Example: Assigning a hardcoded value to a variable called status:
status = "Approved"

๐Ÿชข What is Stitch in OIC Gen3?

Stitch is a more advanced activity used to merge or append complex data structures. Stitch allows you to modify existing data sets (like arrays or nested objects) without overwriting the entire structure.

✅ Key Features of Stitch

  • Best for working with arrays or repeating elements
  • Lets you merge, insert, or append data into existing variables
  • Essential when handling dynamic lists or payload enrichment
Stitch in OIC Gen3
Example: Appending a new order to an existing order list:
orders.append(newOrder)

๐Ÿ†š Assign vs Stitch: Key Differences

Feature Assign Stitch
Use Case Setting values or creating variables Merging or modifying complex structures
Data Type Scalar or structured Mainly structured or repeating
Performance Fast and lightweight Slightly heavier due to processing
Complexity Simple Advanced

๐Ÿ’ก Best Practices

  • Use Assign when setting simple or static variables.
  • Use Stitch when dealing with lists, JSON payload enrichment, or data merging.
  • Avoid overusing Stitch in small operations to keep flows clean.
Best Practices Diagram

๐Ÿง  Conclusion

Understanding the difference between Assign and Stitch in OIC Gen3 helps you design better, cleaner, and more efficient integration flows.

  • Assign is your go-to for setting values.
  • Stitch is your tool for merging and modifying complex structures.

Use them wisely to improve performance and maintainability of your integrations.


๐Ÿ“ฅ Related Resources


Have questions? Drop them in the comments or connect with me on LinkedIn!

query to get Shipment number based on Order number

 SELECT DISTINCT     wnd.delivery_name,     wnd.actual_ship_date,     wdd.sales_order_number FROM     wsh_new_deliveries       wnd,     wsh_...

Popular Posts