Class DesignerStateHelper


  • public final class DesignerStateHelper
    extends Object
    Helper for adding new state to the workflow.
    Since:
    7.0.0
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • addNewStateToPersisted

        public static StateAddedEvent addNewStateToPersisted​(IEntityContext ec,
                                                             Locale locale,
                                                             long projectId,
                                                             long workflowVersionId,
                                                             AddNewStateData data)
                                                      throws LimitExceededException
        Adds a new state to the given project. Add the state to the given workflow version when the project uses the new workflow. Otherwise, add the state to the old workflow configuration.
        Parameters:
        ec - Entity context for interacting with the database.
        locale - Current locale.
        projectId - ID of the project for which to add a state.
        workflowVersionId - ID of the workflow version (when the project uses the new workflow) to which to add the new state.
        data - Details about the new state to be added.
        Returns:
        Event that can be dispatched to inform all tabs about the added state.
        Throws:
        LimitExceededException - When no suitable (non-existing) name could be found for the state.