Class WorkflowTriggerHelper


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

      • checkApplicantAccessForUserInvocation

        public static boolean checkApplicantAccessForUserInvocation​(IWorkflowEventData eventData,
                                                                    EUserInvocationAccessType accessType)
        Checks if the user has access to the form record. If the access type is null, the user is considered to have access. If the access type is INITIAL_APPLICANT, the user is considered to have access if they are the initial applicant of the form record. Otherwise, the user is considered to have access if they have access to the form record.
        Parameters:
        eventData - the event data
        accessType - the access type to check
        Returns:
        true if the user has access, false otherwise
      • 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.