Thursday, October 27, 2022

#935 - Oracle Integration 3 invoking OCI Process Automation

 













We've already met the ubiquitous OrderProcess in previous OPA posts.  Now to invoking that very same process from Oracle Integration 3. In OIC Gen 2, Process is part of the toolkit, this will also be the case in Oracle Integration 3, however, this post concerns itself with the standalone version of OPA.

Step 1 is to create an app in IDCS 







Redirect URL is set to - https://my OIC3.ocp.oraclecloud.com/icsapis/agent/oauth/callback

Set Scopes as follows - note one for process and one for decisions.




   


Step 2 - Create REST Connection in OIC 3

A big thanks to my colleague Stan T. here 





















The Connection URL - Let's begin with the full URL -

https://myOPA.oci.oraclecloud.com/process/api/v1/process-instances?applicationName=OrderApprovals&version=1.0&processName=OrderProcess

Simply remove all after /v1.

Client Id/Secret are from the IDCS app - 









Username / password are required for OPA - I need to specify a user assigned to the relevant OPA role(s).

Note the Scope setting - I specify that for process as well as offline_access (enables token refresh).


Step 3 - Create the Integration in OIC 3

The integration is very simple, a REST trigger, with an <Order> payload, then an invoke leveraging the REST connection I just created. The invoke is configured as follows -






























btw. I copied the request/response from a Postman test I did earlier.
That's it - so let's test - 



















Check out the Activity Stream for the response from OPA -






Note the id - 2ce81538-55cc-11ed-a32f-eeebcfbf9deb - this is the Process Instance Id.

Now to the Process Workspace


Note the Instance Id.

I open the task form - 


 

No comments:

Post a Comment