Skip Headers
Oracle® Fusion Middleware User's Guide for Oracle Business Process Management
11g Release 1 (11.1.1.7)

Part Number E15175-15
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

C Customizing Applications in Process Workspace and the Worklist Application

This appendix explains how, for Process Workspace, you can create customized external applications and links that become available in the Favorites list of the Views, Applications, and Favorites pane. It also explains how, for both Process Workspace and the Worklist Application, you can specify the columns that appear in the inbox.

Note:

Create a temporary directory at any location, for example, /scratch/jstein/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.

C.1 How to Customize an Application

To customize and application:

  1. Create an Oracle Application Development Framework Project in Oracle JDeveloper. Figure C-1 shows the Create Fusion Web Application (ADF) dialog box.

    Figure C-1 Creating an ADF Project in JDeveloper

    Description of this graphic follows.
    Description of "Figure C-1 Creating an ADF Project in JDeveloper"

  2. Create a Java class and name it WorkspaceCustomisationImpl.

  3. Include Worklist Application JAR files. Figure C-2 shows the BPM Worklist Components library being added.

    Figure C-2 Including Worklist Application in the Library

    Description of this graphic follows.
    Description of "Figure C-2 Including Worklist Application in the Library"

  4. 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.AttributeLabelType;
    import oracle.bpel.services.workflow.runtimeconfig.model.AttributeLabelUsageList;
    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.example.com/",
                               null);
            CustomLink globalLink3 =
                new CustomLink("BUG DB", "https://bug.example.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) {
            // you can use service to load all label names 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,
                                           IWorkflowContext context,
                                           java.lang.String colName) {
            initDisplayMap(client, context);
            return (String)displayNameMap.get(colName);
        }
    }
    
  5. Create a JAR deployment profile. Create a JAR file and name it customer-impl.jar.

  6. 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 its 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: