Jarvis Pizzeria: Call Services with the help of Integrations

From within our process in Oracle Process Cloud Services (PCS), we can call different service types. We can call an Integration on the Oracle Integration Cloud (ICS), a SOAP endpoint or a REST service. However, before we can call the service we need to create an Integration within PCS. The name integration here is a bit confusing, because it does not refer to Integration from ICS, but a local integration within PCS.

On the left hand side, in the black menu, we can see the Integrations tab. When we click here, we go to the Integrations page. Here we can create the integrations to call from our process. As you can see, we can use ICS Integrations as well as SOAP or REST connectors. We will not discuss the ICS Integrations, but focus on the SOAP & REST connectors that we want to call.

Let's start with creating a SOAP connector. Clicking ‘Create a SOAP Connector’ will start up the wizard in which we need to enter the wsdl location.

We can use an existing file (if there already is one) or upload a file to PCS. In our case we have a mock running on to illustrate the calling of an actual SOAP endpoint. After selecting to Use URL, we enter the actual WSDL location in the textarea and click Next.

The WSDL on the location is recognised and will be imported into the PCS application. We name this the SoapPizzaSC and select the corresponding port types.

We do not have any need to tweak the advanced properties, so we will leave all the defaults on and create the SOAP connector by pressing the Create button.

This will result in our first Integration within the Application.

Now that we have a SOAP Integration, let's also create a REST connector. Clicking the add icon on the right will bring up the options we saw before on the home page. After selecting External we are able to choose a REST connector.

This will open a popup to enter a Name and the Base URL for the REST Service. We use a mock REST endpoint on apiary for this example.  

After finishing the wizard, the Rest Connector Editor will open. In here we can fine tune and edit the connector. Clicking the add button will bring up the screen to add an operation to the endpoint.

We want to add a get operation on the REST connector, so again we click the add icon, but this time the one a bit lower, in the Resources section.

The resource for the get operation will open and we can enter a name and path after which we need to add an example request and response payload to the operation.

Here we are going to upload a response example payload. When we add the example json, it will create business objects based on the payload that we supplied.

The result of the REST connector.

Now that we have created the SOAP and REST connectors, let’s see how we can use them in a process. For illustration purposes and to test the connectors we created an empty process.

From the right hand side we open the System tab and select ‘Service’. We then drag and drop it on the line between the Start and End.

As Type of implementation we select Service Call, after which a popup will show to select the integration.

Let’s start with a (SOAP) Web Service. When clicking the search icon, another popup will appear to select an integration. We will see the SOAP Connector that we have created with the name SoapPizzaSC and select it.

The SOAP Connector only knows about the getMenu operation, so this is the only option to select and the default value.

After pressing OK, the service implementation is done and we can drag and drop another Service task in the process.

For this Type of implementation we also select the Service Call. However, in the configure screen, we will select REST instead of Web Service.

Clicking on the search item will again show us a popup to select the connector, but this time, because we selected REST as option, the only available connector is the RestPizzaC.

We have only one resource and operation within the REST Integration, so these are filled in by default and are correct.

After pressing OK, the Service implementation is done and we have created a process that calls a SOAP service as well as a REST endpoint.

No comments:

Post a Comment