Changeset 13446
- Timestamp:
- 11/27/08 20:29:13 (5 years ago)
- Files:
-
- plugins/sfEzcWorkflowPlugin/trunk/README (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfEzcWorkflowPlugin/trunk/README
r13235 r13446 29 29 30 30 * Enable one or more modules in your `settings.yml` 31 32 * For your frontend application: sfEzcWorkflow, sfEzcWorkflowDemo 33 31 34 * For your backend application: sfEzcWorkflowAdmin, sfEzcWorkflowExecutionAdmin 32 35 33 [ php]36 [yml] 34 37 all: 35 38 .settings: 36 enabled_modules: [default, sfEzcWorkflowAdmin, sfEzcWorkflowExecutionAdmin ]39 enabled_modules: [default, sfEzcWorkflowAdmin, sfEzcWorkflowExecutionAdmin, sfEzcWorkflow, sfEzcWorkflowDemo] 37 40 38 41 * Clear you cache … … 55 58 * $configuration['sf_is_secure'] = (boolean) true indicates that a credential is required 56 59 * $configuration['sf_credential'] = (string) requirede credential 60 61 Workflow components 62 ------------------- 63 64 There's a component that you can include in your applications to see the current workflow executions that are suspended and can be resumed by the current user. You just need to add in your template: 65 66 [php] 67 <?php include_component('sfEzcWorkflow', 'waitingExecutions') ?> 68 57 69 58 70 Example … … 132 144 public function executeIndex(sfWebRequest $request) 133 145 { 134 $storage = new sfPropelEzcWorkflowDefinitionStorage(); 135 $workflow = $storage->loadByName('Test_sf'); 136 $execution = new sfPropelEzcWorkflowExecution(); 137 $execution->workflow = $workflow; 146 $execution = sfEzcWorkflowManager::createExecutionByWorkflowByName('Test_sf'); 138 147 $id = $execution->start(); 139 sfEzcWorkflowActionsUtil::doProcessRemainingNodes($execution,$this); 148 sfEzcWorkflowManager::doProcessRemainingNodes($execution,$this); 149 //This code below should never been executed 150 $this->setTemplate('index'); 140 151 } 141 152 … … 146 157 { 147 158 $choice = $request->getParameter('choice')==='true'?true:false; 148 $execution = sfEzcWorkflow ActionsUtil::doWorkflowResume($this->sf_ezc_wf_execution_id, array('choice'=>$choice), $this);159 $execution = sfEzcWorkflowManager::doWorkflowResume($this->sf_ezc_wf_execution_id, array('choice'=>$choice), $this); 149 160 $this->variables = $execution->getVariables(); 150 161 $this->setTemplate('finished'); … … 158 169 { 159 170 $message = $request->getParameter('message'); 160 $execution = sfEzcWorkflow ActionsUtil::doWorkflowResume($this->sf_ezc_wf_execution_id, array('message'=>$message),$this);171 $execution = sfEzcWorkflowManager::doWorkflowResume($this->sf_ezc_wf_execution_id, array('message'=>$message),$this); 161 172 $this->variables = $execution->getVariables()?$execution->getVariables():'nada'; 162 173 $this->setTemplate('finished'); … … 237 248 * Store the workflow definition on the database. 238 249 * Go to http://localhost/sfEzcWorkflowAdmin 250 251  252 239 253 * In the form type the name 'Test_sf' and add the xml file 240 254 * Press the button 'Create workflow from xml definition' 241 255 242 256 * To execute the workflow just go to http://localhost/test 257 * Also there's a demo application, you just need to activate the module sfEzcWorkflowDemo to access it 243 258 244 259 * You can monitor the current executions on http://localhost/sfEzcWorkflowExecutionAdmin 260 261  262 245 263 246 264 TODO … … 250 268 * Create a node for resume and process workflow from CLI 251 269 * Create workflow monitoring components 270 * Generate a doctrine implementation of ezcWorkflowExecution and ezcWorkflowDefinitionStorage