Menu

## SeedDMS_Core_Workflow_State
in package

inc.ClassWorkflow.php : 451

Class to represent a workflow state 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
$_documentstatus : int
$_id : int
$_maxtime : int
$_name : string
$_precondfunc : int

#### Methods

__construct() : mixed
  SeedDMS_Core_Workflow_State constructor.
getDocumentStatus() : int
  Get the document status which is set when this state is reached
getID() : int
getMaxTime() : int
getName() : string
getPreCondFunc() : int
getTransitions() : array<string|int, SeedDMS_Core_Workflow_Transition>|bool
  Return workflow transitions the status is being used in
isUsed() : bool
  Check if workflow state is currently used by any workflow transition
remove() : bool
  Remove the workflow state
setDMS() : mixed
setDocumentStatus() : bool
setMaxTime() : bool
setName() : bool
setPreCondFunc() : bool

### Properties

#### $_dms

inc.ClassWorkflow.php : 492
`protected SeedDMS_Core_DMS $_dms`

reference to the dms instance this attribute belongs to

##### Tags

access

  protected

#### $_documentstatus

inc.ClassWorkflow.php : 485
`protected int $_documentstatus`

matching documentstatus when this state is reached

##### Tags

access

  protected

#### $_id

inc.ClassWorkflow.php : 457
`protected int $_id`

id of workflow state

##### Tags

access

  protected

#### $_maxtime

inc.ClassWorkflow.php : 471
`protected int $_maxtime`

maximum of seconds allowed in this state

##### Tags

access

  protected

#### $_name

inc.ClassWorkflow.php : 464
`protected string $_name`

name of the workflow state

##### Tags

access

  protected

#### $_precondfunc

inc.ClassWorkflow.php : 478
`protected int $_precondfunc`

maximum of seconds allowed in this state

##### Tags

access

  protected

### Methods

#### __construct()

inc.ClassWorkflow.php : 502

SeedDMS_Core_Workflow_State constructor.

`public __construct( $id, $name, $maxtime, $precondfunc, $documentstatus) : mixed`

##### Parameters

$id :
$name :
$maxtime :
$precondfunc :
$documentstatus :

#### getDocumentStatus()

inc.ClassWorkflow.php : 598

Get the document status which is set when this state is reached

`public getDocumentStatus() : int`

The document status uses the define states S_REJECTED and S_RELEASED Only those two states will update the document status

##### Return values

int —

document status

#### getID()

inc.ClassWorkflow.php : 521
`public getID() : int`

##### Return values

int

#### getMaxTime()

inc.ClassWorkflow.php : 548
`public getMaxTime() : int`

##### Return values

int —

maximum

#### getName()

inc.ClassWorkflow.php : 526
`public getName() : string`

##### Return values

string

#### getPreCondFunc()

inc.ClassWorkflow.php : 570
`public getPreCondFunc() : int`

##### Return values

int —

maximum

#### getTransitions()

inc.ClassWorkflow.php : 638

Return workflow transitions the status is being used in

`public getTransitions() : array<string|int, SeedDMS_Core_Workflow_Transition>|bool`

##### Return values

array<string|int, SeedDMS_Core_Workflow_Transition>|bool —

array of workflow transitions or false in case of an error

#### isUsed()

inc.ClassWorkflow.php : 622

Check if workflow state is currently used by any workflow transition

`public isUsed() : bool`

##### Return values

bool —

true if workflow is used, otherwise false

#### remove()

inc.ClassWorkflow.php : 663

Remove the workflow state

`public remove() : bool`

##### Return values

bool —

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

#### setDMS()

inc.ClassWorkflow.php : 514
`public setDMS( $dms) : mixed`

##### Parameters

$dms :

#### setDocumentStatus()

inc.ClassWorkflow.php : 604
`public setDocumentStatus( $docstatus) : bool`

##### Parameters

$docstatus :

##### Return values

bool

#### setMaxTime()

inc.ClassWorkflow.php : 554
`public setMaxTime( $maxtime) : bool`

##### Parameters

$maxtime :

##### Return values

bool

#### setName()

inc.ClassWorkflow.php : 532
`public setName(string $newName) : bool`

##### Parameters

$newName : string

##### Return values

bool

#### setPreCondFunc()

inc.ClassWorkflow.php : 576
`public setPreCondFunc( $precondfunc) : bool`

##### Parameters

$precondfunc :

##### Return values

bool

## Search results