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.
      • 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.
      • 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.
      • 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.
      • 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.
      • 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 UserGroups. 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.
      • updateUsers

        public static void updateUsers​(WorkflowModelBean modelBean,
                                       IWorkflowProvider provider)
        Rereads the available Users. 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 users.