\SeedDMS_Core_Workflow

Class to represent an workflow in the document management system

Summary

Methods
Properties
Constants
SeedDMS_Core_Workflow()
setDMS()
getID()
getName()
setName()
getInitState()
setInitState()
getTransitions()
getStates()
getTransition()
getNextTransitions()
getPreviousTransitions()
getTransitionsByStates()
removeTransition()
addTransition()
isUsed()
remove()
$_id
$_name
$_initstate
$_transitions
$_dms
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$_id

$_id : integer

Type

integer — id of workflow

$_name

$_name : \name

Type

\name — of the workflow

$_initstate

$_initstate : \initial

Type

\initial — state of the workflow

$_transitions

$_transitions : \name

Type

\name — of the workflow state

$_dms

$_dms : object

Type

object — reference to the dms instance this attribute belongs to

Methods

SeedDMS_Core_Workflow()

SeedDMS_Core_Workflow( $id,  $name,  $initstate)

Parameters

$id
$name
$initstate

setDMS()

setDMS( $dms)

Parameters

$dms

getID()

getID()

getName()

getName()

setName()

setName( $newName)

Parameters

$newName

getInitState()

getInitState()

setInitState()

setInitState( $state)

Parameters

$state

getTransitions()

getTransitions()

getStates()

getStates()

getTransition()

getTransition(integer $id)

Get the transition by its id

Parameters

integer $id

id of transition

getNextTransitions()

getNextTransitions(object $state)

Get the transitions that can be triggered while being in the given state

Parameters

object $state

current workflow state

getPreviousTransitions()

getPreviousTransitions(object $state)

Get the transitions that lead to the given state

Parameters

object $state

current workflow state

getTransitionsByStates()

getTransitionsByStates(object $state, object $nextstate)

Get all transitions from one state into another state

Parameters

object $state

state to start from

object $nextstate

state after transition

removeTransition()

removeTransition(object $transition) : boolean

Remove a transition from a workflow Deprecated! User SeedDMS_Core_Workflow_Transition::remove() instead.

Parameters

object $transition

Returns

boolean —

true if no error occured, otherwise false

addTransition()

addTransition(object $state, object $action, object $nextstate, array $users, array $groups) : object

Add new transition to workflow

Parameters

object $state
object $action
object $nextstate
array $users
array $groups

Returns

object —

instance of new transition

isUsed()

isUsed() : boolean

Check if workflow is currently used by any document

Returns

boolean —

true if workflow is used, otherwise false

remove()

remove() : boolean

Remove the workflow and all its transitions Do not remove actions and states of the workflow

Returns

boolean —

true on success or false in case of an error

    false is also returned if the workflow is currently in use