Saturday, July 14, 2012

Tips & Tricks How to Run Oracle BPM 11g PS5 Workspace from Custom ADF 11g Application

Oracle BPM 11g PS5 Task List task flow can be included into custom ADF 11g application. This task flow can be executed in 2 modes - worklist and workspace. I already blogged about worklist mode, see here - ADF 11g PS5 Application with Customized BPM Worklist Task Flow (MDS Seeded Customization). Today I'm going to cover different tips & tricks how to run Task List task flow in workspace mode. Workspace mode gives more functionality to the end user - it allows to render list of BPM processes, more dashboards, etc. User can start new BPM process through Task List task flow configured in workspace mode.

Download sample application configured with BPM 11g PS5 Task List task flow for workspace mode - IntegratedBPMWorklistApp_v3.zip. This application is based on the same sample from previous blog for worklist mentioned above.

Sample application is extended with additional custom ADF task flow, bringing data for employee record - this is to demonstrate, Oracle BPM 11g PS5 Task List task flow really can run together with other custom ADF task flows present in the same application. Employee data region is rendered from separate tab:


BPM Workspace tab brings BPM workspace region. User can access assigned tasks, initiate new BPM process from available applications, complete Human Task details, etc.:


Custom ADF application, includes Task List task flow in workspace mode, see task flow parameter value:


There is no very clear documentation about how to run Task List task flow in workspace mode and what libraries are required to be added to your custom ADF application. But we always can check how standard BPM application from Oracle is configured. Go to SOA home, navigate to soa/applications folder - open OracleBPMWorkspace.ear and check contents of this deployment archive. File - weblogic-application.xml includes references to the libraries deployed on the server, make sure to copy same library references into weblogic-application.xml from your custom application (if you deploy custom application on non-SOA domain, make sure to have these libraries deployed):


Library references found in weblogic-application.xml file:


Additionally to referenced libraries, some of the libraries must be packaged together with application. You can check this in the same OracleBPMWorkspace.ear file, WEB-INF/libs folder. Seven additional libraries are included directly into application:


You should notice that two last libraries are coming from JDEV home. These libraries provide us with BPM Task List task flow. Same libraries are available in SOA home as well - strange enough when using libraries from SOA home for BPM Task List task flow - my custom application was not working. Keep in mind this, if you face strange runtime exceptions, to check what libraries you are including.

Even with all libraries included, on runtime exception happens when accessing BPM Task List task flow in workspace mode. It fails to initialize ADF region for External Links task flow:


To workaround this problem, I decided to disable External Links task flow from Oracle BPM Task List library. In order to disable it, I restarted JDev in Customization Mode and opened main view for workspace - bpmHome.jsff:


I noticed that External Links task flow is registered in the left panel accordion. Panel accordion is implemented as declarative component by Oracle, is referenced directly from bpmViewList.jsff:


Open bpmViewList.jsff, now we can manipulate with panel accordion content and disable External Links section:


Select External Links af:showDetailItem element and go to Properties, select Rendered property:


Set Rendered property to be false - this means External Links section will remain hidden:


JDev creates MDS customization file and includes metadata info to hide External Links section from standard Oracle BPM library - this allows us to load Task List task flow in workspace mode successfully:


6 comments:

Achinto Banerjee said...

Hi Andrejus,

The source code of the application seems to be having some issue. the weblogic-application.xml is not as shown in the screenshot. When I try to deploy this app it gives strange runtime errors.

Can you please upload the source code once again.

Also, one more question as per the screenshots the features provided by the taskflow in worklist mode are almost the same. What is the advantage of using the workspace mode.

Andrej Baranovskij said...

Hi,

Uploaded source code is correct, double check on your side. I have compared weblogic-application.xml is same as in screenshot.

May be you server is missing ADF/BPM libraries, its why deployment fails...

Andrejus

Achinto Banerjee said...

You are right it was my bad. The app now works . Realy helpful.

One question though there is hardly any difference between the taskflow in the worklist mode and the workspace mode. When do we use worklist and when when do we use workspace ?

Andrej Baranovskij said...

Hi,

I'm glad it worked :)

Main difference - worklist mode doesnt offer option to start new BPM process, while workspace mode does.

Andrejus

Rose said...

Hi Andrejus,

I know it's been ages since this post, but could you make the zip file available again?

Andrej Baranovskij said...

Hi,

Old samples are moved to Google Archive, check here: http://andrejusb.blogspot.lt/2017/08/my-blog-samples-download-repository-for.html

Andrejus