Development

Changeset 13446

You must first sign up to be able to contribute.

Changeset 13446

Show
Ignore:
Timestamp:
11/27/08 20:29:13 (5 years ago)
Author:
cinxgler
Message:

Documentation updated

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfEzcWorkflowPlugin/trunk/README

    r13235 r13446  
    2929 
    3030  * Enable one or more modules in your `settings.yml` 
     31   
     32    * For your frontend application: sfEzcWorkflow, sfEzcWorkflowDemo 
     33     
    3134    * For your backend application:  sfEzcWorkflowAdmin, sfEzcWorkflowExecutionAdmin 
    3235 
    33             [php
     36            [yml
    3437            all: 
    3538              .settings: 
    36                 enabled_modules:      [default, sfEzcWorkflowAdmin, sfEzcWorkflowExecutionAdmin
     39                enabled_modules:      [default, sfEzcWorkflowAdmin, sfEzcWorkflowExecutionAdmin, sfEzcWorkflow, sfEzcWorkflowDemo
    3740 
    3841  * Clear you cache 
     
    5558  * $configuration['sf_is_secure'] = (boolean) true indicates that a credential is required 
    5659  * $configuration['sf_credential'] = (string) requirede credential 
     60 
     61Workflow components 
     62------------------- 
     63 
     64There'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 
    5769 
    5870Example 
     
    132144          public function executeIndex(sfWebRequest $request) 
    133145          { 
    134             $storage = new sfPropelEzcWorkflowDefinitionStorage(); 
    135             $workflow = $storage->loadByName('Test_sf'); 
    136             $execution = new sfPropelEzcWorkflowExecution(); 
    137             $execution->workflow = $workflow; 
     146            $execution = sfEzcWorkflowManager::createExecutionByWorkflowByName('Test_sf'); 
    138147            $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'); 
    140151          } 
    141152           
     
    146157            { 
    147158              $choice = $request->getParameter('choice')==='true'?true:false; 
    148               $execution = sfEzcWorkflowActionsUtil::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); 
    149160              $this->variables = $execution->getVariables(); 
    150161              $this->setTemplate('finished'); 
     
    158169            { 
    159170                $message = $request->getParameter('message'); 
    160                 $execution = sfEzcWorkflowActionsUtil::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); 
    161172                $this->variables = $execution->getVariables()?$execution->getVariables():'nada'; 
    162173                $this->setTemplate('finished'); 
     
    237248  * Store the workflow definition on the database. 
    238249    * Go to http://localhost/sfEzcWorkflowAdmin 
     250     
     251      ![sfEzcWorkflowAdmin screenshot](http://svn.symfony-project.com/plugins/sfEzcWorkflowPlugin/images/sfEzcWorkflowAdmin.png "sfEzcWorkflowAdmin screenshot") 
     252     
    239253    * In the form type the name 'Test_sf' and add the xml file 
    240254    * Press the button 'Create workflow from xml definition' 
    241255     
    242256  * 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 
    243258 
    244259  * You can monitor the current executions on http://localhost/sfEzcWorkflowExecutionAdmin 
     260   
     261    ![sfEzcWorkflowExecutionAdmin screenshot](http://svn.symfony-project.com/plugins/sfEzcWorkflowPlugin/images/sfEzcWorkflowExecutionAdmin.png "sfEzcWorkflowExecutionAdmin screenshot") 
     262 
    245263 
    246264TODO 
     
    250268  * Create a node for resume and process workflow from CLI 
    251269  * Create workflow monitoring components 
     270  * Generate a doctrine implementation of ezcWorkflowExecution and ezcWorkflowDefinitionStorage