WorkflowUtil Class Reference

Static Public Member Functions

static renderNonEditableTypeStringContent ($type)
static renderNonEditableModuleStringContent ($moduleClassName)
static resolveDataAndLabelsForTimeTriggerAvailableAttributes ($moduleClassName, $modelClassName, $workflowType)
static renderDataAndLabelsFromAdaptedAttributes ($attributes)
static getModelsFilteredByInferredModel ($modelClassName, $inferredRelationName, $inferredModelItemId)
static getInferredModelsByAtrributeAndModel ($relation, $model)
static resolveDerivedModels (RedBeanModel $model, $relation)
static handleProcessingException (Exception $exception, $category)

Detailed Description

Helper class for working with Workflow objects

Definition at line 40 of file WorkflowUtil.php.


Member Function Documentation

static renderNonEditableTypeStringContent ( type  )  [static]
Parameters:
$type 
Returns:
null | string

Definition at line 46 of file WorkflowUtil.php.

static renderNonEditableModuleStringContent ( moduleClassName  )  [static]
Parameters:
$moduleClassName 
Returns:
null | string

Definition at line 60 of file WorkflowUtil.php.

static resolveDataAndLabelsForTimeTriggerAvailableAttributes ( moduleClassName,
modelClassName,
workflowType 
) [static]
Parameters:
string $moduleClassName
string $modelClassName
string $workflowType
Returns:
array
Exceptions:
NotSupportedException 

Definition at line 77 of file WorkflowUtil.php.

static renderDataAndLabelsFromAdaptedAttributes ( attributes  )  [static]

Given an array of attributes generated from $modelToWorkflowAdapter->getAttributesForTimeTrigger() return an array indexed by the attribute and the value is the label

Parameters:
array $attributes
Returns:
array

Definition at line 100 of file WorkflowUtil.php.

static getModelsFilteredByInferredModel ( modelClassName,
inferredRelationName,
inferredModelItemId 
) [static]
Parameters:
string $modelClassName
string $inferredRelationName
integer $inferredModelItemId
Returns:
Array of models

Definition at line 117 of file WorkflowUtil.php.

static getInferredModelsByAtrributeAndModel ( relation,
model 
) [static]
Parameters:
string $relation
$model 
Returns:
array of models

Definition at line 142 of file WorkflowUtil.php.

static resolveDerivedModels ( RedBeanModel model,
relation 
) [static]
Parameters:
RedBeanModel $model
string $relation
Returns:
Array of models

Definition at line 169 of file WorkflowUtil.php.

static handleProcessingException ( Exception $  exception,
category 
) [static]

Utilize this method when processing workflow triggers, actions, and alerts. Sometimes an exception could be thrown, but we don't want to stop execution. So we will just throw that exception into the log for now. Some exceptions can just be because an action exists against a model that no longer exists, which can happen if you are dealing with a by-time queue item for example. In the future if we decide we need a better way to handle this type of occurrence, we can alert this method.

Parameters:
Exception exception
string $category

Definition at line 187 of file WorkflowUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Mon Apr 24 07:10:32 2017