Class ProcessDefinition
OptimaJet.Workflow.Core.Model.ProcessDefinition
Represents object model of a scheme of a process
Namespace: OptimaJet.Workflow.Core.Model
public sealed class ProcessDefinition : BaseDefinitionInheritance
- System.Object
- BaseDefinition
Constructors
public ProcessDefinition() #Properties
Name
Type
CodeActionsInvoker #CodeActionsInvokerCode action invoker with compiled code actions
ExpressionsInvoker #ExpressionsInvokerExpressions invoker
SubprocessNameGetterInvoker #SubprocessNameGetterInvokerSubprocess name getter invoker
ExpressionManager #ExpressionManagerExpression 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 #LocalizationList of localization items Translation
Localizer #LocalizerProvides localized strings. For search used ProcessDefinition.Localization property.
CodeActions #List<CodeActionDefinition>List of code actions CodeActionDefinition
CodeActionsCommonUsings #StringList of common usings separated by ;
AdditionalParams #Dictionary<Object>Additional parameters used by Workflow Designer
CanBeInlined #BooleanThe flag indicates that this scheme can be inlined into other schemes
LogEnabled #BooleanThe 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 #StringTags #List<String>The property contains tags that mark the scheme
ContainsSubprocesses #BooleanReturns true if the scheme contains subprocesses
InitialActivity #ActivityDefinitionReturns 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 #StringRootSchemeId #Nullable<Guid>IsObsolete #BooleanId #GuidTenantId #StringIsSubprocessScheme #BooleanAllowedActivities #List<String>CalendarName #StringMethods
public ActivityDefinition FindActivity(string activityName) #Returns activity with specific name
Parameters
Name
Type
Description
activityNameStringName of the activity ActivityDefinition.Name
Returns
Type
Description
ActivityDefinitionActivityDefinition object
public ActivityDefinition FindSetStateActivity(string stateName) #Returns activity with specific state name and possibility to set the state
Parameters
Name
Type
Description
stateNameStringName of the state
Returns
Type
Description
ActivityDefinitionActivityDefinition object
public CommandDefinition FindCommand(string name) #Returns command with specific name
Parameters
Name
Type
Description
nameStringName of the command CommandDefinition.Name
Returns
Type
Description
CommandDefinitionCommandDefinition object
public ActorDefinition FindActor(string name) #Returns actor with specific name
Parameters
Name
Type
Description
nameStringName of the actor ActorDefinition.Name
Returns
Type
Description
ActorDefinitionActorDefinition object
public ParameterDefinition FindParameterDefinition(string name) #Returns the parameter specific name
Parameters
Name
Type
Description
nameStringName of the parameter ParameterDefinition.Name
Returns
Type
Description
ParameterDefinitionParameterDefinition object
public TransitionDefinition FindTransition(string name) #Returns transition with specific name
Parameters
Name
Type
Description
nameStringName of the transition TransitionDefinition.Name
Returns
Type
Description
TransitionDefinitionTransitionDefinition object
public List<TransitionDefinition> FindTransitions(ActivityDefinition from, ActivityDefinition to) #Returns transitions linked by specified activities
Parameters
Name
Type
Description
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
activityActivityDefinitionActivity definition
forkTransitionSearchForkTransitionSearchTypeSearch 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
activityActivityDefinitionActivity definition
forkTransitionSearchForkTransitionSearchTypeSearch 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
activityActivityDefinitionActivity definition
forkTransitionSearchForkTransitionSearchTypeSearch 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
activityActivityDefinitionActivity definition
commandNameStringName of the command
forkTransitionSearchForkTransitionSearchTypeSearch 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
activityActivityDefinitionActivity definition
forkTransitionSearchForkTransitionSearchTypeSearch 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
nameStringSystem state name
Returns
Type
Description
StringLocalized state name if exists, else input
namepublic string GetLocalizedCommandName(string name, CultureInfo culture = null) #Returns localized command name in specific culture
Parameters
Name
Type
Description
nameStringSystem command name
Returns
Type
Description
StringLocalized command name if exists, else input
namepublic string GetLocalizedParameterName(string name, CultureInfo culture = null) #Returns localized parameter name in specific culture
Parameters
Name
Type
Description
nameStringSystem parameter name
Returns
Type
Description
StringLocalized parameter name if exists, else input
namepublic string GetLocalizedActionName(string name, CultureInfo culture = null) #Returns localized action name in specific culture
Parameters
Name
Type
Description
nameStringSystem action name
Returns
Type
Description
StringLocalized action name if exists, else input
namepublic string GetLocalizedConditionName(string name, CultureInfo culture = null) #Returns localized condition name in specific culture
Parameters
Name
Type
Description
nameStringSystem condition name
Returns
Type
Description
StringLocalized condition name if exists, else input
namepublic string GetLocalizedSchemeName(CultureInfo culture = null) #Returns localized scheme name in specific culture
Parameters
Name
Type
Description
Returns
Type
Description
StringLocalized 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
keyStringKey for search localized comment
Returns
Type
Description
StringLocalized value if exists, else input
keypublic ProcessDefinition Clone() #Returns
Type
Description
ProcessDefinitionpublic ProcessDefinition Clone(bool doNotCloneActivities, bool doNotCloneTransitions, bool doNotCloneCodeActions) #Clones ProcessDefinition object
Parameters
Name
Type
Description
doNotCloneActivitiesBooleanIf True activity list will be empty after cloning
doNotCloneTransitionsBooleanIf True transition list will be empty after cloning
doNotCloneCodeActionsBooleanIf True code actions list will be empty after cloning
Returns
Type
Description
ProcessDefinitionCloned 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
Stringpublic string Serialize() #Returns
Type
Description
Stringpublic XElement SerializeToXElement() #Returns
Type
Description
XElementpublic T GetActivityAnnotation<T>(string activityName, string name) #Get an annotation of an activity
Parameters
Name
Type
Description
activityNameStringActivity name
nameStringAnnotation 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
activityNameStringActivity name
nameStringAnnotation name
Returns
Type
Description
StringJSON representation of annotation's value
public T GetTransitionAnnotation<T>(string transitionName, string name) #Get an annotation of a transition
Parameters
Name
Type
Description
transitionNameStringTransition name
nameStringAnnotation 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
transitionNameStringTransition name
nameStringAnnotation name
Returns
Type
Description
StringJSON representation of annotation's value