Skip to main content

Introducing Formengine - The New Formbuilder, try for FREE formengine.io.

Class ActivityDefinition

Represent an activity in a process scheme

Inheritance

↳ object

    ↳ BaseDefinition

        ↳ ActivityDefinition

Implements

IInlineActivity

IOrdinaryActivity

Inherited Members

BaseDefinition.Name

BaseDefinition.DesignerSettings

Equals(object)

Equals(object, object)

GetHashCode()

GetType()

MemberwiseClone()

ReferenceEquals(object, object)

ToString()

Namespace: OptimaJet.Workflow.Core.Model

Assembly: OptimaJet.Workflow.Core.dll

Syntax
public class ActivityDefinition : BaseDefinition, IInlineActivity, IOrdinaryActivity

Properties

OriginalName

If object was inlined, you can get its original name from this property

Declaration
public string OriginalName { get; set; }
Property value
TypeDescription
string

OriginalSchemeCode

The code of the scheme to which the inlined object originally belonged.

Declaration
public string OriginalSchemeCode { get; set; }
Property value
TypeDescription
string

LastTimeInlineName

The name of the inline activity instead of which the object was inlined last time.

Declaration
public string LastTimeInlineName { get; set; }
Property value
TypeDescription
string

FirstTimeInlineName

The name of the inline activity instead of which the object was inlined first time.

Declaration
public string FirstTimeInlineName { get; set; }
Property value
TypeDescription
string

WasInlined

Return true if the object was inlined.

Declaration
public bool WasInlined { get; set; }
Property value
TypeDescription
bool

ActivityType

Type of the activity. Ordinary or Inline.

Declaration
[JsonConverter(typeof(StringEnumConverter))]
public ActivityType ActivityType { get; set; }
Property value
TypeDescription
ActivityType

SchemeCode

Inlined scheme name for inline activity.

Declaration
public string SchemeCode { get; set; }
Property value
TypeDescription
string

State

Name of the state

Declaration
public string State { get; set; }
Property value
TypeDescription
string

IsInitial

If true specifies that the activity is initial. There can be only one initial activity in scheme. Initial activity is the entry point of the process.

Declaration
public bool IsInitial { get; set; }
Property value
TypeDescription
bool

IsFinal

If true specifies that the activity is final. The process is marked as finalized after execution of the activity marked as final.

Declaration
public bool IsFinal { get; set; }
Property value
TypeDescription
bool

IsForSetState

If true specifies that the activity is entry point for a state and possible to set the state with the ActivityDefinition.State name via OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.SetState(System.Guid%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Collections.Generic.IDictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Boolean) method

Declaration
public bool IsForSetState { get; set; }
Property value
TypeDescription
bool

IsAutoSchemeUpdate

If true specifies that if process scheme obsolete than Workflow Runtime will try upgrade it automatically if this activity is current

Declaration
public bool IsAutoSchemeUpdate { get; set; }
Property value
TypeDescription
bool

DisablePersistState

If true specifies that the activity is not save state in database (WorkflowProcessInstance)

Declaration
public bool DisablePersistState { get; set; }
Property value
TypeDescription
bool

DisablePersistTransitionHistory

If true specifies that the activity is not save state in database (WorkflowProcessTransitionHistory)

Declaration
public bool DisablePersistTransitionHistory { get; set; }
Property value
TypeDescription
bool

DisablePersistParameters

If true specifies that the activity is not save state in database (WorkflowProcessInstancePersistence)

Declaration
public bool DisablePersistParameters { get; set; }
Property value
TypeDescription
bool

UserComment

Custom comment

Declaration
public string UserComment { get; set; }
Property value
TypeDescription
string

HaveImplementation

Specifies that activity have an implementation

Declaration
public bool HaveImplementation { get; }
Property value
TypeDescription
bool

HavePreExecutionImplementation

Specifies that activity have a pre-execution implementation

Declaration
public bool HavePreExecutionImplementation { get; }
Property value
TypeDescription
bool

Implementation

List of ActionDefinitionReference which are executed at standard workflow execution

Declaration
public List<ActionDefinitionReference> Implementation { get; set; }
Property value
TypeDescription
List<ActionDefinitionReference>

PreExecutionImplementation

List of ActionDefinitionReference which are executed at pre-execution

Declaration
public List<ActionDefinitionReference> PreExecutionImplementation { get; set; }
Property value
TypeDescription
List<ActionDefinitionReference>

Annotations

A List of Annotation attached to this activity.

Declaration
public List<Annotation> Annotations { get; set; }
Property value
TypeDescription
List<Annotation>

ExecutionTimeout

Timeout for execution ActivityTimeout

Declaration
public ActivityTimeout ExecutionTimeout { get; set; }
Property value
TypeDescription
ActivityTimeout

IdleTimeout

Timeout for idle ActivityTimeout

Declaration
public ActivityTimeout IdleTimeout { get; set; }
Property value
TypeDescription
ActivityTimeout

ExceptionsHandlers

Exceptions handler ActivityExceptionsHandler

Declaration
public List<ActivityExceptionsHandler> ExceptionsHandlers { get; set; }
Property value
TypeDescription
List<ActivityExceptionsHandler>

IsState

Specifies that state is assigned

Declaration
public bool IsState { get; }
Property value
TypeDescription
bool

NestingLevel

Nesting level of subprocess, 0 - root process, 1-... -subprocesses, null - not assigned

Declaration
public int? NestingLevel { get; set; }
Property value
TypeDescription
int?

CustomType

Returns custom type of activity, if the activity is not custom, returns null

Declaration
[JsonIgnore]
public string CustomType { get; set; }
Property value
TypeDescription
string

Methods

Create(string, string, string, string, string, string, string, string, string, string)

Create ActivityDefinition object

Declaration
public static ActivityDefinition Create(string name, string stateName, string isInitial, string isFinal, string isForSetState, string isAutoSchemeUpdate, string disablePersist, string disablePersistState, string disablePersistTransitionHistory, string disablePersistParameters)
Parameters
TypeNameDescription
stringnameName of the activity
stringstateNameName of the state
stringisInitialIf true specifies that the activity is final. The process is marked as finalized after execution of the activity marked as final.
stringisFinalIf true specifies that the activity is final. The process is marked as finalized after execution of the activity marked as final.
stringisForSetStateIf true specifies that the activity is entry point for a state and possible to set the state with the <xref href="OptimaJet.Workflow.Core.Model.ActivityDefinition.State" data-throw-if-not-resolved="false"></xref> name via <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.SetState(System.Guid%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Collections.Generic.IDictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Boolean)" data-throw-if-not-resolved="false"></xref> method
stringisAutoSchemeUpdateIf true specifies that if process scheme obsolete than Workflow Runtime will try upgrade it automatically if this activity is current
stringdisablePersistdisabling all persist (for old compatibility)
stringdisablePersistStateIf true specifies that the activity is not save state in database (WorkflowProcessInstance)
stringdisablePersistTransitionHistoryIf true specifies that the activity is not save state in database (WorkflowProcessTransitionHistory)
stringdisablePersistParametersIf true specifies that the activity is not save state in database (WorkflowProcessInstancePersistence)
Returns
TypeDescription
ActivityDefinitionActivityDefinition object

Create(string, string, bool, bool, bool, bool, bool, bool, bool)

Create ActivityDefinition object

Declaration
public static ActivityDefinition Create(string name, string stateName, bool isInitial, bool isFinal, bool isForSetState, bool isAutoSchemeUpdate, bool disablePersistState = false, bool disablePersistTransitionHistory = false, bool disablePersistParameters = false)
Parameters
TypeNameDescription
stringnameName of the activity
stringstateNameName of the state
boolisInitialIf true specifies that the activity is final. The process is marked as finalized after execution of the activity marked as final.
boolisFinalIf true specifies that the activity is final. The process is marked as finalized after execution of the activity marked as final.
boolisForSetStateIf true specifies that the activity is entry point for a state and possible to set the state with the <xref href="OptimaJet.Workflow.Core.Model.ActivityDefinition.State" data-throw-if-not-resolved="false"></xref> name via <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.SetState(System.Guid%2cSystem.String%2cSystem.String%2cSystem.String%2cSystem.Collections.Generic.IDictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Boolean)" data-throw-if-not-resolved="false"></xref> method
boolisAutoSchemeUpdateIf true specifies that if process scheme obsolete than Workflow Runtime will try upgrade it automatically if this activity is current
booldisablePersistStateIf true specifies that the activity is not save state in database.
booldisablePersistTransitionHistoryIf true specifies that the activity is not save state in database.
booldisablePersistParametersIf true specifies that the activity is not save state in database.
Returns
TypeDescription
ActivityDefinitionActivityDefinition object

CreateInlineActivity(string, string)

Creates inline activity

Declaration
public static ActivityDefinition CreateInlineActivity(string name, string schemeCode)
Parameters
TypeNameDescription
stringname
stringschemeCode
Returns
TypeDescription
ActivityDefinition

AddAction(ActionDefinitionReference)

Add ActionDefinitionReference to implementation list

Declaration
public void AddAction(ActionDefinitionReference action)
Parameters
TypeNameDescription
ActionDefinitionReferenceactionAction reference

AddPreExecutionAction(ActionDefinitionReference)

Add ActionDefinitionReference to pre-execution implementation list

Declaration
public void AddPreExecutionAction(ActionDefinitionReference action)
Parameters
TypeNameDescription
ActionDefinitionReferenceactionAction reference

Clone()

Declaration
public ActivityDefinition Clone()
Returns
TypeDescription
ActivityDefinition

GetAnnotation<T>(string)

Get an annotation attached to this activity

Declaration
public T GetAnnotation<T>(string name)
Parameters
TypeNameDescription
stringnameAnnotation's name
Returns
TypeDescription
{T}Annotation value

GetAnnotation(string)

Get a JSON representation of annotation's value

Declaration
public string GetAnnotation(string name)
Parameters
TypeNameDescription
stringnameAnnotation's name
Returns
TypeDescription
stringJSON representation of annotation's value

Extension Methods