Wednesday, June 27, 2012

ADF 11g PS5 Application with Customized BPM Worklist Task Flow (MDS Seeded Customization)

What is great about Oracle BPM - it offers reusable ADF Task Flows to handle BPM Worklist functionality. BPM ADF Task Flows are consumed from standard BPM Worklist application, from WebCenter and same ADF Task Flows can be consumed from custom ADF application (so, you don't need to run WebCenter for this). Here is documentation chapter, it explains all step by step how to integrated BPM ADF Task Flows into custom ADF application - Creating Custom ADF Applications with Oracle Business Process Management Workspace Task Flows.

In this article I'm going one step further and investigating how you can customize standard BPM Task Flow through MDS Seeded customization. This means you will be able to adapt standard BPM Task Flow to your specific requirements. If requirements are very custom - there is a way to access BPM Human Task functionality through Java API (topic for future posts). Additionally to BPM Worklist, I have tested access to all ADF Task Flows related to BPM from WebCenter Spaces - it all works inside custom ADF application as well (requires some customizations as well, topic for future posts).

Download basic ADF 11g PS5 application with customized BPM Task Flow - IntegratedBPMWorklistApp.zip. This application imports Worklist Task Flow, also there is custom button included - Register (suppose it takes selected task ID and calls custom ADF BC method to register task info in database):


This button - Register, is not available with standard BPM Worklist Task Flow - it was added by me, through MDS Seeded Customization applied for ADF application. Task is registered:


Firstly, let me refresh your knowledge a bit and walk trough most important steps described in documentation for including BPM Task Flows into custom ADF application.

BPM Task Flows are imported through added library - BPM Worklist Components:


Must register oracle.soa.workflow library inside weblogic-application.xml:


Include BPM Worklist ADF Task Flow, set taskFlowMode=worklist (if you set workspace, it will render same BPM Worklist task flow as in WebCenter Spaces, plus additional configurations), showViewsPanel=true (accordion on the left) and showTaskDetailsPanel=true (inline window for task details):


Thats all about including BPM Worklist into custom ADF application. Now will talk about how to customize it.

Sample application implements ADF BC and one custom method in AM Impl class - registerTaskWithDb(taskId):


This is dummy method, in real life you would call ADF BC logic from here. Method is exposed through Client Interface - means accessible in Data Control:


There is backing bean declared, it calls custom method from AM Impl. Action Listener from this bean will be invoked from standard BPM Worklist ADF Task Flow through MDS Seeded Customization:


Will cover every MDS Seeded Customization defined in sample application. BPM Worklist page contains page definition, I have customized it to include AM Impl custom method reference (because this method will be called from BPM Worklist context):


Data Bindings file is customized to include reference to HR AM from our custom application:


Task List toolbar is updated to include our custom button - Register. You should notice Action Listener points to Helper Bean:


Helper Bean is registered inside BPM Worklist Task Flow as well - this definition is stored inside MDS Seeded Customization:


MDS Seeded Customization is enabled from ADF View section on ViewController project:


ADF SiteCC customization class must be set in adf-config.xml, otherwise Site customization will not be applied:


Restart JDeveloper in Customization Developer mode:


Here how it looks BPM Worklist ADF Task Flow in customization mode:


18 comments:

Unknown said...

Hi Andrejus,

I have come across this really useful post whiclst looking into some requirements for a BPM Tasklist for one of our clients:

We have build a customer bpm workspace application that inports the adf task flow for the tasklist. Our client has a number of requirments regarding possible customisations to this task list page and I was wondering whether you would be able to comment on whether you believe these would be feasible. I can then start to look at these customisations using this great post as a guide.

1) Auto Refresh of the Task List - Periodoc refresh of the task list to ensure the end users have a relatively up to date view of tasks when they have left the screen for a period of time. (we would need to consider performance implications of any such requirment). This saves the user manuall needing to use the refresh button.
2) Claim Next Task - A Button to claim the next available task rather than the user manually selecting a task

Many thanks for your time

Regards
Dave

Andrej Baranovskij said...

Hi Dave,

I believe technically both requirements possible to implement.

Regards,
Andrejus

Unknown said...

Thanks for your reply Andrejus.

I'll get the team to llok at this. It was more whether the task flow can be customised in this way as I knew it was possible to implement such requirements in a Typical ADF application / page that is written from scratch

Many Thanks Dave

Andrej Baranovskij said...

My pleasure, Dave. If you will get issues implementing these requirements - drop me a line, I will try to help.

Regards,
Andrejus

Rekha said...

Hi Andrejus,

I have downloaded IntegratedBPMWorklistApp and tried to run it on my integrated weblogic server with remote soa server.

But i am getting error oracle.bpel.services.workflow.client.WorkflowServiceClientException: javax.naming.ServiceUnavailableException [Root exception is java.net.UnknownHostException: soa_hostname]
javax.faces.el.EvaluationException: oracle.bpel.services.workflow.client.WorkflowServiceClientException: javax.naming.ServiceUnavailableException [Root exception is java.net.UnknownHostException: soa_hostname]

Please help me out.
Thanks in advance for your help.

Regards
Rekha

Andrej Baranovskij said...

I suggest to check this post - http://andrejusb.blogspot.com/2012/07/running-oracle-bpm-11g-ps5-worklist.html

Andrejus

Matt said...

Hi Andrejus,

The sample application "IntegratedBPMWorklistApp" is runnable/deployable without doing any additional configuration right?

I deployed the application right away in our soa-server and I got these errors.

OracleJSP error: java.io.FileNotFoundException:

Set the init-param debug_mode to "true" to see the complete exception message.

I'm a newbie by the way and I was assigned the Task/Worklist Module in our project that's why I'm trying to learn from your sample application.

Please help me out.
Thanks a lot Andrejus! More power!


Regards,
Matt


Andrej Baranovskij said...

Hi,

I'm not sure, it is working in our environment... Not sure how to help you.

Andrejus

Matt said...

Hi Andrejus,

I solved the problem by adding "/faces/main" on the url. Newbie mistake...

working url:
http://:/custombpm/faces/main

Thanks!


Regards,
Stephen

Unknown said...

Hi Andrejus,

We would like to integrate the generic BMP worklist with a Custom Webcenter Portal application. But I see a lot of information online refers to Webcenter Spaces. does this mean we can't get the worklist integrated if we are not using Webcenter Spaces? Is there a work around?

Mo

Andrej Baranovskij said...

No need for WebCenter Spaces. You can integrate BPM Worklist even into plain ADF application. See here: http://andrejusb.blogspot.com/2012/07/tips-tricks-how-to-run-oracle-bpm-11g.html

Andrejus

baluleo said...

Hi Andrejus,

This is a pretty interesting post.

I wonder if I need to do something similar for my requirement which is mentioned below :

We have build a ADF Application which consumes "rules-task-flow" to control the vacation period settings.

But I need to customize the labels on the rules task flow. For example, the header "Vacation Period" should be displayed as "I am out on Holiday".

Many thanks for your time.

Regards
Balu

soatutor said...

Hello Andrejus

How are you doing!
Your blogs have always helped me in one way or other, thankyou very much.
I have a requirement where I need to shrink the column width of the TaskList table in the BPM Workspace. By default, the first column is stretched to its max, so all other columns are very small.
Is there a way to control the width of the column in the table?

Regards
RaviKiran

Andrej Baranovskij said...

Yes, there is width property for this.

Regards,
Andrejus

soatutor said...

Hello Andrejus

Thanks for the reply.
I had researched a lot on the width property but could not find it anywhere. I had gone through the ADF taskflow parameters aswell, but couldn't find any. Basically we are including the BPM tasklist taskflow into our own adf pages and displaying it as a region.
Could you please tell me exactly where I could find the width property.
Appreciate your response, I searched a lot in the documentation, blogs, forums, etc. but of no help. Appreciate if you could help me on this.

Regards
Ravi

Andrej Baranovskij said...

You should check on af:table component, there is property called columnStretching. Usually it indicates column ID which stretches. Probably you need to change it.

Regards,
Andrejus

Anonymous said...

Hi
i followed all your tutorials about integrating BPM in ADF but im trying to do this in ADF 12c 12.1.3.0.0 , i have a SOA server which i run from Jdeveloper 12c , after deploying each of the samples and after logging in using adf security all i see is a blank page could you plz give me a sample or guide on how to do this using adf 12c?

Anonymous said...

my problem is solved by adding this jar file to the project :
Common-userprefs.jar