Class WorkflowExternalStateHelper


  • public final class WorkflowExternalStateHelper
    extends Object
    Helper methods for creating and modifying the WorkflowExternalState, which is the formcycle specific state required by the flowchart on the client. The external state is part of the total state of the flowchart preact app.
    Since:
    7.0.0
    Author:
    XIMA MEDIA GmbH
    • Constructor Detail

      • WorkflowExternalStateHelper

        public WorkflowExternalStateHelper()
    • Method Detail

      • fullUpdate

        public static void fullUpdate​(WorkflowModelBean modelBean,
                                      IWorkflowProvider provider,
                                      Locale locale)
        Recreates the entire external state. Use sync(WorkflowModelBean) to send them to the client with the next AJAX update.
        Parameters:
        provider - Provider to query for data.
        modelBean - Current model bean with the data.
        locale - Locale for which to create the external states, used for the localized name of the system state received.
      • sync

        public static boolean sync​(WorkflowModelBean modelBean)
        Sends the updates external state to the client with the next AJAX update.
        Parameters:
        modelBean - Current model bean with the data.
        Returns:
        Whether the external state has changed since the latest updated.
      • updateClientCounters

        public static void updateClientCounters​(WorkflowModelBean modelBean,
                                                IWorkflowProvider provider)
        Rereads the available ClientCounters. Use sync(WorkflowModelBean) to send them to the client with the next AJAX update.
        Parameters:
        modelBean - Model bean with the current workflow server state.
        provider - Workflow provider with the context, used for reading the client resources.
      • updateClientResources

        public static void updateClientResources​(WorkflowModelBean modelBean,
                                                 IWorkflowProvider provider)
        Rereads the available ClientResources. Use sync(WorkflowModelBean) to send them to the client with the next AJAX update.
        Parameters:
        modelBean - Model bean with the current workflow server state.
        provider - Workflow provider with the context, used for reading the client resources.
      • updateDirectClientAuthorizations

        public static void updateDirectClientAuthorizations​(WorkflowModelBean modelBean,
                                                            IWorkflowProvider provider)
        Rereads the available direct client authorizations. Use sync(WorkflowModelBean) to send them to the client with the next AJAX update.
        Parameters:
        modelBean - Model bean with the current workflow server state.
        provider - Workflow provider with the context, used for reading the direct client authorizations.
      • updateInboxes

        public static void updateInboxes​(WorkflowModelBean modelBean,
                                         IWorkflowProvider provider)
        Rereads the available Inboxes. Use sync(WorkflowModelBean) to send them to the client with the next AJAX update.
        Parameters:
        modelBean - Model bean with the current workflow server state.
        provider - Workflow provider with the context, used for reading the inboxes.
      • updateLdapConnections

        public static void updateLdapConnections​(WorkflowModelBean modelBean,
                                                 IWorkflowProvider provider)
        Rereads the available LDAP connections. Use sync(WorkflowModelBean) to send them to the client with the next AJAX update.
        Parameters:
        modelBean - Model bean with the current workflow server state.
        provider - Workflow provider with the context, used for reading the LDAP connections.
      • updateLdapQueries

        public static void updateLdapQueries​(WorkflowModelBean modelBean,
                                             IWorkflowProvider provider)
        Rereads the available LDAP queries. Use sync(WorkflowModelBean) to send them to the client with the next AJAX update.
        Parameters:
        modelBean - Model bean with the current workflow server state.
        provider - Workflow provider with the context, used for reading the LDAP queries.
      • updateProjectResources

        public static void updateProjectResources​(WorkflowModelBean modelBean,
                                                  IWorkflowProvider provider)
        Rereads the available ProjectResources. Use sync(WorkflowModelBean) to send them to the client with the next AJAX update.
        Parameters:
        modelBean - Model bean with the current workflow server state.
        provider - Workflow provider with the context, used for reading the project resources.
      • updatePromptConnections

        public static void updatePromptConnections​(WorkflowModelBean modelBean,
                                                   IWorkflowProvider provider)
        Rereads the available prompt connections. Use sync(WorkflowModelBean) to send them to the client with the next AJAX update.
        Parameters:
        modelBean - Model bean with the current workflow server state.
        provider - Workflow provider with the context, used for reading the prompt connections.
      • updatePromptQueries

        public static void updatePromptQueries​(WorkflowModelBean modelBean,
                                               IWorkflowProvider provider)
        Rereads the available prompt queries. Use sync(WorkflowModelBean) to send them to the client with the next AJAX update.
        Parameters:
        modelBean - Model bean with the current workflow server state.
        provider - Workflow provider with the context, used for reading the prompt queries.
      • updateStates

        public static void updateStates​(WorkflowModelBean modelBean,
                                        IWorkflowProvider provider,
                                        Locale locale)
        Rereads the available WorkflowStates. Use sync(WorkflowModelBean) to send them to the client with the next AJAX update.
        Parameters:
        modelBean - Model bean with the current workflow server state.
        provider - Workflow provider with the context, used for reading the workflow states.
        locale - Locale for localizing the name and description of the states.
      • updateSubmitButtons

        public static void updateSubmitButtons​(WorkflowModelBean modelBean,
                                               IWorkflowProvider provider)
        Rereads the available submit buttons. Use sync(WorkflowModelBean) to send them to the client with the next AJAX update.
        Parameters:
        modelBean - Model bean with the current workflow server state.
        provider - Workflow provider with the context, used for reading the submit buttons.
      • updateUserGroups

        public static void updateUserGroups​(WorkflowModelBean modelBean,
                                            IWorkflowProvider provider)
        Rereads the available user groups. Use sync(WorkflowModelBean) to send them to the client with the next AJAX update.
        Parameters:
        modelBean - Model bean with the current workflow server state.
        provider - Workflow provider with the context, used for reading the user groups.