## Apache Zeta Components Manual :: Docs For Class ezcWorkflowDatabaseExecution

### WorkflowDatabaseTiein::ezcWorkflowDatabaseExecution

### Class ezcWorkflowDatabaseExecution

Workflow executer that suspends and resumes workflow execution states to and from a database.

Source for this file: /WorkflowDatabaseTiein/src/execution.php

    ezcWorkflowExecution
       |
       --ezcWorkflowDatabaseExecution

Version: | //autogen//

### Member Variables

protected ezcDbHandler | `$db` ezcDbHandler instance to be used.
protected boolean | `$loaded = false` Flag that indicates whether the execution has been loaded.
protected array(string=>mixed) | `$properties = array( 'definitionStorage' => null, 'workflow' => null, 'options' => null )` Container to hold the properties

### Inherited Member Variables

From ezcWorkflowExecution
protected | `ezcWorkflowExecution::$activatedNodes`
protected | `ezcWorkflowExecution::$cancelled`
protected | `ezcWorkflowExecution::$ended`
protected | `ezcWorkflowExecution::$id`
protected | `ezcWorkflowExecution::$nextThreadId`
protected | `ezcWorkflowExecution::$numActivatedEndNodes`
protected | `ezcWorkflowExecution::$numActivatedNodes`
protected | `ezcWorkflowExecution::$plugins`
protected | `ezcWorkflowExecution::$resumed`
protected | `ezcWorkflowExecution::$suspended`
protected | `ezcWorkflowExecution::$threads`
protected | `ezcWorkflowExecution::$variables`
protected | `ezcWorkflowExecution::$waitingFor`

### Method Summary

public ezcWorkflowDatabaseExecution | `__construct( $db , [ $executionId = null] )` Construct a new database execution.
protected void | `cleanupTable( $tableName )` Cleanup execution / execution_state tables.
protected void | `doEnd( )` End workflow execution.
protected ezcWorkflowExecution | `doGetSubExecution( [ $id = null] )` Returns a new execution object for a sub workflow.
protected void | `doResume( )` Resume workflow execution.
protected void | `doStart( $parentId )` Start workflow execution.
protected void | `doSuspend( )` Suspend workflow execution.
protected void | `loadExecution( $executionId )` Load execution state.

### Inherited Methods

From ezcWorkflowExecution
public bool | `ezcWorkflowExecution::addListener()` Adds a listener to this execution.
public bool | `ezcWorkflowExecution::addPlugin()` Adds a plugin to this execution.
public void | `ezcWorkflowExecution::cancel()` Cancels workflow execution with the node $endNode.
protected abstract void | `ezcWorkflowExecution::doEnd()` Called by end() when workflow execution is ended.
protected abstract ezcWorkflowExecution | `ezcWorkflowExecution::doGetSubExecution()` Returns a new execution object for a sub workflow.
protected abstract void | `ezcWorkflowExecution::doResume()` Called by resume() when workflow execution is resumed.
protected abstract void | `ezcWorkflowExecution::doStart()` Called by start() when workflow execution is initiated.
protected abstract void | `ezcWorkflowExecution::doSuspend()` Called by suspend() when workflow execution is suspended.
public bool | `ezcWorkflowExecution::hasEnded()` Returns true when the workflow execution has ended.
public bool | `ezcWorkflowExecution::isCancelled()` Returns true when the workflow execution has been cancelled.
public bool | `ezcWorkflowExecution::isSuspended()` Returns true when the workflow execution has been suspended.
protected void | `ezcWorkflowExecution::loadFromVariableHandlers()` Loads data from variable handlers and merge it with the current execution data.
public bool | `ezcWorkflowExecution::removeListener()` Removes a listener from this execution.
public bool | `ezcWorkflowExecution::removePlugin()` Removes a plugin from this execution.
public void | `ezcWorkflowExecution::resume()` Resumes workflow execution of a suspended workflow.
protected void | `ezcWorkflowExecution::saveToVariableHandlers()` Saves data to execution data handlers.
public mixed | `ezcWorkflowExecution::start()` Starts the execution of the workflow and returns the execution id.

### Methods

#### __construct

ezcWorkflowDatabaseExecution __construct( $db , [int $executionId = null] )

Construct a new database execution.

This constructor is a tie-in.

##### Parameters:

Name | Type | Description
--- | --- | ---
`$db` | ezcDbHandler |
`$executionId` | int |

##### Exceptions:

Type | Description
--- | ---
`ezcWorkflowExecutionException` |

#### cleanupTable

void cleanupTable( string $tableName )

Cleanup execution / execution_state tables.

##### Parameters:

Name | Type | Description
--- | --- | ---
`$tableName` | string |

##### Exceptions:

Type | Description
--- | ---
`ezcDbException` |

#### doEnd

void doEnd( )

End workflow execution.

##### Exceptions:

Type | Description
--- | ---
`ezcDbException` |

##### Redefinition of:

Method | Description
--- | ---
`ezcWorkflowExecution::doEnd()` | Called by end() when workflow execution is ended.

#### doGetSubExecution

ezcWorkflowExecution doGetSubExecution( [int $id = null] )

Returns a new execution object for a sub workflow.

##### Parameters:

Name | Type | Description
--- | --- | ---
`$id` | int |

##### Redefinition of:

Method | Description
--- | ---
`ezcWorkflowExecution::doGetSubExecution()` | Returns a new execution object for a sub workflow.

#### doResume

void doResume( )

Resume workflow execution.

##### Exceptions:

Type | Description
--- | ---
`ezcDbException` |

##### Redefinition of:

Method | Description
--- | ---
`ezcWorkflowExecution::doResume()` | Called by resume() when workflow execution is resumed.

#### doStart

void doStart( int $parentId )

Start workflow execution.

##### Parameters:

Name | Type | Description
--- | --- | ---
`$parentId` | int |

##### Exceptions:

Type | Description
--- | ---
`ezcDbException` |

##### Redefinition of:

Method | Description
--- | ---
`ezcWorkflowExecution::doStart()` | Called by start() when workflow execution is initiated.

#### doSuspend

void doSuspend( )

Suspend workflow execution.

##### Exceptions:

Type | Description
--- | ---
`ezcDbException` |

##### Redefinition of:

Method | Description
--- | ---
`ezcWorkflowExecution::doSuspend()` | Called by suspend() when workflow execution is suspended.

#### loadExecution

void loadExecution( int $executionId )

Load execution state.

##### Parameters:

Name | Type | Description
--- | --- | ---
`$executionId` | int | ID of the execution to load.

##### Exceptions:

Type | Description
--- | ---
`ezcWorkflowExecutionException` |

Documentation generated by phpDocumentor 1.4.3