Filtering the Workflow Messages

Filter the list of Workflow application messages so only messages that meet specified criteria are shown.

The comment tag associated with Workflow messages is ANDROID_CUSTOMIZATION_POINT_FILTERING.

  1. Open the CustomizationHelper.java file, which is located in the ...\HybridWebContainer\src\com\sybase\hwc folder.
  2. Find the getFilteredMessages() method.
    The default behavior is to return all messages.
  3. To return a subset of messages, you can modify getFilteredMessages() to return a list of messages based on your criteria.
    For example, if you want all but the low importance messages to appear in the message list, you can change the code to the following:
    // Eliminate low importance messages.
          ArrayList<Message> filteredMessages = MessageDb.getMessages();
          for( int iMessageIndex = 0; iMessageIndex < filteredMessages.size(); iMessageIndex++ )
          {
             if( filteredMessages.get(iMessageIndex).getMailPriority() ==  com.sybase.mo.AmpConsts.EMAIL_STATUS_IMPORTANCE_LOW )
             {
                filteredMessages.remove(iMessageIndex);
                //we need to decrement the index so we don't skip an element now
                iMessageIndex--;
             }
          }
          return filteredMessages;