Oracle SOA Suite Online Training

Interested in learning Oracle SOA Suite 12c?
Learn from the author of this blog!
A complete and comprehensive course on the #1 platform on SOA - Oracle SOA Suite

Click here to find the complete course details
Click here to check the first session on Oracle SOA Suite 12c

================================================================================================

Multi-Instance Processing in BPM - Iterating over Arrays in BPM

It is often a common scenario to trigger multiple instances of a particular part of a BPM process. A typical example would be
You have an array as input, and the same process to run for each of the element set in this array(each element may refer to a particular user tasks)
OR

Every night, a batch process to run and each of the managers in the organization to be notified with the to-be-reviewed activities assigned to them ie, each person should be notified only with his tasks which requires a particular process to be run for each of the managers

NOTE :
This post specifically applies to Oracle BPM Suite 11g 11.1.1.5, before the FeaturePack(FP). In this version, the LoopCounter Variable in the subprocess is not visible, which is a bug. And this post is the workaround for that.
Post FeaturePack release, the variable is available in the Sub-Process, so the process of assigning the individual input in the script task at the starting of the Sub-Process is not required. I'll write another blog for it.

In this example,
 there are several managers, and a separate instance of the sub-process(shown below) is to be triggered to each of the managers, paralelly


Input to the sub-process has to be of type Array – thumb rule ;) – as only then, you can split the data  and make each of the instances get corresponding data
Schema for the input to the sub-process is given at the end of the post

There is a way to instantiate parallel processes in BPM, and that’s called MultiInstance invocations
1.       Create a sub-process and, create the activities that are required to repeat for each manager
2.       Now, this should be invoked for all the elements in the array. So some configuration  to be done to the sub-process property
My process looked like below

3.       Double click the sub-process à


Select multiinstance as loop characteristic
Cardinality is no. of instances to be produced, here it is count (allActivities.reviewerWiseActivities, which otherwise is equal to no. of managers - with tasks)
Uncheck Is Sequencial
Don’t touch Arguments definition tab, as since this is a pre-Feature pack release, there is a bug and you cannot go with the standard way
1.       Input to the sub process is an array, but typically each manager has to be assigned only with his tasks, which will be one element in the array. So use a script task as the first activity in the sub-process and copy nth element from the array and assign it to sub-process dataobject



Here, the value in the left box is :: AllActivitiesPDO.reviewerWiseActivities[loopCounter] which is obvious to understand.

Bug in Pre-Feature pack release is that this loop counter is not available in the properties window of the sub process. That’s the reason, we are splitting the array within the subprocess but not before invoking the subprocess.
Had this been post Feature pack release, you can split the array in the properties window of the subprocess, define input and output elements, and skip this script task.

That’s it! Now, n number of sub process instances will start paralelly

Hope this is useful J

BPM - UCM Integration : Human Task Attachments(stored in UCM)

This post deals with Human Task attachments stored in UCM

This post applies specifically to Oracle BPM Suite 11g 11.1.1.5 Version before the FeaturePack, which is otherwise called PS4(Pure Vanilla BPM PS4)

UCM Integration with BPM is inbuilt from PS5 onwards(the document tab in the Human Task and some configuration in EM), but till PS4 there is no direct provision to talk to the UCM store. It has to be invoked just as any other web service, get the content and operate on it.

Human Task attachments is such a common scenario, and the attachments are normally fetched from some content repo like UCM.
How do we get the content from UCM and attach it to the Human Task so that the participant that acts on the task will have the attachments in his taskform/Email.

UCM - as such - provides various WebServices to deal with various operations. List of WebServices can be seen in its documentaion

This post deals with the GetFile WebService of UCM(http://docs.oracle.com/cd/E17904_01/doc.1111/e11011/c05_core.htm#BABFDEFH) which, as the name implies, is used to retrieve the content stored in UCM

First, login to the UCM console, and click on ------------, get the WSDL in to the project OR create a reference to it.
This WebService has an operation that takes in 3 parameters. Often, we deal with only one parameter from the list(either the documentId or documentName(in UCM)), with other two as null.
But there is a bug in the WebService where if you pass a payload similar to
<.....>
<docId>1232</docId>
<docName/>
<RevisionSelectionMethod/>
</.....>

the service returns error - inspite of the fact that you've passed the correct docId of the document you want to retrieve.
Workaround for this is to remove the empty tags completely which you cannot directly make in the invoke activity, so use a mediator before the call in which you remove out the not required tags(in the routing rule transformation - by not mapping these two)

A screenshot of the same


Once this is done, the webservice returns a result which is the content of the document, which you need to assign to the attachments part of the execData of the HumanTask.

Hope this gave you an understanding of how to retrieve the documents from UCM (in PS4)

The next post is about dealing with multiple attachments in Human Tasks

Project Data Objects are not Global!

There are 2 types of variables that you can define in BPM Processes

Process Data Objects
       That can be shared across activities in a process. There is no confusion in this I hope.

Project Data Object
       This can be thought of as a 'Global Variable' that are shared across processes in a BPM Project and carry the same value across Processes. But this is NOT TRUE. We use Project Data Objects when the same variable is used across Projects. For example, a variable empId is required across multiple processes you have in a BPM Project, but each project holds its own values, then instead of defining the same object as Process Data Object in every process, one Project Data Object should be sufficient.

Hope this clears the myth !

Cleared Oracle BPM Certification

I've done my Oracle BPM Certification (IZ0 560) today, and want to share my learning path for the certification.

Fortunately, I had a chance to work on a highly customized BPM project for about 2 months which gave me a great insight into Oracle BPM Suite 11g and all its features, which helped me a lot to prepare for the certification.

But for those who didn't have any real time experience on BPM Projects, for those who are practicing on their own, I would suggest the following path

First of all, Start with the basic BPM tutorial by Oracle
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/obpm/11g/r1/firstProcess/firstprocess_obpm11g.htm

This example gives you a basic foundation on the BPM Suite and its modelling capabilities.
Once you are done with this, its time for you to take a deep dive into the Suite
This books works on a single, big project that covers almost all the features of the Suite
http://www.oracle.com/technetwork/middleware/bpm/learnmore/default-171759.html

Though it takes some time, do not skip it, this is the best book for beginners to get a good knowledge and learning experience on the entire Suite.

Once you are done, thats it! You are almost ready for the exam
Look at the certification link for the list of topics and see if you've covered all these.

Note that if you are well versed with SOA Suite, learning BPM and getting certified would be a cakewalk, provided you put some effort.

Measurement Mark in Process Analytics - Explained!

'Measure Business Indicator' and 'Measurement Mark' is often a topic of confusion. So let me explain them in detail

A business Indicator in BPM is nothing but a Project Data Object that can be used to capture information from your BPM Process to be sent to Process Analytics Databases / BAM Databases that Process Analysts can use to monitor your processes

A Business Indicator can be of the following types
  • Measure
  • Dimension
  • Counter
This post completely discusses about Measure

A Measure Business Indicator is used to capture something that can be measured.
Ex : The discount given to a party

There are few pre-defined Measure Business Indicators defined.
  • Number of activity instances by activity, process and participant
  • Avg time to complete an Activity
  • Avg time to complete a Process
Apart from these, you can always define your own Measure Business Indicator, just as in the abouve example, Measure to capture 'discount given to a party'

Now, If the Measure Business Indicator captures this value, then why again Measurement Mark?


Measurement marks enable you to measure a business indicator of type measure at a certain point in the process
Single Measurement
Interval Start
Interval Stop

Explanation in detail
Whatever you want to measure, you have to define a measure Business Indicator first.
Lets say, in your process, there are 10 activities, and say
At activity1, you want to measure discountAmt (measure Business Indicator(BI) name : discMeasure)
At activity2, you want to measure salary (measure Business Indicator(BI) name : salMeasure)
At activity3, you want to measure someotherthing (measure Business Indicator(BI) name : someMeasure)
 and so on…
Now, you have to create measure type Business Indicators corresponding to all these measures you want to measure. End of the day, all these become project data objects that hold values

Now, storing salMeasure, someMeasure at activity1 doesn't make sense, as these values are not available yet. At activity1, saving discMeasure only makes sense
So, how do you say the BPMN service engine to store only discMeasure at Activity1, and similarly only salMeasure at Activity2, and so on…
This is done using Measurement Mark
A measurement mark tells the service engine what all measures to be stored into the process analytics/BAM databases
A measurement mark associates measures at a particular point(in this case, discMeasure to Activity1)
Along with storing the measure BI's selected, all the default measures and dimensions are also stored

Process to add a Measurement Mark
  1. Pre - req : Identify what all measures to be captured, define corresponding Measure BI's in the structure pane. Also define corresponding Dimensions that may be used to group these measures later in the dashboards
  2. Where ever you want to measure something, drag and drop 'Measurement' activity from the component pallette
  3. Give a name, select the measure BI's to be stored

Interval Start and Interval Stop Measurement is used when you want to capture data from a section of the process
The start and end points of the process that you want to capture is identified using these two measurement marks. And even here, you need to associate all the measure BI's that you want to be stored at that point

Hope this made you clear on the topic of Measure and Measurement Mark