5 Replies Latest reply: Dec 17, 2010 7:45 AM by 824847 RSS

    Customize workspace

    768287
      I need to remove bulk actions menu from workspace, and change one worklist table header from Activity to State. Can someone please help me?

      Thanks a lot.
        • 1. Re: Customize workspace
          388683
          Hello,

          These tweaks go beyond the capabilities of standard property-based customization engine (at least in OBPM 10g).

          Fortunately, BPM applications are pretty much standard Java and can be customized as such - for example, by editing the UI pages directly. Such changes need to be tracked carefully, though, because even minor upgrades or redeployments can break or erase your custom code.

          The workspace application uses xhtml jsf files to present the UI. These files can be found under [BPMHome]/webapps/workspace/jsf directory. More specifically, you need to customize the file viewPanelTemplate.xhtml. The bulk action control can be just commented out but you need to do more work to rename standard columns like Activity or Participant. The following code in viewPanelTemplate.xhtml can be used to display the custom table header:
          <!-- Presentation Headers -->
          <oc:Columns id="headerColumns" var="headerCol" model="#{componentBean.viewTableBean.rowLayout.columnListModel}" cssStyle="#{componentBean.viewTableBean.rowLayout.headerCssStyle}" cssClass="#{componentBean.viewTableBean.rowLayout.headerCssClass}">
            <h:graphicImage id="headerIcon" value="#{fn:getImage(headerCol.components[0].headerImageKey)}" title="#{headerCol.components[0].label}" rendered="#{headerCol.components[0].showingImageInHeader}" styleClass="bpmWorkspaceInstanceDetailButton"/>
            <h:outputText id="headerText" value="#{yourCustomizationsBean.translator[headerCol.components[0].label]}" rendered="#{not headerCol.components[0].showingImageInHeader}"/>
          </oc:Columns>
          Note that the code refers to your custom Java bean yourCustomizationsBean. This bean need to be created and plugged in into the workscope application. Here the example of how such class could look like:
          package com.xyz.bpm.custom;
          
          import java.util.HashMap;
          import java.util.Map;
          
          public class WorkspaceCustomizationHelper
          {
            public class MapInterceptor extends HashMap
            {
              public Object get(Object key)
              {
                String keyAdd = "";
                if (key != null) keyAdd = key.toString();
                return "Custom prefix etc" + keyAdd;
              }
            }
            
            private Map translator = new MapInterceptor();
          
            public Map getTranslator()
            {
              return translator;
            }
          }
          This Java class needs to be compiled with javac 1.5 and placed under [BPMHome]/webapps/workspace/WEB-INF/classes directory.

          Ideally the class would use some external properties to translate standard labels and messages to your custom ones (a la message bundle).

          To plug the code into the application please add the following to the *[BPMHome]/webapps/workspace/WEB-INF/managed-beans.xml*:
              <managed-bean>
                 <managed-bean-name>yourCustomizationsBean</managed-bean-name>
                 <managed-bean-class>com.xyz.bpm.custom.WorkspaceCustomizationHelper</managed-bean-class>
                 <managed-bean-scope>session</managed-bean-scope>
             </managed-bean>
          Hope this helps,
          IG

          Edited by: igorbunov on May 18, 2010 12:19 PM
          • 2. Re: Customize workspace
            739317
            Dear all,
            thanks for sharing knowledge,..
            It's very useful for our project

            Thanks & Regards,
            • 3. Re: Customize workspace - Add custom bulk action
              772124
              Hi all,

              Thanks to guidance on this forum, we have been able to add our own custom action in the "Bulk Action" drop-down list.

              However, after the Participant has selected a number of work-items and then selected our custom bulk action, then we need to present a screen to the Participant in order to allow some user-entry. We cannot figure out any way in which to launch such a screen.

              In the Out-of-the-box product, there is a bulk-action called "Consult". When this is selected, a small modal window is launched. We need exactly that type of functionality.

              Any suggestions how we can achieve this ?

              Thanks.
              • 4. Re: Customize workspace - Add custom bulk action
                789637
                Hi,

                Can you please tell me how did you add your own custom items in the "Bulk Action" drop-down.


                Thanks.
                • 5. Re: Customize workspace - Add custom bulk action
                  824847
                  Hi user13101652,

                  Have you managed how to launch a screen when clicking in a bulk action? I'm having the same issue.

                  Thank you!