Oracle® Fusion Middleware User's Guide for Oracle Business Process Management 11g Release 1 (11.1.1.6.0 ) Part Number E15175-06 |
|
|
PDF · Mobi · ePub |
For Process Workspace, you can create customized external applications and links that become available in the External Applications panel. For both Process Workspace and the Worklist Application, you can specify the columns that appear in the Task Details pane.
Note:
Create a temporary directory at any location, for example,/scratch/cnkiran/sharedLib
. This will contain all the individual JAR files as well as the shared library JAR file, custom.client.applib.jar
. Do this step before doing any of the following steps.Text.
Create an Oracle Application Development Framework Project in Oracle JDeveloper. Figure C-1 shows the Create Fusion Web Application (ADF) dialog box.
Create a Java class and name it WorkspaceCustomisationImpl
.
Include Worklist Application JAR
files. Figure C-2 shows the BPM Worklist Components library being added.
Create a customization class. This sample class modifies the inbox columns and customize external application and links. For example: WorkspaceCustomisationImpl and its contents as follows:
package view.customisationimpl; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import oracle.bpel.services.workflow.client.IWorkflowServiceClient; import oracle.bpel.services.workflow.runtimeconfig.IRuntimeConfigService; import oracle.bpel.services.workflow.runtimeconfig.model.AttributeLabelTypimport oracle.bpel.services.workflow.runtimeconfig.model.AttributeLabelUsageList;e; import oracle.bpel.services.workflow.runtimeconfig.model.AttributeLabelUsages; import oracle.bpel.services.workflow.verification.IWorkflowContext; import oracle.bpm.ui.customization.CustomLink; import oracle.bpm.ui.customization.IBPMUICustomizations; public class WorkspaceCustomisationImpl implements IBPMUICustomizations { private static Map displayNameMap = new HashMap(); public WorkspaceCustomisationImpl() { displayNameMap.put("instanceId", "Instance Id"); displayNameMap.put("protectedTextAttribute1", "Business Status"); } public List<CustomLink> getCustomGlobalLinks() { CustomLink globalLink1 = new CustomLink("Oracle Home Page", "www.oracle.com", null); CustomLink globalLink2 = new CustomLink("Self Services Application", "http://global-ebusiness.oraclecorp.com/", null); CustomLink globalLink3 = new CustomLink("BUG DB", "https://bug.oraclecorp.com/", null); List<CustomLink> globalLinks = new ArrayList<CustomLink>(); globalLinks.add(globalLink1); globalLinks.add(globalLink2); globalLinks.add(globalLink3); return globalLinks; } public String getColumnNames() { return "title,taskNumber,instanceId,creator,protectedTextAttribute1"; } private static void initDisplayMap(IWorkflowServiceClient client, IWorkflowContext context) { // u can use service to load all label name for text attributes if (displayNameMap == null) { synchronized (String.class) { if (displayNameMap == null) { displayNameMap = new HashMap(); try { IRuntimeConfigService service = client.getRuntimeConfigService(); AttributeLabelUsageList list = service.getAttributeLabelUsages(context, "Text"); List<AttributeLabelUsages> list1 = list.getAttributeLabelUsages(); for (AttributeLabelUsages usage : list1) { AttributeLabelType type = usage.getLabel(); displayNameMap.put(type.getTaskAttribute(), type.getLabelName()); } } catch (Exception exc) { } } } ) public String getColumnDisplayName(IWorkflowServiceClient client, } } } ) public String getColumnDisplayName(IWorkflowServiceClient client, IWorkflowContext context, java.lang.String colName) { public String getColumnDisplayName(IWorkflowServiceClient client, IWorkflowContext context, java.lang.String colName) { initDisplayMap(client, context); return (String)displayNameMap.get(colName); } } initDisplayMap(client, context);
Create a JAR deployment profile. Create a JAR file and name it customer-impl.jar
.
Deploy it as a part of the shared library, custom.client.applib.jar
. To do this, update the MANIFEST.MF
file and update the shared library as explained in Appendix D, "Deploying Images and JAR files as Part of a Shared Library JAR file".
Depending on your customization, you can now see it's effects.
If your customization is for Process Workspace and involves either creating an external application or specifying inbox columns in the Task Details pane or both, you will see the following:
Your custom application listed in the External Applications panel of the Process Workspace Home page as shown in Figure C-3.
The columns of the Task Details inbox adjusted according to your specifications as shown in Figure C-4.