Pages

Helpful Links

Thursday, December 22, 2011

Oracle BPM: Configuring BAM (Process Administrator and Database)

BAM is really necessary for reporting purposes. First of all we create the database for BAM in the External Resources section. Create two connection one for BAM and other for Datamart: Follow the following steps to make databases for BAM and database. First you can configure the BAM shown after the BAM picture.
  1. Login to the Process Admin with Admin Login that's made at the time of installation.
  2. Click on Process Monitoring on left and Click the BAM tab.
  3. Click on Manage Database
  4. Check the Create Database and Create Data structure options
  5. Give Database Administrator user and Password and Click OK.
BAM


After the Database is created we need  to configure it. In BAM confuration:

  1. Go to BAM Link on left inside Process Administror
  2. Click on Process Monitoring on left and Click the BAM tab.
  3. Click the Enable Automatic Update option. Select the External Database made for BAM.
  4. Give the Update Frequency in minutes. (This the periodic time after which the BAM is updated)
  5. Give the data Expiration time. (This is the time data is kept in BAM before deleting or moving it to Datamart).
  6. Save it.
Datamart and BAM settings
 Now the job is to install the process monitoring service.

Windows:
First set the JAVA_HOME environment variable. Right Click on My Computer-> Properties -> Advanced tab -> Click Environment Variable button. Now add a new system variable called JAVA_HOME. Give the path to <ORACLEBPM_HOME>/jre/bin.

Now Install the service using the script <ORABPM_HOME>/bin/oraclebpmwarehouse.bat install .
This installs the service for BAM. In the services a new service can be seen of the name Oracle BPM datawarehouse service default.

Linux:

Same as windows on terminal. The script is this: <ORABPM_HOME>/bin/oraclebpmwarehouse.sh start

Friday, December 16, 2011

Oracle BPM: Working with Buttons

In oracle BPM applying different codes or methods to the buttons is not straight forward as in some other applications. Different logics can be applied in the jsp (for which I will give a complete tutorial in a few days). For now for easy understanding I am using the presentations from the studio to apply logic and decisions to the buttons code, it can also be used for form validations and requirements fulfillment, easy to understand for people with web development background.

I have seen the Oracle tutorials about buttons and they have made a mess of it. Its really simple.

Now if you look at the following project:

Workflow
The workflow shows that when the product detail is entered by the Initiator. It goes the Head of Department (HoD) for approval. The HoD can simply approve and reject it based on the content. By default there are two buttons present in the presentation called submit and Cancel. We can remove them and add our own or edit them to function as we want them to.

First of all we need to make a new method in project-> Catalog -> Module -> right click your object -> New -> Method. Name your method like "submitApproval". In the method enter your logic as


//Any Logic
submit("Approvesubmit");

Save it.

Following is the Approval Issuance form available to the HoD:

Approve Reject buttons
Please take not that Approve button is selected, you can see in the properties on the right that the Action is selected as action and Method Invoked is submitApproval() as defined earlier. Now this presentation is given to the Approve form interactive component call inside the screen-flow of the Approval activity.

Approval screenflow

As shown in the figure above. Now add the logic of  result="Approvesubmit" in the conditional transition and logics are entered going out of the screenflow. In the automatic activities we can define logics about different actions as per our project. I have made simple attribute that says approval=true.

Whenever a submit button is clicked the value inside the submit("") method is assigned to the result variable. Result is a predefined variable of type string. For example if submit("me") is given in method. The result variable is result="me".

In the screenshot below we can see a new conditional transition from Approve activity to Fill product detail activity. In the case of Rejection this flow is followed. In the condition its simply written approval !=true.




         
Modified Screenflow


Please leave a comment for every question, query and suggestion







Thursday, December 8, 2011

Oracle BPM: Working with Exceptions

Like every project and application exceptions are really important. They make small mistakes in the project almost negligible, good exception handling tries to hide the bugs in the project. In Oracle BPM exception handling is covered and multiple ways are given to handle the exception that occur outside the normal flow. 4 types of exception are covered:
  1. System Exceptions
  2. Business Exceptions
  3. Code level Exception Handling
  4. Process level exception Handling
1. System level exception for hardware and software problems or unavailability. It is covered by BPM itself as it contains in component catalog -> java -> Lang -> Exception. An error or reason is given to end user.

2. Business Exceptions are generated by business rules. They are generated if some business rule is not met, for example the code below
if creditlimit > givenlimit then
   limitException as OverLimitException = OverlimitException()
   limitException.value  = creditlimit
   throw limitException 
end 
3.  Code level exceptions are handled at code level like
do
  // regular code 

on Exception
  // exception handling code

on exit
  // clean-up code (always executed)

end 
4. When an exception is not handled at code level it becomes a process level exception. It can be handled in flow like the flow given below.
 First add two interactive activities one for instance expiration and one for business exception:
Exception Handling
 Take note from the image given above. First a new instance variable called exception Holder is added of type:Any. Secondly, a business Exception is added under the currently used module of the name Exception by Right clicking on the module-> New-> Business Exception.


Right Click on any role and click Exception to then give the name of the activities you want the type of Exceptions to be handled. The business Exception from the flow above is a business exception that is thrown from Fill Product detail activity using the following code in method.

throw Product.Exception;

The exception is then catched by the Process Exception and the following properties are being entered inside the connector.

Exception Handling
 Now we reach the Exception Handling stage where inside the exception handling stage we can ask the end user how he/she wants to handle the exception. This stage can be handled using the presentation and methods. I have used the method that asks users how they want to handle the exception using the method. The choices are they want to abort(delete) the instance or they want to send the exception back to the activity where the exception occurs. The third choice is to hold the instance in the exception handling stage.


Exception Handling choices


Note: We don't always need to ask the end users for exception handling. Almost all of the exception handling can be done without user interaction. For Example in the case of Instance Expiration from the process deadline missed, this process exception can be sent back to the activity where the exception was generated by removing or extending the deadline.


 

Thursday, December 1, 2011

Oracle BPM: Using Global Activities

Global activities are an important feature of BPM used in almost every project. Global activities can be assigned to a role that is then applied to a participant (can be end user), so eventually all participants in the role can see the global activity. Global Activities are available to the user no matter what stage or role the activity is currently at. Global Activities can be used to run applications related to the project or some statistical data analysis, query the database, show any in-process or completed forms and reports and even email the users. It can also be use to delete and hold instances

Global activities can start a project instance and automatically process
  • process batch reports
  • download a set of files at a schedules time.
  • listen for an specific event in the process.
  • listen to a port.
  • check for specific events, such as a mouse-click or a broken connection error in a remote component.
  • invoke a component or application to create new process instances.
The task of a Global Interactive activity can have the following implementation types:
  • Method
  • Screen-flow
  • Show Workload
  • Show Dashboard
  • Edit Business Rules
Implementation types can be Method,Component, Screen-flow, Show Process Image, Display Instance, Variables (only if the property Use activity instance for presentation is selected) 
 
 The following is a demonstration of adding a global activity to show a form that is being completed, we have a project running. We added a new role swimlane and added a global interactive activity called ViewForm in it.


Add Global Interactive activity
We will give global activity the access in the properties as below:

Global Interactive Properties

 From the Global Interactive Main Task we select the implementation type as required in my case its screenflow with read only access.

Main Task
 
Add an interactive component call inside the screen-flow and the setting in the picture below can be used to display the form. As the screen flow is read-only no changes will be allowed on it. Its primary purpose is to be viewed by user with the role assigned at any stage of the process.

Presentation to be viewed
The following pic shows how Global Interactive Activity is visible to the end user. Under the select action -> under the Applications Heading.

Workspace showing Global Interactive Activity
Hope Global Interactive Activity is clear if there is any query or suggestion, please comment. 
I will give feedback asap