class EmptyWorkflow extends Workflow (View source)

This is the final workflow that fires any time a workflow request is triggered. It HAS to be final because it takes care of approving the workflow request object. If a previous workflow actually exists and fires, this workflow is skipped because the previous workflow cancels it.

Class EmptyWorkflow

Properties

$error from  ConcreteObject
protected int $wfID

The workflow ID.

from  Workflow
protected string[] $allowedTasks

The list of allowed tasks.

from  Workflow
protected string[] $restrictedToPermissionKeyHandles

The list of permission key handles that this workflow can be attached to.

from  Workflow

Methods

loadError($error)

No description

isError()

No description

getError()

No description

setPropertiesFromArray($arr)

No description

static 
camelcase($file)

No description

static 
uncamelcase($string)

No description

int
getWorkflowID()

Get the workflow ID.

from  Workflow
string
getWorkflowName()

Get the workflow (English) name.

from  Workflow
string
getWorkflowDisplayName(string $format = 'html')

Get the display name for this workflow (localized and escaped accordingly to $format).

from  Workflow
string[]
getAllowedTasks()

Get the list of allowed tasks.

from  Workflow
Type|null
getWorkflowTypeObject()

Get the workflow type associated to this workflow.

from  Workflow
getRestrictedToPermissionKeyHandles()

Get the list of permission key handles that this workflow can be attached to.

from  Workflow
from  Workflow
from  Workflow
delete()

Delete this workflow and all its associated progresses.

from  Workflow
int|null
getWorkflowProgressCurrentStatusNum(Progress $wp)

By default the basic workflow just passes the status num from the request we do this so that we can order things by most important, etc.

from  Workflow
static Workflow[]
getList()

Get the list of installed workflows, sorted by the workflow display name.

from  Workflow
static Workflow[]
getListByPackage(Package $pkg)

Get the list of workflows installed by a package, sorted by the workflow display name.

from  Workflow
static Workflow
add(Type $wt, string $name, Package $pkg = null)

Create a new workflow.

from  Workflow
static Workflow|null
getByID(int $wfID)

Get a workflow given its ID.

from  Workflow
static Workflow|null
getByName(string $wfName)

Get a workflow given its (English) name.

from  Workflow
updateName(string $wfName)

Change the (English) name of this workflow.

from  Workflow
start(Progress $wp)

Start the workflow.

bool
canApproveWorkflow()

Check if the currently logged-in user can approve this workflow.

getWorkflowProgressApprovalUsers(Progress $wp)

Get the list of users that can approve an operation.

Action[]
getWorkflowProgressActions(Progress $wp)

Get the list of actions that can be performed against an operation.

string|false|null
getWorkflowProgressCurrentComment(Progress $wp)

Get the comments about an operation.

string
getWorkflowProgressStatusDescription(Progress $wp)

Get the description of the status of an operation.

bool
canApproveWorkflowProgressObject(Progress $wp)

Check if the currently logged-in user can approve an operation.

updateDetails(array $vars)

Update the workflow details with data (usually received via POST).

loadDetails()

Load the details of this workflow (usually called right after this instance has been created).

bool
getPermissionAccessObject()

No description

from  Workflow
bool
validateTrigger(Request $req)

Check if a workflow request is valid.

from  Workflow
load(int $wfID)

Load the workflow data from the database row.

from  Workflow

Details

loadError($error)

No description

Parameters

$error

isError()

No description

getError()

No description

setPropertiesFromArray($arr)

No description

Parameters

$arr

static camelcase($file)

No description

Parameters

$file

static uncamelcase($string)

No description

Parameters

$string

int getWorkflowID()

Get the workflow ID.

Return Value

int

string getWorkflowName()

Get the workflow (English) name.

Return Value

string

string getWorkflowDisplayName(string $format = 'html')

Get the display name for this workflow (localized and escaped accordingly to $format).

Parameters

string $format

= 'html' Escape the result in html format (if $format is 'html'). If $format is 'text' or any other value, the display name won't be escaped.

Return Value

string

string[] getAllowedTasks()

Get the list of allowed tasks.

Return Value

string[]

Type|null getWorkflowTypeObject()

Get the workflow type associated to this workflow.

Return Value

Type|null

getRestrictedToPermissionKeyHandles()

Get the list of permission key handles that this workflow can be attached to.

getPermissionResponseClassName()

getPermissionAssignmentClassName()

getPermissionObjectKeyCategoryHandle()

getPermissionObjectIdentifier()

delete()

Delete this workflow and all its associated progresses.

int|null getWorkflowProgressCurrentStatusNum(Progress $wp)

By default the basic workflow just passes the status num from the request we do this so that we can order things by most important, etc.

..

Parameters

Progress $wp

Return Value

int|null

static Workflow[] getList()

Get the list of installed workflows, sorted by the workflow display name.

Return Value

Workflow[]

static Workflow[] getListByPackage(Package $pkg)

Get the list of workflows installed by a package, sorted by the workflow display name.

Parameters

Package $pkg

Return Value

Workflow[]

static Workflow add(Type $wt, string $name, Package $pkg = null)

Create a new workflow.

Parameters

Type $wt

The workflow type

string $name

the (English) name of the workflow

Package $pkg

the package that's creating the new workflow

Return Value

Workflow

static Workflow|null getByID(int $wfID)

Get a workflow given its ID.

Parameters

int $wfID

the ID of the workflow

Return Value

Workflow|null

static Workflow|null getByName(string $wfName)

Get a workflow given its (English) name.

Parameters

string $wfName

Return Value

Workflow|null

updateName(string $wfName)

Change the (English) name of this workflow.

Parameters

string $wfName

Response|SkippedResponse|null start(Progress $wp)

Start the workflow.

Parameters

Progress $wp

Return Value

Response|SkippedResponse|null

bool canApproveWorkflow()

Check if the currently logged-in user can approve this workflow.

Return Value

bool

UserInfo[] getWorkflowProgressApprovalUsers(Progress $wp)

Get the list of users that can approve an operation.

Parameters

Progress $wp

Return Value

UserInfo[]

Action[] getWorkflowProgressActions(Progress $wp)

Get the list of actions that can be performed against an operation.

Parameters

Progress $wp

Return Value

Action[]

string|false|null getWorkflowProgressCurrentComment(Progress $wp)

Get the comments about an operation.

Parameters

Progress $wp

Return Value

string|false|null

string getWorkflowProgressStatusDescription(Progress $wp)

Get the description of the status of an operation.

Parameters

Progress $wp

Return Value

string

bool canApproveWorkflowProgressObject(Progress $wp)

Check if the currently logged-in user can approve an operation.

Parameters

Progress $wp

Return Value

bool

updateDetails(array $vars)

Update the workflow details with data (usually received via POST).

Parameters

array $vars

loadDetails()

Load the details of this workflow (usually called right after this instance has been created).

bool getPermissionAccessObject()

No description

Return Value

bool

bool validateTrigger(Request $req)

Check if a workflow request is valid.

Parameters

Request $req

Return Value

bool

protected load(int $wfID)

Load the workflow data from the database row.

Parameters

int $wfID