Class ProcessDefinition
Represents object model of a scheme of a process
Inheritance
↳ object
↳ BaseDefinition
↳ ProcessDefinition
Inherited Members
BaseDefinition.Name
BaseDefinition.DesignerSettings
Equals(object)
Equals(object, object)
GetHashCode()
GetType()
ReferenceEquals(object, object)
ToString()
Namespace: OptimaJet.Workflow.Core.Model
Assembly: OptimaJet.Workflow.Core.dll
Syntax
public sealed class ProcessDefinition : BaseDefinition
Constructors
ProcessDefinition()
Declaration
public ProcessDefinition()
Properties
CodeActionsInvoker
Code action invoker with compiled code actions
Declaration
[JsonIgnore]
public CodeActionsInvoker CodeActionsInvoker { get; }
Property value
Type | Description |
---|
CodeActionsInvoker | |
ExpressionsInvoker
Expressions invoker
Declaration
[JsonIgnore]
public ExpressionsInvoker ExpressionsInvoker { get; }
Property value
Type | Description |
---|
ExpressionsInvoker | |
SubprocessNameGetterInvoker
Subprocess name getter invoker
Declaration
[JsonIgnore]
public SubprocessNameGetterInvoker SubprocessNameGetterInvoker { get; }
Property value
Type | Description |
---|
SubprocessNameGetterInvoker | |
ExpressionManager
Expression manager
Declaration
[JsonIgnore]
public ExpressionManager ExpressionManager { get; }
Property value
Type | Description |
---|
ExpressionManager | |
Actors
List of actors ActorDefinition
Declaration
public List<ActorDefinition> Actors { get; set; }
Property value
Type | Description |
---|
List<ActorDefinition> | |
Parameters
List of parameters ParameterDefinition
Declaration
public List<ParameterDefinition> Parameters { get; set; }
Property value
Type | Description |
---|
List<ParameterDefinition> | |
Commands
List of commands CommandDefinition
Declaration
public List<CommandDefinition> Commands { get; set; }
Property value
Type | Description |
---|
List<CommandDefinition> | |
Timers
List of timers TimerDefinition
Declaration
public List<TimerDefinition> Timers { get; set; }
Property value
Type | Description |
---|
List<TimerDefinition> | |
List of comments CommentDefinition
Declaration
public List<CommentDefinition> Comments { get; set; }
Property value
Type | Description |
---|
List<CommentDefinition> | |
Activities
List of activities ActivityDefinition
Declaration
public List<ActivityDefinition> Activities { get; set; }
Property value
Type | Description |
---|
List<ActivityDefinition> | |
Transitions
List of transitions TransitionDefinition
Declaration
public List<TransitionDefinition> Transitions { get; set; }
Property value
Type | Description |
---|
List<TransitionDefinition> | |
Localization
List of localization items Translation
Declaration
public Localization Localization { get; set; }
Property value
Type | Description |
---|
Localization | |
Localizer
Provides localized strings. For search used ProcessDefinition.Localization property.
Declaration
public Localizer Localizer { get; }
Property value
CodeActions
List of code actions CodeActionDefinition
Declaration
public List<CodeActionDefinition> CodeActions { get; set; }
Property value
Type | Description |
---|
List<CodeActionDefinition> | |
CodeActionsCommonUsings
List of common usings separated by ;
Declaration
public string CodeActionsCommonUsings { get; set; }
Property value
AdditionalParams
Additional parameters used by Workflow Designer
Declaration
public Dictionary<string, object> AdditionalParams { get; set; }
Property value
Type | Description |
---|
Dictionary<string, object> | |
CanBeInlined
The flag indicates that this scheme can be inlined into other schemes
Declaration
public bool CanBeInlined { get; set; }
Property value
LogEnabled
The flag indicates that this scheme will be logging after create ProcessInstance
Declaration
public bool LogEnabled { get; set; }
Property value
InlinedSchemes
The property contains inlined schemes are used in this scheme
Declaration
public List<string> InlinedSchemes { get; }
Property value
Type | Description |
---|
List<string> | |
StartingTransition
Declaration
public string StartingTransition { get; set; }
Property value
The property contains tags that mark the scheme
Declaration
public List<string> Tags { get; }
Property value
Type | Description |
---|
List<string> | |
ContainsSubprocesses
Returns true if the scheme contains subprocesses
Declaration
[JsonIgnore]
public bool ContainsSubprocesses { get; }
Property value
InitialActivity
Returns initial activity of the scheme
Declaration
[JsonIgnore]
public ActivityDefinition InitialActivity { get; }
Property value
Type | Description |
---|
ActivityDefinition | |
ParametersForSerialize
Returns all parameter definitions except system ParameterDefinition.Purpose
Declaration
public ParameterDefinition[] ParametersForSerialize { get; }
Property value
Type | Description |
---|
OptimaJet.Workflow.Core.Model.ParameterDefinition[] | |
PersistenceParameters
Returns all persisted parameter definitions ParameterDefinition.Purpose
Declaration
public IEnumerable<ParameterDefinition> PersistenceParameters { get; }
Property value
Type | Description |
---|
IEnumerable<ParameterDefinition> | |
ActorsForSerialize
Returns all parameter definitions except system ParameterDefinition.Purpose
Declaration
public ActorDefinition[] ActorsForSerialize { get; }
Property value
Type | Description |
---|
OptimaJet.Workflow.Core.Model.ActorDefinition[] | |
Declaration
public string DefiningParametersString { get; set; }
Property value
RootSchemeCode
Declaration
public string RootSchemeCode { get; set; }
Property value
RootSchemeId
Declaration
public Guid? RootSchemeId { get; set; }
Property value
IsObsolete
Declaration
public bool IsObsolete { get; set; }
Property value
Declaration
public Guid Id { get; set; }
Property value
IsSubprocessScheme
Declaration
public bool IsSubprocessScheme { get; }
Property value
AllowedActivities
Declaration
public List<string> AllowedActivities { get; set; }
Property value
Type | Description |
---|
List<string> | |
CalendarName
Declaration
public string CalendarName { get; set; }
Property value
Methods
Create ProcessDefinition object
Declaration
public static ProcessDefinition Create(string name, bool canBeInlined, List<ActorDefinition> actors, List<ParameterDefinition> parameters, List<CommandDefinition> commands, List<TimerDefinition> timers, List<ActivityDefinition> activities, List<TransitionDefinition> transitions, List<Translation> localization, List<CodeActionDefinition> codeActions, DesignerSettings designerSettings, List<string> tags, bool logEnabled = false, string commonUsings = null, List<CommentDefinition> comments = null, string calendarName = null)
Parameters
Type | Name | Description |
---|
string | name | Name of the scheme |
bool | canBeInlined | Sign that the scheme can be inlined into another schemes |
List<ActorDefinition> | actors | List of actors <xref href="OptimaJet.Workflow.Core.Model.ActorDefinition" data-throw-if-not-resolved="false"></xref> |
List<ParameterDefinition> | parameters | List of parameters <xref href="OptimaJet.Workflow.Core.Model.ParameterDefinition" data-throw-if-not-resolved="false"></xref> |
List<CommandDefinition> | commands | List of commands <xref href="OptimaJet.Workflow.Core.Model.CommandDefinition" data-throw-if-not-resolved="false"></xref> |
List<TimerDefinition> | timers | List of timers <xref href="OptimaJet.Workflow.Core.Model.TimerDefinition" data-throw-if-not-resolved="false"></xref> |
List<ActivityDefinition> | activities | List of activities <xref href="OptimaJet.Workflow.Core.Model.ActivityDefinition" data-throw-if-not-resolved="false"></xref> |
List<TransitionDefinition> | transitions | List of transitions <xref href="OptimaJet.Workflow.Core.Model.TransitionDefinition" data-throw-if-not-resolved="false"></xref> |
List<Translation> | localization | List of localization items <xref href="OptimaJet.Workflow.Core.Model.Translation" data-throw-if-not-resolved="false"></xref> |
List<CodeActionDefinition> | codeActions | List of code actions <xref href="OptimaJet.Workflow.Core.Model.CodeActionDefinition" data-throw-if-not-resolved="false"></xref> |
DesignerSettings | designerSettings | Designer settings |
List<string> | tags | scheme tags |
bool | logEnabled | Sign that the <xref href="OptimaJet.Workflow.Core.Model.ProcessInstance" data-throw-if-not-resolved="false"></xref> will be logging after create |
string | commonUsings | List of common usings separated by ; |
List<CommentDefinition> | comments | List of comments <xref href="OptimaJet.Workflow.Core.Model.CommentDefinition" data-throw-if-not-resolved="false"></xref> |
string | calendarName | Work calendar name |
Returns
Type | Description |
---|
ProcessDefinition | ProcessDefinition object |
FindActivity(string)
Returns activity with specific name
Declaration
public ActivityDefinition FindActivity(string activityName)
Parameters
Type | Name | Description |
---|
string | activityName | Name of the activity <see cref="!:ActivityDefinition.Name"></see> |
Returns
Type | Description |
---|
ActivityDefinition | ActivityDefinition object |
FindSetStateActivity(string)
Returns activity with specific state name and possibility to set the state
Declaration
public ActivityDefinition FindSetStateActivity(string stateName)
Parameters
Type | Name | Description |
---|
string | stateName | Name of the state |
Returns
Type | Description |
---|
ActivityDefinition | ActivityDefinition object |
FindCommand(string)
Returns command with specific name
Declaration
public CommandDefinition FindCommand(string name)
Parameters
Type | Name | Description |
---|
string | name | Name of the command <see cref="!:CommandDefinition.Name"></see> |
Returns
Type | Description |
---|
CommandDefinition | CommandDefinition object |
FindActor(string)
Returns actor with specific name
Declaration
public ActorDefinition FindActor(string name)
Parameters
Type | Name | Description |
---|
string | name | Name of the actor <see cref="!:ActorDefinition.Name"></see> |
Returns
Type | Description |
---|
ActorDefinition | ActorDefinition object |
FindParameterDefinition(string)
Returns the parameter specific name
Declaration
public ParameterDefinition FindParameterDefinition(string name)
Parameters
Type | Name | Description |
---|
string | name | Name of the parameter <see cref="!:ParameterDefinition.Name"></see> |
Returns
Type | Description |
---|
ParameterDefinition | ParameterDefinition object |
FindTransition(string)
Returns transition with specific name
Declaration
public TransitionDefinition FindTransition(string name)
Parameters
Type | Name | Description |
---|
string | name | Name of the transition <see cref="!:TransitionDefinition.Name"></see> |
Returns
Type | Description |
---|
TransitionDefinition | TransitionDefinition object |
FindTransitions(ActivityDefinition, ActivityDefinition)
Returns transitions linked by specified activities
Declaration
public List<TransitionDefinition> FindTransitions(ActivityDefinition from, ActivityDefinition to)
Parameters
Type | Name | Description |
---|
ActivityDefinition | from | From activity <xref href="OptimaJet.Workflow.Core.Model.TransitionDefinition.From" data-throw-if-not-resolved="false"></xref> |
ActivityDefinition | to | To activity <xref href="OptimaJet.Workflow.Core.Model.TransitionDefinition.To" data-throw-if-not-resolved="false"></xref> |
Returns
Type | Description |
---|
List<TransitionDefinition> | List of TransitionDefinition objects |
GetPossibleTransitionsForActivity(ActivityDefinition, ForkTransitionSearchType)
Returns the list of all outgoing transitions for specific activity
Declaration
public IEnumerable<TransitionDefinition> GetPossibleTransitionsForActivity(ActivityDefinition activity, ForkTransitionSearchType forkTransitionSearch = ForkTransitionSearchType.NotFork)
Parameters
Type | Name | Description |
---|
ActivityDefinition | activity | Activity definition |
ForkTransitionSearchType | forkTransitionSearch | Search filter for fork transitions |
Returns
Type | Description |
---|
IEnumerable<TransitionDefinition> | List of all outgoing transitions |
GetCommandTransitions(ActivityDefinition, ForkTransitionSearchType)
Returns the list of all outgoing command transitions for specific activity TriggerType.Command
Declaration
public IEnumerable<TransitionDefinition> GetCommandTransitions(ActivityDefinition activity, ForkTransitionSearchType forkTransitionSearch = ForkTransitionSearchType.NotFork)
Parameters
Type | Name | Description |
---|
ActivityDefinition | activity | Activity definition |
ForkTransitionSearchType | forkTransitionSearch | Search filter for fork transitions |
Returns
Type | Description |
---|
IEnumerable<TransitionDefinition> | List of all outgoing command transitions |
GetAutoTransitionForActivity(ActivityDefinition, ForkTransitionSearchType)
Returns the list of all outgoing auto transitions for specific activity TriggerType.Auto
Declaration
public IEnumerable<TransitionDefinition> GetAutoTransitionForActivity(ActivityDefinition activity, ForkTransitionSearchType forkTransitionSearch = ForkTransitionSearchType.NotFork)
Parameters
Type | Name | Description |
---|
ActivityDefinition | activity | Activity definition |
ForkTransitionSearchType | forkTransitionSearch | Search filter for fork transitions |
Returns
Type | Description |
---|
IEnumerable<TransitionDefinition> | List of all outgoing auto transitions |
GetCommandTransitionForActivity(ActivityDefinition, string, ForkTransitionSearchType)
Returns the list of all outgoing command transitions for specific activity TriggerType.Command whis specific command name !:CommandDefinition.Name
Declaration
public IEnumerable<TransitionDefinition> GetCommandTransitionForActivity(ActivityDefinition activity, string commandName, ForkTransitionSearchType forkTransitionSearch = ForkTransitionSearchType.NotFork)
Parameters
Type | Name | Description |
---|
ActivityDefinition | activity | Activity definition |
string | commandName | Name of the command |
ForkTransitionSearchType | forkTransitionSearch | Search filter for fork transitions |
Returns
Type | Description |
---|
IEnumerable<TransitionDefinition> | List of all outgoing command transitions whis specific command name |
GetTimerTransitionForActivity(ActivityDefinition, ForkTransitionSearchType)
Returns the list of all outgoing timer transitions for specific activity TriggerType.Timer
Declaration
public IEnumerable<TransitionDefinition> GetTimerTransitionForActivity(ActivityDefinition activity, ForkTransitionSearchType forkTransitionSearch = ForkTransitionSearchType.NotFork)
Parameters
Type | Name | Description |
---|
ActivityDefinition | activity | Activity definition |
ForkTransitionSearchType | forkTransitionSearch | Search filter for fork transitions |
Returns
Type | Description |
---|
IEnumerable<TransitionDefinition> | List of all outgoing timer transitions |
GetLocalizedStateName(string, CultureInfo)
Returns localized state name in specific culture
Declaration
public string GetLocalizedStateName(string name, CultureInfo culture = null)
Parameters
Type | Name | Description |
---|
string | name | System state name |
CultureInfo | culture | Desired culture. If null then used <xref href="System.Globalization.CultureInfo.CurrentCulture" data-throw-if-not-resolved="false"></xref> |
Returns
Type | Description |
---|
string | Localized state name if exists, else input <code data-dev-comment-type="paramref" class="paramref">name</code> |
GetLocalizedCommandName(string, CultureInfo)
Returns localized command name in specific culture
Declaration
public string GetLocalizedCommandName(string name, CultureInfo culture = null)
Parameters
Type | Name | Description |
---|
string | name | System command name |
CultureInfo | culture | Desired culture. If null then used <xref href="System.Globalization.CultureInfo.CurrentCulture" data-throw-if-not-resolved="false"></xref> |
Returns
Type | Description |
---|
string | Localized command name if exists, else input <code data-dev-comment-type="paramref" class="paramref">name</code> |
GetLocalizedParameterName(string, CultureInfo)
Returns localized parameter name in specific culture
Declaration
public string GetLocalizedParameterName(string name, CultureInfo culture = null)
Parameters
Type | Name | Description |
---|
string | name | System parameter name |
CultureInfo | culture | Desired culture. If null then used <xref href="System.Globalization.CultureInfo.CurrentCulture" data-throw-if-not-resolved="false"></xref> |
Returns
Type | Description |
---|
string | Localized parameter name if exists, else input <code data-dev-comment-type="paramref" class="paramref">name</code> |
GetLocalizedActionName(string, CultureInfo)
Returns localized action name in specific culture
Declaration
public string GetLocalizedActionName(string name, CultureInfo culture = null)
Parameters
Type | Name | Description |
---|
string | name | System action name |
CultureInfo | culture | Desired culture. If null then used <xref href="System.Globalization.CultureInfo.CurrentCulture" data-throw-if-not-resolved="false"></xref> |
Returns
Type | Description |
---|
string | Localized action name if exists, else input <code data-dev-comment-type="paramref" class="paramref">name</code> |
GetLocalizedConditionName(string, CultureInfo)
Returns localized condition name in specific culture
Declaration
public string GetLocalizedConditionName(string name, CultureInfo culture = null)
Parameters
Type | Name | Description |
---|
string | name | System condition name |
CultureInfo | culture | Desired culture. If null then used <xref href="System.Globalization.CultureInfo.CurrentCulture" data-throw-if-not-resolved="false"></xref> |
Returns
Type | Description |
---|
string | Localized condition name if exists, else input <code data-dev-comment-type="paramref" class="paramref">name</code> |
GetLocalizedSchemeName(CultureInfo)
Returns localized scheme name in specific culture
Declaration
public string GetLocalizedSchemeName(CultureInfo culture = null)
Parameters
Type | Name | Description |
---|
CultureInfo | culture | Desired culture. If null then used <xref href="System.Globalization.CultureInfo.CurrentCulture" data-throw-if-not-resolved="false"></xref> |
Returns
Type | Description |
---|
string | Localized scheme name if exists, else just <see cref="!:ProcessDefinition.Name"></see> |
Returns localized comment in specific culture
Declaration
public string GetLocalizedComment(string key, CultureInfo culture = null)
Parameters
Type | Name | Description |
---|
string | key | Key for search localized comment |
CultureInfo | culture | Desired culture. If null then used <xref href="System.Globalization.CultureInfo.CurrentCulture" data-throw-if-not-resolved="false"></xref> |
Returns
Type | Description |
---|
string | Localized value if exists, else input <code data-dev-comment-type="paramref" class="paramref">key</code> |
Clone()
Declaration
public ProcessDefinition Clone()
Returns
Type | Description |
---|
ProcessDefinition | |
Clone(bool, bool, bool)