Class MigrationInventory

java.lang.Object
com.axelor.workflow.migrate.MigrationInventory

public class MigrationInventory extends Object
What is parked on a definition, and where: the read half of the parked-run mover. Counted by position, which the graph bounds, so the dialog stays small however large the backlog.

A position is an open park, not a waiting row. A run held at waiting only for an escape branch has no park and no walk left, and a forked run's parks sit on its branch rows; neither is offered as a position.

  • Constructor Details

    • MigrationInventory

      public MigrationInventory()
  • Method Details

    • of

      public List<ParkedPosition> of(MetaWorkflow def)
      Every position this definition has parked runs on, across every revision: newest revision first, unpinned last, then in graph order. No revision is special-cased; moving within one revision is source == target.
    • parkedCount

      public long parkedCount(MetaWorkflow def)
      How many runs are parked on this definition, for the mover's button. Unlike MetaWorkflowRepository.parkedInstanceCount, it leaves out run-less tasks and armed triggers, which the mover cannot move.
    • parkedCount

      public long parkedCount(MetaWorkflow def, Integer revision)
      The same count for one revision, which Studio's Deploy asks about the revision it superseded.
    • pageOf

      public MigrationInventory.ParkedRunPage pageOf(MetaWorkflow def, ParkedPosition position, int offset, int limit, String search)
      One page of the runs behind a position, with the total, for the picker. Loaded when the picker opens, since a position's runs are unbounded.
    • runsOf

      public List<ParkedRun> runsOf(MetaWorkflow def, ParkedPosition position)
      Every run behind a position, unpaged.
    • runIdsOf

      public List<Long> runIdsOf(MetaWorkflow def, ParkedPosition position)
      The same rows, as ids alone, without the label lookup.
    • planOf

      public WorkflowPlan planOf(MetaWorkflow def, Integer revision)
      The graph a revision holds, or the live definition for the unpinned group; null if broken.
    • revisionsOf

      public List<MetaWorkflowRevision> revisionsOf(MetaWorkflow def)
      Every revision this definition has ever had, newest first, for the Target picker.
    • view

      public MigrationView view(MetaWorkflow def, Integer source, Integer target, boolean sourceGiven)
      One opening of the dialog: both pickers and the selected pair's mapping. Apply re-derives the same answer to check a request.
      Parameters:
      source - the revision to list positions for; null picks the newest revision with a backlog
      target - the revision to compile targets from; null picks the current one