C# Class Rock.Workflow.ActionComponent

Base class for components that perform actions for a workflow
Inheritance: Rock.Extension.Component
Datei anzeigen Open project: NewSpring/Rock

Public Methods

Method Description
ActionComponent ( ) : System

Initializes a new instance of the ActionComponent class.

Execute ( RockContext rockContext, WorkflowAction action, Object entity, List &errorMessages ) : System.Boolean

Executes the action.

GetActionAttributeValue ( WorkflowAction action, string key ) : string

Gets the action attribute value.

GetAttributeValue ( string key ) : string

Use GetAttributeValue( WorkflowAction action, string key) instead. Workflow action attribute values are specific to the action instance (rather than global). This method will throw an exception

LoadAttributes ( WorkflowAction action ) : void

Loads the attributes for the action. The attributes are loaded by the framework prior to executing the action, so typically workflow actions do not need to load the attributes

Protected Methods

Method Description
GetAttributeValue ( WorkflowAction action, string key ) : string

Gets the attribute value for the action

GetAttributeValue ( WorkflowAction action, string key, bool checkWorflowAttributeValue ) : string

Gets the attribute value.

GetMergeFields ( WorkflowAction action ) : object>.Dictionary

Resolves the merge fields.

SetWorkflowAttributeValue ( WorkflowAction action, System.Guid guid, string value ) : void

Sets the workflow attribute value.

Method Details

ActionComponent() public method

Initializes a new instance of the ActionComponent class.
public ActionComponent ( ) : System
return System

Execute() public abstract method

Executes the action.
public abstract Execute ( RockContext rockContext, WorkflowAction action, Object entity, List &errorMessages ) : System.Boolean
rockContext Rock.Data.RockContext The rock context.
action WorkflowAction The workflow action.
entity Object The entity.
errorMessages List The error messages.
return System.Boolean

GetActionAttributeValue() public static method

Gets the action attribute value.
public static GetActionAttributeValue ( WorkflowAction action, string key ) : string
action WorkflowAction The action.
key string The key.
return string

GetAttributeValue() protected method

Gets the attribute value for the action
protected GetAttributeValue ( WorkflowAction action, string key ) : string
action WorkflowAction The action.
key string The key.
return string

GetAttributeValue() protected method

Gets the attribute value.
protected GetAttributeValue ( WorkflowAction action, string key, bool checkWorflowAttributeValue ) : string
action WorkflowAction The action.
key string The key.
checkWorflowAttributeValue bool if set to true and the returned value is a guid, check to see if the workflow /// or activity contains an attribute with that guid. This is useful when using the WorkflowTextOrAttribute field types to get the /// actual value or workflow value.
return string

GetAttributeValue() public method

Use GetAttributeValue( WorkflowAction action, string key) instead. Workflow action attribute values are specific to the action instance (rather than global). This method will throw an exception
Workflow Action attributes are saved specific to the current action, which requires that the current action is included in order to load or retrieve values. Use the GetAttributeValue( WorkflowAction action, string key ) method instead.
public GetAttributeValue ( string key ) : string
key string The key.
return string

GetMergeFields() protected method

Resolves the merge fields.
protected GetMergeFields ( WorkflowAction action ) : object>.Dictionary
action WorkflowAction The action.
return object>.Dictionary

LoadAttributes() public method

Loads the attributes for the action. The attributes are loaded by the framework prior to executing the action, so typically workflow actions do not need to load the attributes
public LoadAttributes ( WorkflowAction action ) : void
action WorkflowAction The action.
return void

SetWorkflowAttributeValue() protected method

Sets the workflow attribute value.
protected SetWorkflowAttributeValue ( WorkflowAction action, System.Guid guid, string value ) : void
action WorkflowAction The action.
guid System.Guid The unique identifier.
value string The value.
return void