Class ProcessActivity
Represents a process activity.
Inheritance
Implements
Inherited Members
Namespace: Terrasoft.Core.Process
Assembly: Terrasoft.Core.dll
Syntax
public class ProcessActivity : ProcessFlowElement, IProcessDataSerializable, IHandler<ChangeProcessElementPerformerCommand>
Constructors
ProcessActivity()
Creates a new instance of the ProcessActivity type.
Declaration
protected ProcessActivity()
ProcessActivity(UserConnection)
Creates a new instance of the ProcessActivity type.
Declaration
public ProcessActivity(UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | User connection. |
Properties
Compressor
Declaration
public CompressionUtilities Compressor { get; }
Property Value
Type | Description |
---|---|
CompressionUtilities |
IsShownExecutionPage
Gets or sets value that determines whether it can show execution page.
Declaration
public virtual bool IsShownExecutionPage { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Owner
Gets or sets the owner of the current element.
Declaration
public override Process Owner { get; set; }
Property Value
Type | Description |
---|---|
Process |
Overrides
OwnerUId
Gets or sets the unique identifier of owner process instance.
Declaration
public virtual string OwnerUId { get; set; }
Property Value
Type | Description |
---|---|
System.String | The unique identifier of owner process instance. |
PerformerAssignmentOptions
Performer assignment options.
Declaration
public PerformerAssignmentOptions PerformerAssignmentOptions { get; set; }
Property Value
Type | Description |
---|---|
PerformerAssignmentOptions |
ProcessLane
Gets or sets instance of the ProcessFlowElement type.
Declaration
public virtual ProcessLane ProcessLane { get; set; }
Property Value
Type | Description |
---|---|
ProcessLane |
ProcessNotifier
Gets the notifier instance of the current process element.
Declaration
protected virtual IProcessNotifier ProcessNotifier { get; }
Property Value
Type | Description |
---|---|
IProcessNotifier |
ProcessParameterStore
Gets instance that implements the IProcessParameterStore interface.
Declaration
protected IProcessParameterStore ProcessParameterStore { get; set; }
Property Value
Type | Description |
---|---|
IProcessParameterStore |
Schema
Gets or sets the schema.
Declaration
public virtual Schema Schema { get; set; }
Property Value
Type | Description |
---|---|
Schema | The schema. |
SchemaManager
Gets instance that implements the ISchemaManager interface.
Declaration
public virtual ISchemaManager SchemaManager { get; }
Property Value
Type | Description |
---|---|
ISchemaManager |
SchemaManagerName
Gets or sets name of the schema manager.
Declaration
public virtual string SchemaManagerName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
SchemaUId
Gets or sets unique identifier of schema element.
Declaration
public override Guid SchemaUId { get; set; }
Property Value
Type | Description |
---|---|
System.Guid |
Overrides
Storage
Gets or sets instance that provides functionality for storing and retrieving resource managers.
Declaration
public virtual IResourceStorage Storage { get; set; }
Property Value
Type | Description |
---|---|
IResourceStorage |
UseFlowEngineMode
Indicates whether the current process element can be executed in interpreted environment.
Declaration
protected virtual bool UseFlowEngineMode { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
UserConnection
Gets or sets the user connection.
Declaration
public virtual UserConnection UserConnection { get; set; }
Property Value
Type | Description |
---|---|
UserConnection | The user connection. |
Methods
AfterInternalExecute()
This method is called after the current process element is executed, but before the "Executed" event is triggered.
Declaration
protected virtual void AfterInternalExecute()
ApplyPropertiesDataValues(DataReader)
Applies state of the current process element.
Declaration
protected override void ApplyPropertiesDataValues(DataReader reader)
Parameters
Type | Name | Description |
---|---|---|
DataReader | reader | Instance that provides sequential reading of data. |
Overrides
Assign(ProcessFlowElement)
Assigns the property values of the current process element to the properties of the specified element.
Declaration
protected override void Assign(ProcessFlowElement processElement)
Parameters
Type | Name | Description |
---|---|---|
ProcessFlowElement | processElement | Instance of the ProcessFlowElement type. |
Overrides
CancelExecuting(Object[])
Cancels executing the current process element.
Declaration
public virtual void CancelExecuting(params object[] parameters)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | parameters | Array of the parameter values. |
CloneShallow()
Creates a shallow copy of the current process element.
Declaration
public override object CloneShallow()
Returns
Type | Description |
---|---|
System.Object | Instance that is a copy of the current process element. |
Overrides
CompleteExecuting(Object[])
Completes executing the current process element.
Declaration
public virtual bool CompleteExecuting(params object[] parameters)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | parameters | Array of the parameter values. |
Returns
Type | Description |
---|---|
System.Boolean |
|
ConvertToProcessDataSourceFilters(Guid, String)
Converts a set of filters to a process format.
Declaration
public virtual string ConvertToProcessDataSourceFilters(Guid entitySchemaUId, string dataSourceFilters)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | entitySchemaUId | Unique identifier of the entity schema. |
System.String | dataSourceFilters | Set of the filter values. |
Returns
Type | Description |
---|---|
System.String | Converted value of the set of filters. |
CreateFlowElementInstanceByType(Type, Process)
Creates a new instance of the ProcessFlowElement class by the specified type info.
Declaration
protected virtual ProcessFlowElement CreateFlowElementInstanceByType(Type processElementType, Process process)
Parameters
Type | Name | Description |
---|---|---|
System.Type | processElementType | |
Process | process | Instance of the Process type. |
Returns
Type | Description |
---|---|
ProcessFlowElement | Instance of the ProcessFlowElement type. |
DeserializeFromString<T>(String)
Converts the specified string to an object of the specified type.
Declaration
public virtual T DeserializeFromString<T>(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The string to be deserialized. |
Returns
Type | Description |
---|---|
T | The deserialized object. |
Type Parameters
Name | Description |
---|---|
T | The type of the resulting object. |
ExternalExecute(ProcessActivityAfterEventArgs)
Declaration
public virtual void ExternalExecute(ProcessActivityAfterEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
ProcessActivityAfterEventArgs | e |
FindSchemaElement()
Finds the current schema element in schema of the current owner.
Declaration
public BaseProcessSchemaElement FindSchemaElement()
Returns
Type | Description |
---|---|
BaseProcessSchemaElement | Found schema element. |
FindSchemaElement(Guid)
Finds the current schema element in schema of the current owner.
Declaration
protected BaseProcessSchemaElement FindSchemaElement(Guid schemaElementUId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | schemaElementUId | The identifier of the schema element. |
Returns
Type | Description |
---|---|
BaseProcessSchemaElement | Found schema element. |
GetExecutionData()
Returns the data required to display the execution page.
Declaration
public virtual string GetExecutionData()
Returns
Type | Description |
---|---|
System.String | String that represents the data needed for showing execution page. |
GetIsReexecution()
Returns flag that indicates if element has been executed one or more times.
Declaration
public virtual bool GetIsReexecution()
Returns
Type | Description |
---|---|
System.Boolean |
|
GetLocalizableString(String, String)
Returns string value that depends on the current culture info.
Declaration
public virtual string GetLocalizableString(string managerName, string resourceItemName)
Parameters
Type | Name | Description |
---|---|---|
System.String | managerName | Name of the resource manager. |
System.String | resourceItemName | Name of the resource item. |
Returns
Type | Description |
---|---|
System.String |
GetNotificationData()
Returns data of the process element notification event.
Declaration
public virtual ProcessElementNotification GetNotificationData()
Returns
Type | Description |
---|---|
ProcessElementNotification | Instance of the ProcessElementNotification type. |
GetParameterValue(ProcessSchemaParameter)
Returns parameter value.
Declaration
public virtual object GetParameterValue(ProcessSchemaParameter parameter)
Parameters
Type | Name | Description |
---|---|---|
ProcessSchemaParameter | parameter | Process schema parameter. |
Returns
Type | Description |
---|---|
System.Object | Parameter value. |
GetParameterValues()
Returns element parameters in (Parameter, ParameterValue) format.
Declaration
public virtual Dictionary<ProcessSchemaParameter, object> GetParameterValues()
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<ProcessSchemaParameter, System.Object> | Dictionary with element parameters. |
GetParameterValues(IEnumerable<ProcessSchemaParameter>)
Returns a dictionary with element parameters and its values.
Declaration
public Dictionary<ProcessSchemaParameter, object> GetParameterValues(IEnumerable<ProcessSchemaParameter> parameters)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<ProcessSchemaParameter> | parameters |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<ProcessSchemaParameter, System.Object> | Dictionary, where key is instance of the parameter and value is value of the parameter. |
GetResultAllowedValues()
Gets the result allowed values.
Declaration
public virtual string GetResultAllowedValues()
Returns
Type | Description |
---|---|
System.String | The result allowed values. |
GetResultParameterAllowedValues()
Returns allowed values of the result parameter.
Declaration
public virtual Dictionary<Guid, string> GetResultParameterAllowedValues()
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.Guid, System.String> | Allowed values of the result parameter. |
GetResultParameterAllValues(UserConnection, ProcessSchemaUserTask)
Declaration
public virtual Dictionary<Guid, string> GetResultParameterAllValues(UserConnection userConnection, ProcessSchemaUserTask schemaUserTask)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | |
ProcessSchemaUserTask | schemaUserTask |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.Guid, System.String> |
GetSchema(Guid)
Returns instance of the schema.
Declaration
protected virtual Schema GetSchema(Guid schemaUId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | schemaUId | UId of the schema. |
Returns
Type | Description |
---|---|
Schema | Instance of the schema. |
GetSchemaElement()
Returns corresponding schema element.
Declaration
public virtual BaseProcessSchemaElement GetSchemaElement()
Returns
Type | Description |
---|---|
BaseProcessSchemaElement | Schema element. |
HasMapping(String)
Determines whether the specified parameter has mapping value.
Declaration
protected virtual bool HasMapping(string parameterName)
Parameters
Type | Name | Description |
---|---|---|
System.String | parameterName | Parameter name. |
Returns
Type | Description |
---|---|
System.Boolean |
|
MeasureDuration(String)
Executes an action and publishes metrics.
Declaration
protected IDisposable MeasureDuration(string operationName = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | operationName | Operation name. |
Returns
Type | Description |
---|---|
System.IDisposable | System.IDisposable object. |
NeedBreakProcessExecuting(ProcessActivityAfterEventArgs)
Checks whether there is a need to break owner process execution after current element executed.
Declaration
protected virtual bool NeedBreakProcessExecuting(ProcessActivityAfterEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
ProcessActivityAfterEventArgs | e | The ProcessActivityAfterEventArgs instance containing the event data. |
Returns
Type | Description |
---|---|
System.Boolean |
|
OnCanceled()
Executed when element is canceled.
Declaration
protected virtual void OnCanceled()
OnExecuted(ProcessActivityAfterEventArgs)
This method is called after the current process element is executed.
Declaration
protected override void OnExecuted(ProcessActivityAfterEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
ProcessActivityAfterEventArgs | e | Instance of the ProcessActivityAfterEventArgs type. |
Overrides
ReadPropertiesData()
Reads state of the current process element.
Declaration
public override void ReadPropertiesData()
Overrides
ReadPropertiesDataFromDB(UserConnection)
Reads state of the current process element from DB.
Declaration
public virtual void ReadPropertiesDataFromDB(UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | User connection. |
ReadPropertiesDataFromMemory()
Method is not implemented.
Declaration
public virtual void ReadPropertiesDataFromMemory()
ReadSerializableObject<T>(DataReader)
Reads
Declaration
protected virtual T ReadSerializableObject<T>(DataReader reader)
where T : class, ISerializableObject
Parameters
Type | Name | Description |
---|---|---|
DataReader | reader | Instance of |
Returns
Type | Description |
---|---|
T | Value from reader. |
Type Parameters
Name | Description |
---|---|
T | Type of object. |
SerializeToString(Object)
Serializes the specified value.
Declaration
public virtual string SerializeToString(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The specified value. |
Returns
Type | Description |
---|---|
System.String | String that represents the serialized value. |
WriteExecutionData(IProcessExecutionDataWriter)
Writes data used by execution page.
Declaration
protected virtual void WriteExecutionData(IProcessExecutionDataWriter dataWriter)
Parameters
Type | Name | Description |
---|---|---|
IProcessExecutionDataWriter | dataWriter | Data writer. |
WriteProcessParameters()
Writes parameter values of the current process element.
Declaration
protected virtual void WriteProcessParameters()
WritePropertiesData()
Writes state of the current process element.
Declaration
public override void WritePropertiesData()
Overrides
WritePropertiesData(DataWriter, Boolean)
Writes state of the current process element.
Declaration
public override void WritePropertiesData(DataWriter writer, bool shouldWriteElements)
Parameters
Type | Name | Description |
---|---|---|
DataWriter | writer | Instance of the |
System.Boolean | shouldWriteElements | Indicates whether to write other process elements. |
Overrides
WritePropertiesDataToMemory()
Method is not implemented.
Declaration
public virtual void WritePropertiesDataToMemory()
WriteSerializableObject<T>(DataWriter, String, T)
Writes
Declaration
protected virtual void WriteSerializableObject<T>(DataWriter writer, string propertyName, T value)
where T : class, ISerializableObject
Parameters
Type | Name | Description |
---|---|---|
DataWriter | writer | Instance of |
System.String | propertyName | Name of property to write. |
T | value | Value to write. |
Type Parameters
Name | Description |
---|---|
T | Type of object. |