Documentation

SeedDMS_Core_Workflow
in package

Class to represent an workflow in the document management system

Tags
category

DMS

author

Markus Westphal, Malcolm Cowe, Uwe Steinmann uwe@steinmann.cx

copyright

Copyright (C) 2012-2024 Uwe Steinmann

version

Release: @package_version@

Table of Contents

Properties

$_dms  : SeedDMS_Core_DMS
$_id  : int
$_initstate  : SeedDMS_Core_Workflow_State
$_layoutdata  : data
$_name  : string
$_transitions  : array<string|int, SeedDMS_Core_Workflow_Transition>

Methods

__construct()  : mixed
SeedDMS_Core_Workflow constructor.
addTransition()  : SeedDMS_Core_Workflow_Transition|bool
Add new transition to workflow
checkForCycles()  : bool
Check if workflow contains cycles
getID()  : int
getInitState()  : SeedDMS_Core_Workflow_State
getLayoutData()  : string
getName()  : string
getNextTransitions()  : array<string|int, SeedDMS_Core_Workflow_Transition>|bool
Get the transitions that can be triggered while being in the given state
getPreviousTransitions()  : array<string|int, SeedDMS_Core_Workflow_Transition>|bool
Get the transitions that lead to the given state
getStates()  : array<string|int, mixed>
Get all states this workflow at some point may reach
getTransition()  : bool|SeedDMS_Core_Workflow_Transition
Get the transition by its id
getTransitions()  : array<string|int, SeedDMS_Core_Workflow_Transition>|bool
getTransitionsByStates()  : array<string|int, SeedDMS_Core_Workflow_Transition>|bool
Get all transitions from one state into another state
isUsed()  : bool
Check if workflow is currently used by any document
remove()  : bool
Remove the workflow and all its transitions Do not remove actions and states of the workflow
removeTransition()  : bool
Remove a transition from a workflow Deprecated! User SeedDMS_Core_Workflow_Transition::remove() instead.
setDMS()  : mixed
setInitState()  : bool
setLayoutData()  : mixed
setName()  : bool
penetrate()  : array<string|int, SeedDMS_Core_Workflow_State>|bool

Properties

$_layoutdata

public data $_layoutdata

for rendering graph

Tags
access

protected

Methods

addTransition()

Add new transition to workflow

public addTransition(SeedDMS_Core_Workflow_State $state, SeedDMS_Core_Workflow_Action $action, SeedDMS_Core_Workflow_State $nextstate, array<string|int, SeedDMS_Core_User$users, array<string|int, SeedDMS_Core_Group$groups) : SeedDMS_Core_Workflow_Transition|bool
Parameters
$state : SeedDMS_Core_Workflow_State
$action : SeedDMS_Core_Workflow_Action
$nextstate : SeedDMS_Core_Workflow_State
$users : array<string|int, SeedDMS_Core_User>
$groups : array<string|int, SeedDMS_Core_Group>
Return values
SeedDMS_Core_Workflow_Transition|bool

instance of new transition

checkForCycles()

Check if workflow contains cycles

public checkForCycles() : bool
Return values
bool

list of states if workflow contains cycles, otherwise false

getStates()

Get all states this workflow at some point may reach

public getStates() : array<string|int, mixed>

It basically iterates through all transistions and makes a unique list of the start and end state.

Return values
array<string|int, mixed>

list of states

isUsed()

Check if workflow is currently used by any document

public isUsed() : bool
Return values
bool

true if workflow is used, otherwise false

remove()

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

public remove() : bool
Return values
bool

true on success or false in case of an error false is also returned if the workflow is currently in use

setLayoutData()

public setLayoutData(mixed $newdata) : mixed
Parameters
$newdata : mixed

setName()

public setName( $newName) : bool
Parameters
$newName :
Return values
bool

        
On this page

Search results