Monday, July 25, 2022

How to create a process instance with OIC REST API | Process Cloud Service

Usecase: Here, Using Oracle provided REST API, we will create/test a new process instance for a message based process from SOAP UI.

Note: It does not support process instance creation of a synchrounous process. Only Async process instances creation is supported.

To Create a Process Instance, use below URI and Verb:

  • Resource URI: https://<Host>/ic/api/process/v1/processes
  • Verb: POST

Request Body:

Sample:

{

"processDefId":"oracleinternalpcs~<Application Name>!<Version>~<Process Name>",

"serviceName":"<process name>.service",

"operation":"start",

"action":"Submit",

"params":{"Name":"Sri", "Reason":"Not Feeling well","FromDate":"2022-07-25","ToDate":"2022-07-25"}

}

Note: operation by default is start. If you have changed your process operation, then you have to use the same 


My used payload:

{

"processDefId":"oracleinternalpcs~LeaveRequestApplication!1.0~LeaveRequestProcess",

"serviceName":"LeaveRequestProcess.service",

"operation":"sendLeaveDetails",

"action":"Submit",

"params":{"Name":"Sri", "Reason":"Not Feeling well","FromDate":"2022-07-25","ToDate":"2022-07-25"}

}

Steps with Screenshots:

Open SOAP UI >> Rest >>provide URI>>Ok



Add a basic authorization.




Add payload and test.


Open OIC >> My Tasks>>select and perform required action.




Note:
  1. We can also create a new process instance from a web form(Form-based process Start)
  2. We can also retrieve a process instance using get verb and uri: /ic/api/process/v1/processes/{processid}

Reference:

https://docs.oracle.com/en/cloud/paas/integration-cloud/rest-api/op-ic-api-process-v1-processes-post.html


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...