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 |
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 | |