Changes between Version 16 and Version 17 of BluePrint/WorkflowSupport


Ignore:
Timestamp:
08/27/13 20:51:08 (8 years ago)
Author:
hardik juneja
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BluePrint/WorkflowSupport

    v16 v17  
    100100* All configuration will be placed in private/template/<module-name>/default
    101101* The configuration pattern  is going to be very easy to define a configuration pattern first one need to import S3WorkflowNode class
    102 * Each node will be defined something like  N().handle(status = "status name", resource = "org_orgnisation", args = "create")
    103 * 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.
     102* Each node will be defined something like  N("status name").handle(next_status = "next status name", controller = "org", function = "organization", args = "create")
     103* Here {{{.handle(next_status = "status name",args = "create", controller = "org", function = "organization")}}} will contain the action that will update the current node's status to the next sataus i.e only after clicking on this particular action user will be able to achieve the next node.
    104104* All option that handle can take for now are -
    105         * '''status''' - status of the node
    106         * '''resource''' - node action S3resource
     105        * '''status''' - current status of the node
     106        * '''controller''' - controller
     107        * '''function''' - function
    107108        * '''args''' - node action args
    108109        * '''http''' - http method for the action
     110        * '''next_status''' - next status that the node should achieve
    109111* And full workflow can be defined like
    110112{{{
     
    115117        Exit = S3WorkflowExitNode
    116118        s3db = current.s3db
     119       
     120        return N("new").handle(controller = "org",
     121                               function = "organisation",
     122                               args = "create",
     123                               next_status = "add organisation get",
     124                               http = "GET") & \
     125               N("add organisation get").handle(controller = "org",
     126                                                function = "organisation",
     127                                                args = "create",
     128                                                next_status = "add organisation post",
     129                                                http = "POST") & \
     130               N("add organisation post").handle(controller = "org",
     131                                                 function = "office",
     132                                                 args = [1,"update"],
     133                                                 next_status = "add office")\
     134                                         .handle(controller = "org",
     135                                                 function = "facility",
     136                                                 next_status = "add facility",
     137                                                 postp = postp) & \
     138               ( N("add office").handle(controller = "hrm",
     139                                        function = "staff",
     140                                        args = "create",
     141                                        next_status = "add staff") | \
     142                 N("add facility").handle(controller = "hrm",
     143                                          function = "staff",
     144                                          args = "create",
     145                                          next_status = "add staff") ) & \
     146               Exit()
    117147
    118         return N().handle(resource = "org_organisation", args = "create", status = "add organisation get", http = "GET") & \
    119                N().handle(resource = "org_organisation", args = "create", status = "add organisation post", http = "POST") & \
    120                (N().handle(resource = "org_office", args = [1,"update"], status = "add office") | \
    121                N().handle(resource = "org_facility", args = "create", status = "add facility") )& \
    122                N().handle(resource = "hrm_human_resource", args = "create", status = "add staff")  &  Exit()
     148
    123149
    124150