Jump to: navigation, search

Stardust/Knowledge Base/Customization/Portal/Bulk Completing Custom Worklist View

a) Introduction

Based on certain requirements, there are instances when a user with a specific role needs to complete activities in bulk/ multi select, example below does the following:

  • Add Custom perspective within the Stardust portal
  • Loads a Custom Activity View within the custom perspective, user with a certain role can only access this view
  • Allows multiple selection of these activities, and complete them.

Note: This example can be extended to display only the manual activities in the activity table.

b) Custom Activity View - Completion of Bulk Activities

Download the complete example project.

Steps:

  • The above example project ipp-ao-plugin has a structure that includes all the markups(xhtml,images..etc), and source. Nothing else needs to be stored at the dynamic web application level.
  • Compile the attached project plugin and add the same in the WEB-INF\lib folder of your dynamic web project
  • Above Plugin will add a new Perspective - "Custom Perspective" this will be visible only to the user with Role "External" So please make sure that you have this role defined in your process model.
  • An "Activity View" will be added to this perspective.
  • All the activities will be displayed as below.
  • Note: Currently the goal of this example is to select multiple activities and complete it.
  • You can always drill down the activities per user/role, and check for the implementation type is "Manual" or "Application", this would not be recommended unless absolutely required and authorized by the design/architecture team.

Result:

A new perspective with id "Custom Perspective" will be added.

  • If you login to the portal with the user having "External" role, Custom Perspective and then Activity View will be displayed.
  • Select the Required Activities and Click "Complete".
Stardust Complete Bulk Activities.png















Implementation:

  • Attached jar contains an "customactivityView.xhtml" view, that displays all the activities, with a "Complete All" button on top of the activity table.
  • "CustomActivityViewBean" is the backing bean for this activity view table.
  • Above bean has a function "createQuery()" within inner class "ActivitySearchHandler" that has the activity query. ActivityInstanceQuery that will be passed in to the QueryResult for fetching the activities.
  • Selecting the activities and clicking on the "Complete All" button will invoke "completeAllActivities()" from the backing bean, and refresh the activity table.


Note:

For 6.x version we need to modify existing project under Stardust_Bulk-Activities-files.zip

  • "PortalUiInitialization" bean need additional line of code to initialize Perspective before assigning any role to it
  PerspectiveDefinition perspective = (PerspectiveDefinition) bean;
  Add below line of code after type casting bean to PerspectiveDefinition and then assign any role 
    Set<String> roleset =  perspective.getRequiredRolesSet();
  • For "completeAllActivities()" from CustomActivityViewBean backing bean we need to change call from
  PPUtils.activate(ai); to com.infinity.bpm.ui.web.viewscommon.utils.ActivityInstanceUtils.activate(ai);
  • Packaging changed for following classes in Stardust 6.x version from icom.infinity.bpm.portal.adminPortal to com.infinity.bpm.portal.admin
 AdminportalConstants.java
 ResourcePaths.java
 WorkflowFacade.java 
 So import statement's need to be changed in CustomActivityViewBean
  • Checkbox selection for activity list table is removed in 6.x version. For multi select you need to use ctrl select or shift select button option.