Friday, July 15, 2016

Oracle Process Cloud Service Connectors (Part 1 of 2): Web Service Connector

Oracle Process Cloud Service applications can communicate and exchange data with external applications that are exposed as either REST or Web Services.

In this first part of a two part series on connectors we will explore the Web Service Connector in Oracle Process Cloud Service to exchange data with an external application using the SOAP protocol.

To create a Web Service (SOAP) connection in Oracle Process Cloud Service, you need the following information:
  • WSDL file (upload from file or remove via URL)
  • The WSDL file should include a port type and a callback port type 
  • If the service you are trying to invoke is secure, then you will need the username and password required to access the service
So let's see how you can create a Web Service Connector in Oracle Process Cloud Service. The scenario will be quite simple. 

We will have a process that will invoke a publicly available web service, GeoIPService to lookup countries by IP address. The process will start with a form pattern, where the user will type in the IP address. The process will then invoke the GeoIPService, passing it the IP address typed in by the user and using a second human task, it will display the country where that IP address is.

First thing that we will do is to create a new application in Oracle Process Cloud Service. I've named it "Web Service Connector Demo App" and created a new space (aantoniou) to file this new application under.
Next we will create a process to hold the two human tasks and the service call. So from the "Create a Process" screen, select the "Start with a form" pattern, give your process a name and click on "Create".
Edit the "Start" component and open it's implementation details and enter a title for the start component (for example, "Resolve IP Address"). 
Under the "Web Form" section click on the blue add button to create a new web form and give your web form a name. Ensure you selected "Open Immediately" to open the web form for editing.
In the web form designer, drag and drop on the form canvas two text fields. Name the first one "IP Address" and the second one "Country" and ensure the "Country" text field is disabled (by unchecking the "Enabled" property).
Now its time to go and create the Web Service Connector. From the "Application Home" tab, go to "Connectors" and click on the "New Web Service" plus icon to create a new connection. 
In the first train stop, you need to select the source for the WSDL. You can use an existing WSDL file (that was uploaded before), you can upload your WSDL from a file or use a URL to point it to an external WSDL.
I will use the latter option to point it to the GeoIPService WSDL URL (which is http://www.webservicex.net/geoipservice.asmx?WSDL)
In the second wizard train stop, give your service a name and select the appropriate "Port Type" and "Callback Port Type" and click "Next".
In the third wizard screen you can configure some advanced properties like the "Read Time Out", "Connection Time Out" and "Security". I will leave the default and click "Create".
Our Web Service Connector is ready for use. So go back to your process and drag and drop from the component palette a "Service" component between the "Start" and "End" components.
Rename the "Service" component to "GeoIPService" and go to its implementation details to define its implementation type. From the "Type" drop down select "Service Call" and click on the pencil icon to configure the "Service Call".
From the "Configure" window select the Web Service Connector name you created in the previous step and the appropriate operation and click on "OK".
Next we need to associate all required data for the service call, both for the request as well as the response. So with the service component selected, click on the "Associate the data" button and assign your form's IP Address element to the ipAddress request element and assign your service's response countryName element to your form's country element and click "Apply".
Drag a "Submit" component (Human Task) next to your service component, rename the "Submit" component to "View Service Result" and from its implementation details ensure you selected the same web form you created for the "Start" component.
We are now ready to test our application. Instead of deploying to test our application, we will be the Application Player, a very nice feature of Oracle Process Cloud Service where PCS deploys a version of your application to runtime using a special runtime partition.
Click on the "Play Process" button just above your process. Click on the play button that is shown just above the "Start" button. This will bring up the "Play" window which allows you to select the user to perform this task. I will use the default one and click on the "Run" button.
This will bring up your web form. Enter your IP address and click on the submit button.
You should see your process execution path with the token being now at the "View Service Result" human task. Click on the "Play"button which now appears just above the "Submit" task and from the "Play" window click on the "Run" button and select "Launch Form" to open your web form.
You should now see the "Country" field being populated with the Web Service's result. 


Friday, June 17, 2016

Oracle Process Cloud Service - Web Form Design Approaches

Oracle Process Cloud Service uses a standards-based technology called "Web Forms" for defining the user interface in business processes. It's based on standards such as XHTML, CSS and JavaScript and allows business analysts and developers to create an end-user interface by just using the browser.

There are three approaches that can be employed when designing web forms:

Form-First: You can follow a "Form-First" approach where you create the form first before any data elements are defined and you let PCS by just drag and dropping components from the component palette to the page.

Oracle PCS will automatically generate the schema that defines the data required by the web form.

The schema that is automatically generated by Oracle PCS is based on the web form controls added to the web form and can be located under "Business Types" section.

When you assign the web form to a human task activity, the schema generated by Oracle PCS will automatically be used to define the human task data structure.

Data-First: A data-first approach implies a bottom-up approach where you create a web form based on data sources or business objects by just drag and dropping the objects on the form to create controls.

In the "Business Types" section you can import your XML schema definition files (XSDs) which you can then use in your web form. 
During the import process Oracle PCS will validate your XML schema and will only allow you to import your XSD if it's valid.

Select the element on which you want to create a business object, give your business object name and optionally create a new parent module (used for grouping business objects).

You will see your new business object  created under "Business Types".
Your new business object is ready for use. You can either use it on an existing web form or create a new one.

However, to make your new business object available for use to a web form, you need to open the  "Form Business Objects" and assign it to your web form (by shuffling it from the selected pane to the selected pane).
You business object should be available now under the "Data Sources" section of your web form.

You can either add individual business object attributes or add the entire business object by clicking on the green plus button. Oracle PCS will automatically translate the business object attributes to Web Form components (which of course you can customize).

Hybrid (Data-First and Form-First): The third and last approach that you can follow uses a combination of the above two approaches, that is a hybrid data-first and form-first approach.
    You can create soma parts of a web form from scratch while other sections can be based on existing data sources and data objects.

    Thursday, June 2, 2016

    Live demo of Oracle PCS at AMIS 25 - Beyond the Horizon

    AMIS is celebrating 25 years in business and I've been invited to present at the conference.

    Join my session to see how you can create a basic travel request application, from scratch, in Oracle Process Cloud Service in 25 minutes. Using different "hats", this session will demonstrate the use of the composer and its artifacts to develop and test applications and the workspace, the end-user environment for performing process tasks but at the same time the administrator environment for monitoring process performance.

    Session Link: http://www.amis-conference.com/Session-Catalog#session2689

    Speaker Bio: http://www.amis-conference.com/Speaker-Bios#AntonisAntoniou

    Thursday, May 19, 2016

    Peer-to-Peer Interview for Oracle Magazine

    I was recently interviewed by Oracle Magazine with my life journey featuring under the Peer-to-Peer section. If you would like to see how technology has changed my life and what I would like to see Oracle as a company do more then read my story!

    Oracle Magazine also published a video on YouTube on "What I would like to see Oracle, as a company, do more of?"

    Thursday, May 12, 2016

    How Digital Platforms are enabling Digital transformation transforming existing Business models

    Join my session at the 6th ICT Summit in Nicosia to learn how companies are leveraging Middleware & Big Data to support their Digital Transformation initiative.

    AbstractLeveraging Middleware & Big Data in your transformation journey. The Interactive keynote will provide an exploratory overview of how Companies are leveraging Digital technologies creating Digital business platform to support their Digital transformation initiatives.The keynote will feature examples of companies who have undertaken their Digital transformation journey successfully, and will showcase the importance and opportunities of leveraging Middleware and Big Data in building a Digital business platform.

    Event Link: ICT Summit 2016

    Monday, March 28, 2016

    Oracle BPM/SOA Human Task: Java code in jsp source files is not allowed in ojsp.next mode

    Today I came across an exception while trying to load one of my task details (v12.2.1).

    Error: OracleJSP error: oracle.jsp.parse.JavaCodeException: Line # 14, oracle.jsp.parse.JspParseTagScriptlet@66e50889
    Error: Java code in jsp source files is not allowed in ojsp.next mode

    What was really strange to me was that I did not do anything different from what I used to do with previous versions.

    After some research I found out that this was a known issue for 12.2.1. There are two possible causes for getting this error.

    a) Either you are not using the fully qualified host name  (including domain name) for the forms to render properly. See Configuring the SOA Human Task Hostname

    b) If you indeed using the fully qualified host name for your forms then you should open the default generated login.jsp page and remove the line containing <% ... %> and redeploy the form project.


    Tuesday, February 16, 2016

    Oracle ICS Integration Patterns (Part 2 of 3): Publish To ICS

    In this second part of a three part series on Integration Cloud Service (ICS) Integration Patterns we will explore the "Publish to ICS" integration pattern, a motivo which allows you to configure a service to publish messages to ICS through a predefined ICS Messaging target that is automatically created by ICS when choosing this pattern.

    Typical use cases for using this pattern is when you want to decouple your service producers from your service consumers in a typical service bus scenario to provide a visualization layer to your service topology.

    Building on the existing source code prepared and presented in the first part on ICS Integration Patterns where we saw the "Map My Data" integration pattern, we will extend the ProcessPurchaseOrder interface with an additional method.


    This method will serve as a proxy service, a facade to service consumers. There will be no implementation other than annotating the method with the @WebMethod JAX-WS annotation to expose it as a web service and the @OneWay annotation to denote that this will be a fire-and-forget web service.

    Deploy your service and go to the ICS Service Console. Because this second part is a continuation of the first part I assume that you already have a connection defined on ICS to point to the "ProcessPurchaseOrder" web service. We only added a new operation.

    Unfortunately ICS doesn't have a way to invalidate its connections cache to pick up the new operation. One way to make ICS aware of your new operation on an existing SOAP connection is to drop the connection and re-create it which of course can be quite time consuming.

    An alternative approach that I discovered is to make a small deliberate change to the WSDL URL, test the service (which would of course fail), save the connection and restore back the WSDL URL, testing the service again and doing one final save to the connection.

    We can now go on and create our integration. Using the menu on the left click on the "Integrations" link to navigate to the integrations home page and click on the "Create New Integration" button.

    From the "Create Integration" popup select the "Publish To ICS" integration pattern.

    In the "New Integration - Information" popup enter an integration name, and optionally update the identifier populated automatically based on the integration name, default version and provide a description if needed, and click "Create".

    You should be presented with the integration canvas with an empty source and a preconfigured target using the ICS Messaging Service.


    From the "Connections" palette on the right of the canvas, drag and drop your connection (if you followed my exact instructions it should be named "Process Purchase Order") to the source placeholder.

    This will bring up the SOAP Configuration Wizard to help in configuring the source endpoint. Enter a name for your endpoint (I named it "PublishToICS") and click "Next".

    In the second step of the SOAP Configuration Wizard select the operation name from the "Select the Operation" drop down list (in my example I selected "processPurchaseOrderPS") and click "Next".

    In the third and last step review the source endpoint configurations and click "Done".

    On the top right of our integration we have a progress bar showing the progress of our integration. If you click on it you will see the missing steps. Doing so we can see that we are still missing one step, to configure tracking for our source.

    Oracle ICS enables you to declaratively define business identifiers to enable runtime tracking on messages. To do so click on the "Tracking" button. This will open the "Business Identifiers for Tracking" popup. Drag and drop the "orderId" element to the tracking field and specify a business friendly tracking name (named it "Order Id") and click "Done".

    The integration progress should now show 100% complete. Save and exit your integration to be redirected to the integrations home page where you should be able to see your integration at the top of the list, marked as new and with a new option to activate the integration.

    Click on the "Activate" button to activate the new integration we just created. In the "Confirmation" popup click on "Yes"and your integration should show as "Active".

    By activating your integration Oracle ICS has created a new ICS specific endpoint url for your integration for invocation which can be found by clicking on the "info" button next to your integration. I will use this endpoint url to test my integration (using SoapUI).

    Using SoapUI I will invoke my integration by supplying a sample order.
    Please note that if you attempt to invoke your integration without a username and a password token and a timestamp you will get a security exception "OSB-386200: General web service security error").
    After invoking my integration supplying the request a username, password and a timestamp I can now see that my invocation was successful.

    I can confirm that data was actually published to ICS by navigating to the monitoring dashboard provided where you can visually see how your integrations are performing during runtime. To access this dashboard simply click on the "Dashboard" link/button on the horizontal navigation toolbar.

    The default view lists all activated integrations with a summary view on the top and a detailed view per integration just below listing key KPIs such as the average response time, messages received, message processed and faulted messages.


    Click on your integration's "Messages Received" to be navigated to the "Tracking" page which will should display all messaged processed by the selected integration in the last 3 days (by default). Please note how instances are displayed; they are displaying using the custom business identifiers defined.

    You can view the details of a specific instance by just clicking on the instance link. The instance will open in the integration canvas in viewing mode where you can inspect the business identifiers, go to the audit train and view any error messages.