Changes between Version 14 and Version 15 of BluePrint/WorkflowSupport


Ignore:
Timestamp:
08/10/13 20:16:03 (12 years ago)
Author:
hardik juneja
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BluePrint/WorkflowSupport

    v14 v15  
    9999* All configuration will be placed in private/template/<module-name>/default
    100100* The configuration pattern  is going to be very easy to define a configuration pattern first one need to import S3WorkflowNode class
    101 * Each node will be defined something like  S3WorkflowNode("status name").handle("req","req","create")
    102 * Here {{{.handle("req","req","create")}}} will contain the action that will update the current node's status i.e only after clicking on this particular action user will be able to achieve the next node.
    103 * Developers have full freedom to two handle per node, i.e two action can achieve next node. Eg.
    104 {{{
    105     N("create incident").handle("event", "incident","create").handle("req","req","create")
    106 }}}
    107 
     101* Each node will be defined something like  N().handle(status = "status name", resource = "org_orgnisation", args = "create")
     102* Here {{{.handle(status = "status name",args = "create", resource = "org_orgnisation")}}} will contain the action that will update the current node's status i.e only after clicking on this particular action user will be able to achieve the next node.
     103* All option that handle can take for now are -
     104        * '''status''' - status of the node
     105        * '''resource''' - node action S3resource
     106        * '''args''' - node action args
     107        * '''http''' - http method for the action
    108108* And full workflow can be defined like
    109109{{{
    110110class S3WorkflowConfig(object):
    111111
    112     def eventmanagemant(self):
    113         N = S3Workflow().node
    114         Exit = S3ExitNode
    115         return N("create incident").handle("event", "incident") & \
    116                ( N("create events ").handle("event", "event", "create") | \
    117                  N("create project").handle("project", "project","create") )& \
    118                 N("create volunteer").handle("vol", "volunteer","create") & Exit())
     112    def orgmanagement(self):
     113        N = S3Workflow
     114        Exit = S3WorkflowExitNode
     115        s3db = current.s3db
     116
     117        return N().handle(resource = "org_organisation", args = "create", status = "add organisation get", http = "GET") & \
     118               N().handle(resource = "org_organisation", args = "create", status = "add organisation post", http = "POST") & \
     119               (N().handle(resource = "org_office", args = [1,"update"], status = "add office") | \
     120               N().handle(resource = "org_facility", args = "create", status = "add facility") )& \
     121               N().handle(resource = "hrm_human_resource", args = "create", status = "add staff")  &  Exit()
     122
     123
    119124                                                         
    120125}}}
     
    126131{{{
    127132
    128 N("create incident").handle("event","incident",prep,postp)
     133N().handle(status = "create incident", prep, postp)
    129134}}}
    130 
    131135=== Technologies ===
    132136== Implementation ==