RulesetWorkflow: Difference between revisions

From Request Tracker Wiki
Jump to navigation Jump to search
m (2 revisions imported)
 
(No difference)

Latest revision as of 15:36, 6 April 2016

_*This is a design document for a work in progress. It describes features that do not exist today and may never exist*_

Text Description

  • The user of OrderRequest queue fill in a numeric "CF", called "Price".
  • On creation, it needs to create following approvals:
  • When all of "M", "P" are resolved (or if there were none to begin with), Create "FinanceApproval".
  • If any approvals above is rejected, reject the original ticket.
  • If "FinanceApproval" is resolved, resolve original ticket.
  • If "FinanceApproval" is rejected, create an approval for "CEOApproval".
  • If "CEOApproval" is resolved, resolve the original ticket.
  • If "CEOApproval" is rejected, reject the original ticket.

ASCII Diagram

       ,----------.      ,---------------------->[DONE]
       |           \    /                           ^
[FLOW]-+-?---->[M]---->[F]                          |
       |        |  /    \                           |
       `-?->[P]-+-'      `-(!)->[C]-----------------'
             |  |                |
             |  |                `-(!)---------->[FAIL]
             |  |                                   ^
             `-(!)----------------------------------'

Objects

Note that "Scrips" are now called "Rules".

(Audrey says that LockRuleset is needed, "to register dependency.")

RuleAction "AquireMyLocks"

FOREACH $Scrip IN $TicketObj->Scrips
  WHERE $Scrip.Action.Type == "TryCreateTicketWithRuleset"
     DO LockRuleset $Scrip.Action.Argument

RuleAction "TryCreateTicketWithRuleset"

DO ReleaseMyLockOnRuleset $Argument
UNLESS RulesetLocked $Argument
    DO CreateTicketWithRuleset $Argument

GlobalRule "AquireLocks"

Queue "OrderRequest"

RuleSet "PurchaseFlow"

RuleSet: "ManagerApproval"

RuleSet: "PresidentApproval"

RuleSet: "FinanceApproval"

RuleSet: "CEOApproval"

Another Text Description

  • I have a MonitoredQueue that sets tickets to "Monitored" if its subject matches /monitored/.
  • I want to have a kind of Ticket that are 'Monitored'.
  • I want all monitored tickets, when they are overdue for 14 days, to:
    • Send notification to manager
    • Mark as stalled
  • I want all monitored tickets, when they are overdue for 28 days, to:
    • Mark as rejected
  • I want to query all tickets that are monitored as such
  • I want to modify 14 => 15 and have it affect all existing tickets that are monitored
  • I want to add a new "overdue for 27 days, add a 'ultimatum' correspondence to it" rule
    • For all monitored tickets.
  • I want to add a new "overdue for 27 days, add a 'ultimatum' correspondence to it" rule
    • For all new monitored tickets.
    • Without affecting existing ones.