Class ActivityDefinition
Represent an activity in a process scheme
Inheritance
↳ object
↳ BaseDefinition
↳ ActivityDefinition
Implements
IInlineActivity
IOrdinaryActivity
Inherited Members
BaseDefinition.DesignerSettings
Equals(object)
Equals(object, object)
GetHashCode()
GetType()
MemberwiseClone()
ReferenceEquals(object, object)
ToString()
Namespace: OptimaJet.Workflow.Core.Model
Assembly: OptimaJet.Workflow.Core.dll
Syntaxpublic class ActivityDefinition : BaseDefinition, IInlineActivity, IOrdinaryActivity
Properties
OriginalName
If object was inlined, you can get its original name from this property
Declarationpublic string OriginalName { get; set; }
Type | Description |
---|---|
string |
OriginalSchemeCode
The code of the scheme to which the inlined object originally belonged.
Declarationpublic string OriginalSchemeCode { get; set; }
Type | Description |
---|---|
string |
LastTimeInlineName
The name of the inline activity instead of which the object was inlined last time.
Declarationpublic string LastTimeInlineName { get; set; }
Type | Description |
---|---|
string |
FirstTimeInlineName
The name of the inline activity instead of which the object was inlined first time.
Declarationpublic string FirstTimeInlineName { get; set; }
Type | Description |
---|---|
string |
WasInlined
Return true if the object was inlined.
Declarationpublic bool WasInlined { get; set; }
Type | Description |
---|---|
bool |
ActivityType
Type of the activity. Ordinary or Inline.
Declaration[JsonConverter(typeof(StringEnumConverter))]
public ActivityType ActivityType { get; set; }
Type | Description |
---|---|
ActivityType |
SchemeCode
Inlined scheme name for inline activity.
Declarationpublic string SchemeCode { get; set; }
Type | Description |
---|---|
string |
State
Name of the state
Declarationpublic string State { get; set; }
Type | Description |
---|---|
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.
Declarationpublic bool IsInitial { get; set; }
Type | Description |
---|---|
bool |
IsFinal
If true specifies that the activity is final. The process is marked as finalized after execution of the activity marked as final.
Declarationpublic bool IsFinal { get; set; }
Type | Description |
---|---|
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
Declarationpublic bool IsForSetState { get; set; }
Type | Description |
---|---|
bool |
IsAutoSchemeUpdate
If true specifies that if process scheme obsolete than Workflow Runtime will try upgrade it automatically if this activity is current
Declarationpublic bool IsAutoSchemeUpdate { get; set; }
Type | Description |
---|---|
bool |
DisablePersistState
If true specifies that the activity is not save state in database (WorkflowProcessInstance)
Declarationpublic bool DisablePersistState { get; set; }
Type | Description |
---|---|
bool |
DisablePersistTransitionHistory
If true specifies that the activity is not save state in database (WorkflowProcessTransitionHistory)
Declarationpublic bool DisablePersistTransitionHistory { get; set; }
Type | Description |
---|---|
bool |
DisablePersistParameters
If true specifies that the activity is not save state in database (WorkflowProcessInstancePersistence)
Declarationpublic bool DisablePersistParameters { get; set; }
Type | Description |
---|---|
bool |
UserComment
Custom comment
Declarationpublic string UserComment { get; set; }
Type | Description |
---|---|
string |
HaveImplementation
Specifies that activity have an implementation
Declarationpublic bool HaveImplementation { get; }
Type | Description |
---|---|
bool |
HavePreExecutionImplementation
Specifies that activity have a pre-execution implementation
Declarationpublic bool HavePreExecutionImplementation { get; }
Type | Description |
---|---|
bool |
Implementation
List of ActionDefinitionReference which are executed at standard workflow execution
Declarationpublic List<ActionDefinitionReference> Implementation { get; set; }
Type | Description |
---|---|
List<ActionDefinitionReference> |
PreExecutionImplementation
List of ActionDefinitionReference which are executed at pre-execution
Declarationpublic List<ActionDefinitionReference> PreExecutionImplementation { get; set; }
Type | Description |
---|---|
List<ActionDefinitionReference> |
Annotations
A List of Annotation attached to this activity.
Declarationpublic List<Annotation> Annotations { get; set; }
Type | Description |
---|---|
List<Annotation> |
ExecutionTimeout
Timeout for execution ActivityTimeout
Declarationpublic ActivityTimeout ExecutionTimeout { get; set; }
Type | Description |
---|---|
ActivityTimeout |
IdleTimeout
Timeout for idle ActivityTimeout
Declarationpublic ActivityTimeout IdleTimeout { get; set; }
Type | Description |
---|---|
ActivityTimeout |
ExceptionsHandlers
Exceptions handler ActivityExceptionsHandler
Declarationpublic List<ActivityExceptionsHandler> ExceptionsHandlers { get; set; }
Type | Description |
---|---|
List<ActivityExceptionsHandler> |
IsState
Specifies that state is assigned
Declarationpublic bool IsState { get; }
Type | Description |
---|---|
bool |
NestingLevel
Nesting level of subprocess, 0 - root process, 1-... -subprocesses, null - not assigned
Declarationpublic int? NestingLevel { get; set; }
Type | Description |
---|---|
int? |
CustomType
Returns custom type of activity, if the activity is not custom, returns null
Declaration[JsonIgnore]
public string CustomType { get; set; }
Type | Description |
---|---|
string |
Methods
Create(string, string, string, string, string, string, string, string, string, string)
Create ActivityDefinition object
Declarationpublic static ActivityDefinition Create(string name, string stateName, string isInitial, string isFinal, string isForSetState, string isAutoSchemeUpdate, string disablePersist, string disablePersistState, string disablePersistTransitionHistory, string disablePersistParameters)
Type | Name | Description |
---|---|---|
string | name | Name of the activity |
string | stateName | Name of the state |
string | isInitial | If true specifies that the activity is final. The process is marked as finalized after execution of the activity marked as final. |
string | isFinal | If true specifies that the activity is final. The process is marked as finalized after execution of the activity marked as final. |
string | isForSetState | If 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 |
string | isAutoSchemeUpdate | If true specifies that if process scheme obsolete than Workflow Runtime will try upgrade it automatically if this activity is current |
string | disablePersist | disabling all persist (for old compatibility) |
string | disablePersistState | If true specifies that the activity is not save state in database (WorkflowProcessInstance) |
string | disablePersistTransitionHistory | If true specifies that the activity is not save state in database (WorkflowProcessTransitionHistory) |
string | disablePersistParameters | If true specifies that the activity is not save state in database (WorkflowProcessInstancePersistence) |
Type | Description |
---|---|
ActivityDefinition | ActivityDefinition object |
Create(string, string, bool, bool, bool, bool, bool, bool, bool)
Create ActivityDefinition object
Declarationpublic static ActivityDefinition Create(string name, string stateName, bool isInitial, bool isFinal, bool isForSetState, bool isAutoSchemeUpdate, bool disablePersistState = false, bool disablePersistTransitionHistory = false, bool disablePersistParameters = false)
Type | Name | Description |
---|---|---|
string | name | Name of the activity |
string | stateName | Name of the state |
bool | isInitial | If true specifies that the activity is final. The process is marked as finalized after execution of the activity marked as final. |
bool | isFinal | If true specifies that the activity is final. The process is marked as finalized after execution of the activity marked as final. |
bool | isForSetState | If 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 |
bool | isAutoSchemeUpdate | If true specifies that if process scheme obsolete than Workflow Runtime will try upgrade it automatically if this activity is current |
bool | disablePersistState | If true specifies that the activity is not save state in database. |
bool | disablePersistTransitionHistory | If true specifies that the activity is not save state in database. |
bool | disablePersistParameters | If true specifies that the activity is not save state in database. |
Type | Description |
---|---|
ActivityDefinition | ActivityDefinition object |
CreateInlineActivity(string, string)
Creates inline activity
Declarationpublic static ActivityDefinition CreateInlineActivity(string name, string schemeCode)
Type | Name | Description |
---|---|---|
string | name | |
string | schemeCode |
Type | Description |
---|---|
ActivityDefinition |
AddAction(ActionDefinitionReference)
Add ActionDefinitionReference to implementation list
Declarationpublic void AddAction(ActionDefinitionReference action)
Type | Name | Description |
---|---|---|
ActionDefinitionReference | action | Action reference |
AddPreExecutionAction(ActionDefinitionReference)
Add ActionDefinitionReference to pre-execution implementation list
Declarationpublic void AddPreExecutionAction(ActionDefinitionReference action)
Type | Name | Description |
---|---|---|
ActionDefinitionReference | action | Action reference |
Clone()
Declarationpublic ActivityDefinition Clone()
Type | Description |
---|---|
ActivityDefinition |
GetAnnotation<T>(string)
Get an annotation attached to this activity
Declarationpublic T GetAnnotation<T>(string name)
Type | Name | Description |
---|---|---|
string | name | Annotation's name |
Type | Description |
---|---|
{T} | Annotation value |
GetAnnotation(string)
Get a JSON representation of annotation's value
Declarationpublic string GetAnnotation(string name)
Type | Name | Description |
---|---|---|
string | name | Annotation's name |
Type | Description |
---|---|
string | JSON representation of annotation's value |