Class WorkflowTriggerHelper


  • public final class WorkflowTriggerHelper
    extends Object
    Utilities for implementing workflow trigger handlers.
    Since:
    7.0.0
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • createUserGroupFilter

        public static de.xima.cmn.criteria.FilterCriterion createUserGroupFilter​(String userGroupSearchTerm,
                                                                                 Iterable<BenutzerGruppe> userGroups)
        Creates a filter for a workflow trigger that check if either no search term with the given key exists; or one exists and its value matches one of the given user group's UUIDs.
        Parameters:
        userGroupSearchTerm - The search term key.
        userGroups - The user groups to match.
        Returns:
        The filter criterion.
      • createUserGroupFilter

        public static de.xima.cmn.criteria.FilterCriterion createUserGroupFilter​(String userGroupSearchTerm,
                                                                                 IUser user,
                                                                                 Mandant client,
                                                                                 String scope)
        Creates a filter for a workflow trigger that check if either no search term with the given key exists; or one exists and its value matches one of the user group UUIDs of the given user.
        Parameters:
        userGroupSearchTerm - The search term key.
        user - A user with user groups to match.
        client - The client scope from which to obtain the user's groups.
        scope - The scope from which to obtain the user's groups.
        Returns:
        The filter criterion.
      • createUserGroupFilter

        public static de.xima.cmn.criteria.FilterCriterion createUserGroupFilter​(String userGroupSearchTerm,
                                                                                 IWorkflowEventData event,
                                                                                 String userGroupScope)
        Creates a filter for a workflow trigger that check if either no search term with the given key exists; or one exists and its value matches one of the user group UUIDs of the user from the given event data.
        Parameters:
        userGroupSearchTerm - The search term key.
        event - Event data from which to obtain the user and client.
        Returns:
        The filter criterion.
      • createWorkflowStateFilter

        public static de.xima.cmn.criteria.FilterCriterion createWorkflowStateFilter​(String stateSearchTerm,
                                                                                     WorkflowState workflowState)
        Creates a filter for a workflow trigger that check if either no search term with the given key exists; or one exists and its value matches the given workflow state's UUID.
        Parameters:
        stateSearchTerm - The search term key.
        workflowState - The workflow state to match.
        Returns:
        The filter criterion.
      • createWorkflowStateFilter

        public static de.xima.cmn.criteria.FilterCriterion createWorkflowStateFilter​(String stateSearchTerm,
                                                                                     IFormRecordProvidingEvent event)
        Creates a filter for a workflow trigger that check if either no search term with the given key exists; or one exists and its value matches the given workflow state's UUID.
        Parameters:
        stateSearchTerm - The search term key.
        event - Event data with the workflow state to match.
        Returns:
        The filter criterion.