Friday, July 19, 2024

OIC - Append operation in Data stitch action | Incrementally build a messags payload using Data stitch

Usecase: Here, we will see how to perform append operation using Data stitch action.

We will feed array of ids, for each id, call a another service and check the id exist value true or false in a scope and assign the values to a global oblect variable response item and finally append the item to response array object. Next we will get all the id responses outside of the scope.

Why data stitch:

  1. We can incrementally build a message payload from one or more existing  payloads with the stitch.
  2. Supports both partial and full replacement of the message payload.
  3. Supports both scalar and complex type variables

Implementation steps:

  1. Create a rest trigger and create an appdriven orchatration integration and configure  rest request - response payload
  2. Take a for each loop and iterates for each data - Id
  3. Take a scope
  4. Call integration action or rest call to get the details for the give id.
  5. Create two golbal variables
    1.  One for response Array which will have the array of Id responses
    2. One for response Item which will have one id item response
  6. Take a stitch action and perform the following
    1. Assign the response id to response_item id
    2. Assign the response Exists value to Response_item exists
    3. Append the response_item result to response_array result.
  7. Outside of the scope, map the global responae_array data to final rest response.


Detailed steps with snaps:



















No comments:

Post a Comment

Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...