Class MetaWorkflowController

java.lang.Object
com.axelor.meta.web.MetaWorkflowController

public class MetaWorkflowController extends Object
  • Constructor Details

    • MetaWorkflowController

      public MetaWorkflowController()
  • Method Details

    • emailTemplates

      public void emailTemplates(ActionRequest request, ActionResponse response)
    • retryState

      public void retryState(ActionRequest request, ActionResponse response)
      Reset an errored time-trigger state to waiting so the scheduler picks it up on the next poll. Only error rows qualify — they are parked (never re-polled) precisely so an operator decides when to retry.
    • retry

      public void retry(MetaWorkflowState state)
      The reset itself: due now, claim columns cleared. Refuses rows not in error.
    • parkedPositions

      public void parkedPositions(ActionRequest request, ActionResponse response)
      What is parked on this definition and where it may go: everything one opening of the mover needs, in one round trip.

      Both revision pickers come back filled, so working through a multi-revision backlog is a matter of switching Source, not of another call per pair. Absent sourceRevision means "the default" -- the most recent revision that actually has a backlog; absent targetRevision means the definition's current one. A source explicitly sent as null is the unpinned group, which is why it is told apart from an absent one rather than coalesced.

    • parkedRuns

      public void parkedRuns(ActionRequest request, ActionResponse response)
      The runs behind one position, for its picker.

      Separate from parkedPositions(com.axelor.rpc.ActionRequest, com.axelor.rpc.ActionResponse) on purpose: most rows of a real backlog never have their popup opened, and a position with several thousand runs behind it should not make every one of their identities part of rendering a count.

    • prepareForm

      public void prepareForm(ActionRequest request, ActionResponse response)
      The workflow form as it opens: whether the mover is worth offering, and over how much.

      Decided here rather than by a showIf, because no expression on a form can ask what is parked across every revision of a definition -- and the same call that answers it is the one that puts the number on the button, so the two cannot disagree.

      Any parked position at all, the current revision included. Not "any revision other than the current one": a run can be moved to another node of its own revision, and unsticking one parked on the current graph is the likeliest reason to open this at all.

    • openMover

      public void openMover(ActionRequest request, ActionResponse response)
      Open the mover on this definition. The dialog computes its own source and target defaults.
    • applyMigration

      public void applyMigration(ActionRequest request, ActionResponse response)
      Apply the operator's rows, and report what happened.

      The request is a claim, never a permission: every row is re-checked against a freshly derived inventory inside the service, because what the dialog offered was true when it was drawn and a backlog moves underneath a dialog left open.