Workflow Engine .NET

Assembly: OptimaJet.Workflow.Core

Class ProcessDefinition

OptimaJet.Workflow.Core.Model.ProcessDefinition

Represents object model of a scheme of a process

public sealed class ProcessDefinition : BaseDefinition

Inheritance

Constructors

public ProcessDefinition() #

Properties

Name
Type
CodeActionsInvoker #
CodeActionsInvoker
Code action invoker with compiled code actions
ExpressionsInvoker #
ExpressionsInvoker
Expressions invoker
SubprocessNameGetterInvoker #
SubprocessNameGetterInvoker
Subprocess name getter invoker
ExpressionManager #
ExpressionManager
Expression manager
Actors #
List<ActorDefinition>
List of actors ActorDefinition
Parameters #
List<ParameterDefinition>
List of parameters ParameterDefinition
Commands #
List<CommandDefinition>
List of commands CommandDefinition
Timers #
List<TimerDefinition>
List of timers TimerDefinition
Comments #
List<CommentDefinition>
List of comments CommentDefinition
Activities #
List<ActivityDefinition>
List of activities ActivityDefinition
Transitions #
List<TransitionDefinition>
List of transitions TransitionDefinition
Localization #
Localization
List of localization items Translation
Localizer #
Localizer
Provides localized strings. For search used ProcessDefinition.Localization property.
CodeActions #
List<CodeActionDefinition>
List of code actions CodeActionDefinition
CodeActionsCommonUsings #
String
List of common usings separated by ;
AdditionalParams #
Dictionary<Object>
Additional parameters used by Workflow Designer
CanBeInlined #
Boolean
The flag indicates that this scheme can be inlined into other schemes
LogEnabled #
Boolean
The flag indicates that this scheme will be logging after create ProcessInstance
InlinedSchemes #
List<String>
The property contains inlined schemes are used in this scheme
StartingTransition #
String
Tags #
List<String>
The property contains tags that mark the scheme
ContainsSubprocesses #
Boolean
Returns true if the scheme contains subprocesses
InitialActivity #
ActivityDefinition
Returns initial activity of the scheme
ParametersForSerialize #
ParameterDefinition[]
Returns all parameter definitions except system ParameterDefinition.Purpose
PersistenceParameters #
IEnumerable<ParameterDefinition>
Returns all persisted parameter definitions ParameterDefinition.Purpose
ActorsForSerialize #
ActorDefinition[]
Returns all parameter definitions except system ParameterDefinition.Purpose
RootSchemeCode #
String
RootSchemeId #
Nullable<Guid>
IsObsolete #
Boolean
Id #
Guid
TenantId #
String
IsSubprocessScheme #
Boolean
AllowedActivities #
List<String>
CalendarName #
String

Methods

public ActivityDefinition FindActivity(string activityName) #
Returns activity with specific name

Parameters

Name
Type
Description
activityName
String
Name of the activity ActivityDefinition.Name

Returns

Type
Description
ActivityDefinition
ActivityDefinition object
public ActivityDefinition FindSetStateActivity(string stateName) #
Returns activity with specific state name and possibility to set the state

Parameters

Name
Type
Description
stateName
String
Name of the state

Returns

Type
Description
ActivityDefinition
ActivityDefinition object
public CommandDefinition FindCommand(string name) #
Returns command with specific name

Parameters

Name
Type
Description
name
String
Name of the command CommandDefinition.Name

Returns

Type
Description
CommandDefinition
CommandDefinition object
public ActorDefinition FindActor(string name) #
Returns actor with specific name

Parameters

Name
Type
Description
name
String
Name of the actor ActorDefinition.Name

Returns

Type
Description
ActorDefinition
ActorDefinition object
public ParameterDefinition FindParameterDefinition(string name) #
Returns the parameter specific name

Parameters

Name
Type
Description
name
String
Name of the parameter ParameterDefinition.Name

Returns

Type
Description
ParameterDefinition
ParameterDefinition object
public TransitionDefinition FindTransition(string name) #
Returns transition with specific name

Parameters

Name
Type
Description
name
String
Name of the transition TransitionDefinition.Name

Returns

Type
Description
TransitionDefinition
TransitionDefinition object
public List<TransitionDefinition> FindTransitions(ActivityDefinition from, ActivityDefinition to) #
Returns transitions linked by specified activities

Parameters

Name
Type
Description
from
ActivityDefinition
to
ActivityDefinition

Returns

Type
Description
List<TransitionDefinition>
List of TransitionDefinition objects
public IEnumerable<TransitionDefinition> GetPossibleTransitionsForActivity(ActivityDefinition activity, ForkTransitionSearchType forkTransitionSearch = ForkTransitionSearchType.NotFork) #
Returns the list of all outgoing transitions for specific activity

Parameters

Name
Type
Description
activity
ActivityDefinition
Activity definition
forkTransitionSearch
ForkTransitionSearchType
Search filter for fork transitions

Returns

Type
Description
IEnumerable<TransitionDefinition>
List of all outgoing transitions
public IEnumerable<TransitionDefinition> GetCommandTransitions(ActivityDefinition activity, ForkTransitionSearchType forkTransitionSearch = ForkTransitionSearchType.NotFork) #
Returns the list of all outgoing command transitions for specific activity TriggerType.Command

Parameters

Name
Type
Description
activity
ActivityDefinition
Activity definition
forkTransitionSearch
ForkTransitionSearchType
Search filter for fork transitions

Returns

Type
Description
IEnumerable<TransitionDefinition>
List of all outgoing command transitions
public IEnumerable<TransitionDefinition> GetAutoTransitionForActivity(ActivityDefinition activity, ForkTransitionSearchType forkTransitionSearch = ForkTransitionSearchType.NotFork) #
Returns the list of all outgoing auto transitions for specific activity TriggerType.Auto

Parameters

Name
Type
Description
activity
ActivityDefinition
Activity definition
forkTransitionSearch
ForkTransitionSearchType
Search filter for fork transitions

Returns

Type
Description
IEnumerable<TransitionDefinition>
List of all outgoing auto transitions
public IEnumerable<TransitionDefinition> GetCommandTransitionForActivity(ActivityDefinition activity, string commandName, ForkTransitionSearchType forkTransitionSearch = ForkTransitionSearchType.NotFork) #
Returns the list of all outgoing command transitions for specific activity TriggerType.Command whis specific command name CommandDefinition.Name

Parameters

Name
Type
Description
activity
ActivityDefinition
Activity definition
commandName
String
Name of the command
forkTransitionSearch
ForkTransitionSearchType
Search filter for fork transitions

Returns

Type
Description
IEnumerable<TransitionDefinition>
List of all outgoing command transitions whis specific command name
public IEnumerable<TransitionDefinition> GetTimerTransitionForActivity(ActivityDefinition activity, ForkTransitionSearchType forkTransitionSearch = ForkTransitionSearchType.NotFork) #
Returns the list of all outgoing timer transitions for specific activity TriggerType.Timer

Parameters

Name
Type
Description
activity
ActivityDefinition
Activity definition
forkTransitionSearch
ForkTransitionSearchType
Search filter for fork transitions

Returns

Type
Description
IEnumerable<TransitionDefinition>
List of all outgoing timer transitions
public string GetLocalizedStateName(string name, CultureInfo culture = null) #
Returns localized state name in specific culture

Parameters

Name
Type
Description
name
String
System state name
culture
CultureInfo
Desired culture. If null then used CultureInfo.CurrentCulture

Returns

Type
Description
String
Localized state name if exists, else input name
public string GetLocalizedCommandName(string name, CultureInfo culture = null) #
Returns localized command name in specific culture

Parameters

Name
Type
Description
name
String
System command name
culture
CultureInfo
Desired culture. If null then used CultureInfo.CurrentCulture

Returns

Type
Description
String
Localized command name if exists, else input name
public string GetLocalizedParameterName(string name, CultureInfo culture = null) #
Returns localized parameter name in specific culture

Parameters

Name
Type
Description
name
String
System parameter name
culture
CultureInfo
Desired culture. If null then used CultureInfo.CurrentCulture

Returns

Type
Description
String
Localized parameter name if exists, else input name
public string GetLocalizedActionName(string name, CultureInfo culture = null) #
Returns localized action name in specific culture

Parameters

Name
Type
Description
name
String
System action name
culture
CultureInfo
Desired culture. If null then used CultureInfo.CurrentCulture

Returns

Type
Description
String
Localized action name if exists, else input name
public string GetLocalizedConditionName(string name, CultureInfo culture = null) #
Returns localized condition name in specific culture

Parameters

Name
Type
Description
name
String
System condition name
culture
CultureInfo
Desired culture. If null then used CultureInfo.CurrentCulture

Returns

Type
Description
String
Localized condition name if exists, else input name
public string GetLocalizedSchemeName(CultureInfo culture = null) #
Returns localized scheme name in specific culture

Parameters

Name
Type
Description
culture
CultureInfo
Desired culture. If null then used CultureInfo.CurrentCulture

Returns

Type
Description
String
Localized scheme name if exists, else just ProcessDefinition.Name
public string GetLocalizedComment(string key, CultureInfo culture = null) #
Returns localized comment in specific culture

Parameters

Name
Type
Description
key
String
Key for search localized comment
culture
CultureInfo
Desired culture. If null then used CultureInfo.CurrentCulture

Returns

Type
Description
String
Localized value if exists, else input key
public ProcessDefinition Clone() #

Returns

Type
Description
ProcessDefinition
public ProcessDefinition Clone(bool doNotCloneActivities, bool doNotCloneTransitions, bool doNotCloneCodeActions) #
Clones ProcessDefinition object

Parameters

Name
Type
Description
doNotCloneActivities
Boolean
If True activity list will be empty after cloning
doNotCloneTransitions
Boolean
If True transition list will be empty after cloning
doNotCloneCodeActions
Boolean
If True code actions list will be empty after cloning

Returns

Type
Description
ProcessDefinition
Cloned ProcessDefinition object
public string GetSchemeCodeForActionCall() #
Returns the code of the scheme from which the actions are called. For a subprocess it will be RootSchemeCode for root (ordinary) process it will be Name

Returns

Type
Description
String
public string Serialize() #

Returns

Type
Description
String
public XElement SerializeToXElement() #

Returns

Type
Description
XElement
public T GetActivityAnnotation<T>(string activityName, string name) #
Get an annotation of an activity

Parameters

Name
Type
Description
activityName
String
Activity name
name
String
Annotation name

Returns

Type
Description
{T}
Annotation value
public string GetActivityAnnotation(string activityName, string name) #
Get a JSON representation of annotation's value of an activity

Parameters

Name
Type
Description
activityName
String
Activity name
name
String
Annotation name

Returns

Type
Description
String
JSON representation of annotation's value
public T GetTransitionAnnotation<T>(string transitionName, string name) #
Get an annotation of a transition

Parameters

Name
Type
Description
transitionName
String
Transition name
name
String
Annotation name

Returns

Type
Description
{T}
Annotation value
public string GetTransitionAnnotation(string transitionName, string name) #
Get a JSON representation of annotation's value of a transition

Parameters

Name
Type
Description
transitionName
String
Transition name
name
String
Annotation name

Returns

Type
Description
String
JSON representation of annotation's value