Pages

Helpful Links

Showing posts with label global activities. Show all posts
Showing posts with label global activities. Show all posts

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 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