X

The Integration blog covers the latest in product updates, best practices, customer stories, and more.

How to use Pick action in OIC Orchestration

Sumeet Singh
Principal Member of Technical Staff

REST Adapter in its current version only publishes a single resource with a single verb in the inbound. Also, there can only be a single source within an integration flow. This is somewhat restrictive as the users have to create multiple integrations (each with a separate resource URI) for related resources and verbs.

Let's say someone has a requirement to create, update and delete a resource. Naturally, the expectation is that there would be a single resource which can be manipulated with different HTTP verbs. This is not possible with REST adapter and in the current version, users are forced to create multiple integrations for performing these different operations.

Pick is a solution to this. Have a look at how your pick integrations will look in canvas.

PICK is protected with ' oic.cloudadapter.adapter.rest.mvrp ' feature flag. Check this link on how to enable feature flag.

Step-by-step guide

If you are looking for PICK action in your integration then you need to follow these steps:

  1. Choose "App Driven Orchestration" while creating an integration.
  2. Currently, only REST adapters are supported if you need PICK action in your integration. Drop REST adapter on the trigger point.
  3. Give details to configure your REST endpoint. Make sure you select the checkbox "Select to configure multiple resources or verbs. (maximum 6)". This will help you to give further details for each operation/verb.
    Click NEXT to continue.
  4. In this screen, provide the details of your first operation/verb. In this example, we are creating "GetContact" Operation using "GET" HTTP Verb/action on this operation. This Operation will help to fetch particular contact.
    Select "Add and review parameters for this endpoint" checkbox, if you want to pass PATH/Query parameters while REST call. Select "Configure this endpoint to receive the response" checkbox if you expect a response from REST call and to configure response details. "Configure a request payload for this endpoint" checkbox will always be disabled for GET operation. Select "Request Headers" and "Response Headers" checkbox if you need to configure request and response headers. In a given example, it's not required. Click NEXT to continue.

    Since we have selected above checkboxes, hence the following screens will come up for this operation. Click "Plus" icon to add query parameter. Give the name of the query parameter and select its data type. In below screen "contactID" is the name and ''string" is the data type for our query parameter, as we want to fetch contact by giving its ID. Click Next to continue.

    Provide response details in below screen. Choose the response payload format, provide response sample, and select the type of payload with which you want the endpoint to reply. Click "<<< inline >>>" hyperlink to provide sample JSON.

    in this screen, provide sample JSON data and then click OK button.

    once you provided the JSON sample then below screen will show up. Notice that you can see "Element: Response-Wrapper" select box. Click NEXT to continue.
  5. This screen will let you know how many operations have been added for your PICK. You can start adding another operation from this screen itself by selecting "Add another operation" checkbox and then click on NEXT button.

     
  6. In this screen, provide the details of your second operation/verb. In this example, we are creating "CreateContact" Operation using "POST" HTTP Verb/action on this operation. This Operation will create particular contact.
    Since this is POST operation so we need some PAYLOAD to create request and we also might need to define responses. Do select  "Configure a request payload for this endpoint" checkbox to enter request payload related configuration details and also select "Configure this endpoint to receive the response" checkbox if you expect a response from REST call and to configure response details. Select "Request Headers" and "Response Headers" checkbox if you need to configure request and response headers. In a given example, it's not required. Click NEXT to continue.

    Provide request payload details in below screen. Choose the request payload format, provide request sample, and select the type of payload with which you want the endpoint to receive. Click "<<< inline >>>" hyperlink to provide sample JSON.

    in this screen, provide sample JSON data and then click OK button.

    once you provided the JSON sample then below screen will show up. Notice that you can see "Element: Request-Wrapper" select box. Click NEXT to continue.

    Provide response payload details in below screen. Choose the response payload format, provide response sample, and select the type of payload with which you want the endpoint to reply. Click "<<< inline >>>" hyperlink to provide sample JSON.

    in this screen, provide sample JSON data and then click OK button.

    once you provided the JSON sample then below screen will show up. Notice that you can see "Element: Response-Wrapper" select box. Click NEXT to continue.
  7. This screen will let you know how many operations have been added for your PICK. As discusses in step 5 how to ADD another operation, follow same if you need to add more operations. To EDIT/Delete particular operation you need to select check box adjacent to required operation/verb. If you want to Delete this operation then click on "Delete Operation" link as shown in the following screen. if you need to EDIT this selected operation then simply click on NEXT to edit.
  8. Once you are done with all the operations, the following screen will give you the summary.
  9. Once you click done button in the above screen, then your pick action will render in canvas like below screen:
  10. Business Identifiers: In Pick integrations, there is a new way to set business identifiers. We need to set a business identifier for each branch/operation. Click on the PICK icon, which is Trigger icon with an "arrow". Now click on "More Actions" icon to see the menu which lists all the operations/branches related to this PICK integration. Click on branch name in the menu to set business identifier. This will open business identifier dialog box/popup to set business identifiers for each branch.

    Once you click on the operation/branch name in the menu then below screen will come up where you can set operation/branch specific business identifier. Operation/branch name is visible on the screen header. Click SAVE to continue.
  11. Once you set business identifiers for all branches then there will be no error icon on pick branch. You can now drag and drop various actions on each branch to complete your integration.
  12. We created this integration to fetch and create contact, which looks like this screen. Now you can save it and activate your integration as similar to any other integration.
  13. Once you have activated the integration then you can run your operation/branch by using any REST client.
  14. Now go to monitoring to track your instance. The following screen showed success case for GET operation w/r/t PICK integration, to fetch contact:
  15. The following screen shows how PICK looks in case of failure.

Known Issues and Workarounds:

  1. While configuring multiple operations using the adapter wizard, you might sometime find that clicking next button does not change the contents of the screen. If you find that the contents of the screen hasn't changed after clicking on next button, as a workaround, simply press back button and then click on next button again. This should refresh the contents of the screen allowing you to proceed as usual.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha
Oracle

Integrated Cloud Applications & Platform Services