Sunday, 12 November 2017

Configuring Oracle PCS with Oracle IDCS

This post covers the steps required to configure Oracle PCS (Process Cloud Service) as and application (for SSO) in IDCS (Identity Cloud Service). So let us start,


Configuration in IDCS
  • Login to the IDCS console
  • Go to Applications tab and click on Add
  • Select App Catalog in the pop up
  • Search for Oracle  and select Oracle Cloud.
  • Enter basic details and select Oracle Process Cloud Service in the App links section
  • Enter identity domain, domain name and SSO domain name
    • Identity Domain: your identity domain you can find it in my services dashboard
    • Domain Name: You can find it from your cloud url Eg: XXX.oraclecloud.com
    • SSO Domain name: Same as domain name
  • SSO Configuration
    • Entity ID: “entityID” attribute value from the PCS metadata file
    • Signing Certificate: the Signing certificate downloaded from PCS SSO configuration
  • Download the Signing Certificate and Identity Provider Metadata from this page (which will be used in PCS sso configuration page)
  • Save the configuration and Activate it.
Configuration in PCS


  • Login to PCS cloud services dashboard
  • Click on Users on the top right side
  • Click on SSO Configuration tab and click on Configure SSO button
  • Select import identity provider metadata
  • Choose File and upload the identity provider metadata file (such as idcs_metadata.xml, the one downloaded in IDCS page).
  • Select HTTP POST as SSO protocol.
  • Select User’s Email Address as User Identifier.
  • Select the Name ID as the contained in field
  •  Save the details and you are ready to test it and enable the SSO

Friday, 16 June 2017

Unlocking oracle ICS flows

The new ICS release (17.2.5) has unlock feature,
​

To unlock the connection:
​
1. Log in again as the same user who was editing the connection when the browser crashed, then log out.
For example, if you were logged in as icsdeveloper when the browser crashed, log in again as icsdeveloper, and log out. This action unlocks the connection.
​

Monday, 20 March 2017

Error while deploying oracle BPM case management project

Version : Oracle BPM 12.2.1
You might face any of the following errors while deploying a BPM case management project.

- The process domain is encountering the following errors while loading the process "ProcessName" (composite "CompositeName"): Could not initialize variable.

- ":" is not allowed in the schema file (pointing to your base schema)

- Can't load case data for the process activity <Activity Name>


Resolution:

All the above errors are because of an error in auto generated schema file for case management rules (jdeveloper generates this file when you create a case). Go to Schemas folder and open the <CaseName>Rules_<CaseName>RulesMessageTypes.xsd and verify the import schema of you base payload schema.

It will have the complete path of your payload schema which is the root cause for the above errors (engine is not able to locate the complete path, it should always be relative path)

<import namespace="http://www.example.org" schemaLocation="../C:/XXXX/XXX/YYY/Payload.xsd"/>

Change the schema location to the relative path and the deployment will be successful.
<import namespace="http://www.example.org" schemaLocation="../Payload.xsd"/>

Wednesday, 6 January 2016

Invoking a REST service in Oracle BPM/PCS webform

One of the common requirement in oracle BPM/PCS webforms is to populate the dropdowns by calling a REST service. Below java script code shows populating the dropdown values by calling the REST service.

This code assumes the rest service returns list of items which is name/value pair.
/*member count, items*/
/*member id */
var x;
if (form.load)
{

   Status.value = 'No errors';
   try {
      var uri = "REST_SERVICE_URL";
      eval('x=' + http.get(uri));

      }  catch (e) {
        Status.value = 'got exception' + e ;
   }
   var lovArray = [];
   for (var i=0; i< x.items.length; i++)
   {
      lovArray[i]=x.items[i].name;

   }

   DepartmentsList.options = lovArray;

}

This code assumes the rest service returns just list of values which needs to be displayed in dropdown

/* member items, id */
if(DepartmentsList.value.length>0)
{
  
  try {

      var uri = 'REST_SERVICE_URL;
      eval('x=' + http.get(uri));

      }  catch (e) {
        Status.value =  uri + e;
   }
   approverList.options =x;

}

Monday, 23 November 2015

Invoking a cross domain webservice from jquery

I am going to share the jquery code that I used to invoke a cross domain webservice (for more details on cross domain requests, please click here)

We need to pass following couple of important fields while invoking the cors webservice.

  • dataType: 'json'
  • crossDomain : true
  • and I have the basic authentication as well for my webservice, so I am passing xhrFields.

xhrFields: {   
    withCredentials: true
  }


Here is the full jquery code snippet, 


$.ajax({
 
url:'URL_TO_MY_WEBSERVICE',

headers: {
'Access-Control-Allow-Origin':'*',
'Access-Control-Allow-Headers':'Origin, X-Requested-With, Content-Type, Accept',
'Access-Control-Allow-Methods':'GET, POST, PUT, DELETE, OPTIONS',
'Access-Control-Max-Age': '86400',
'Access-Control-Allow-Credentials':true,
        'Authorization':setAuthHeader("userName", "password"),
        'Content-Type':'application/json'

    },xhrFields: {   
    withCredentials: true
  },
type: 'GET',
dataType: 'json',

crossDomain : true



Note: My webservice requires the users to be authenticated with http basic authentication. You can see the Authorization uses a method called setAuthHeader() which intern uses btoa() function to generate the base 64 encoded string which is required for basic authentication. Please find the setAuthHeader() source code below,

function setAuthHeader(username,password){
var cred = username +":"+ password;
var basic = btoa(cred);
var hashstr = "Basic "+basic;
return hashstr;

}

Parallel and Serial assignments in Oracle BPM human tasks

In this post I will discuss on parallel and serial assignments of human tasks in oracle bpm.

Parallel assignment:

  • This option will be used when we need parallel approval for a specific task. 
  • Users jack, rose and andy should need to approve/reject the task in parallel.
  • We can specify the list of users as a comma separated string in human task assignment.
  • We can decide the vote outcome by specifying condition on the percentage of the outcome by the parallel participants.
  • In the below example I am setting the outcome as reject even if one of the users rejects (My requirement is it is considered as approved when all the users approve it, if any one user rejects and the task should be considered as rejected).
Serial assignment:
  • Serial assignment is just the task goes to each mentioned users in sequence for approval.
  • users jack, rose and andy should need to approve/reject the task in sequence.
  • We can configure the serial assignment in such way that if any of the users rejects the task then task will not move to the next users. It will directly by considered as rejected.
  • Click on the pencil icon in the assignment tab of the human task.

Monday, 20 July 2015

equals() method in Comparator Interface in java

Why there is equals() in Comparator Interface when it is already defined in Object class which is super class of all classes in Java??

The only reason that the equals() is defined again in the Comparator Interface is just to defined some different documentation of equals() in Comparator interface. The equals() method in Comparator interface has some extra documentation which is specific to Comparator functionality.

Have a look at the documentation of equals() method in Compartor interface here.