Class WorkflowVersionStager


  • public final class WorkflowVersionStager
    extends Object
    When persisting a WorkflowProcess entity graph, keeps track of all workflow entities that need to be created, updated, and deleted.
    Since:
    7.0.0
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • perform

        public void perform​(IEntityContext ec)
        Persists the workflow process. Creates the workflow process, or overwrites the existing process if it exists.
        Parameters:
        ec - Entity context to use for accessing the database.
      • forVersion

        public static WorkflowVersionStager forVersion​(IEntityContext ec,
                                                       @Nullable
                                                       WorkflowVersion newVersion,
                                                       @Nullable
                                                       WorkflowVersion oldVersion)
        Creates a new stager for persisting an unsaved WorkflowProcess.
        Parameters:
        ec - Current entity context for accessing the database.
        newVersion - New version to persist. May be null to delete the old process.
        oldVersion - Existing version to overwrite. May be null when no process exists yet.
        Returns:
        The stager for persisting the new process.