Part 2 – How to Build Process , Data Persistence in Database Cloud Service

Part 2 – How to Build Process , Data Persistence in Database Cloud Service

There are multiple ways you can actually start a process , some of them are

  • Trigger a Process by dumping a document in document cloud service folder,
  • Trigger a Process by Form Submitting
  • Trigger a Process by Invoking a Message from an External System by means of Exposed REST API
  • Trigger a Process by using SOAP WSDL URL that a process exposes after it is deployed
  • Trigger one process by another process

Data Objects

Data Objects are like Global Variables across a Business Process they hold process variables and are life line of a Business Process , each variable inside a DO can be of type string , int, date etc

Process Start

A Process can be started by means submitting a Form , in that case start activity needs to be mapped to a Form, The Same Process can also be triggered using Message variables , if you wish the process to begin with a Message received then Input variables for a message needs to be defined , infact this will be part of payload that will be sent by an external system

Data  Mapping from Message Received to Process Data Object PDO

You can use Data Association to Map incoming data from a process to DO, Under transformation the Output of a Message will be Input for our Data Object

Data Persistence in Database Cloud Service / Apex Cloud Service

A Process Data stays in Process Instance , but it will be really helpful if the data is persisted or saved in Database so that the same can used for Reporting Purpose or to be used by various other applications , PCS Providers with REST Connector and Integration Cloud Service Connector, to send the data and save it somewhere , in our case we will use Apex Cloud Service to Save data , this will basically be a REST call from PCS

Creating REST Connector

Please view my other videos on How to expose REST Services using Apex Cloud Service , here we start with an Assumption that we already have POST URL that would Insert values into a database table, We go ahead and create a Connector to this REST service , Map the payload input data to a sample JSON file as shown below, this ensure that our process can now send data directly to database using REST call

BPM Forms

We would need BPM Forms to basically display the Payload Data to Approvers or Some times same form can be re-used for Process Initiator to Send form data to Approver, Its important to Associate data incoming from a request to form variables during data transformation, a Simple Travel form looks like this

Making Service Calls inside BPM Processes

We can invoke ICS or REST based Connector from PCS , for data persistance what we can do is Invoke the rest connector passing Process Id as a database Primary Key, if there is change is status the same record can be updated making one more REST call


Notification Services

Notification mails are sent by default by the Process to inform on Task assignment , however we can also send custom notifications by having configured email notification service

Completed Travel Process

This is a enhanced version of Traditional Travel Approval process, the major change here compared to traditional travel process is Database Calls initially to insert payload data and subsequent calls to update the record based on process id

<< Part 1 – Working with Process Cloud Service

>> Part 3 – Invoking PCS Process from Oracle JET Framework