Class ParameterDefinitionWithValue
OptimaJet.Workflow.Core.Model.ParameterDefinitionWithValue
Represents a process parameter by combining its definition with its current ParameterDefinitionWithValue.Value.
Namespace: OptimaJet.Workflow.Core.Model
public sealed class ParameterDefinitionWithValue : ParameterDefinitionType Hierarchy
- BaseDefinition
- ParameterDefinition
- ParameterDefinitionWithValue Current type
- ParameterDefinition
Properties
public override string Name { get; set; } #Gets or sets the name of the process parameter.
[JsonConverter(typeof(StringEnumConverter))] [JsonConverter(typeof(SystemStringEnumConverter<ParameterPurpose>))] public override ParameterPurpose Purpose { get; set; } #Gets or sets the ParameterPurpose that controls how Workflow Engine manages and stores the process parameter.
[JsonConverter(typeof(NewtonsoftStringTypeConverter))] [JsonConverter(typeof(SystemTextStringTypeConverter))] public override Type Type { get; set; } #Gets or sets the Type used for ParameterDefinitionWithValue.Value.
public object Value { get; set; } #Gets or sets the current value of the process parameter.
Remarks
When ParameterDefinitionWithValue.IsImplicit is false, assigning a non-null value also assigns the result of object.GetType() to ParameterDefinitionWithValue.Type if the underlying parameter definition accepts changes. Every assignment clears the cached dynamic representation and marks the process parameter as modified.
public bool IsImplicit { get; } #Gets a value indicating whether the parameter type is not defined in the process scheme.
public bool IsExternal { get; } #Gets a value indicating whether this instance represents an external parameter obtained from an IWorkflowExternalParametersProvider.
public Type OriginalExternalParameterType { get; } #Gets the original Type of an external parameter value supplied by an IWorkflowExternalParametersProvider.
Remarks
Workflow Engine passes this type to DynamicParameter.Restore(Type) before writing a dynamically represented value through the IWorkflowExternalParametersProvider.
Methods
public ParameterDefinitionWithValue Clone() #Creates a copy of this process parameter.
Returns
Type
Description
ParameterDefinitionWithValueA new ParameterDefinitionWithValue with the same ParameterDefinitionWithValue.Value reference and a cloned underlying parameter definition, if one is present.
Exceptions
Type
Description
NullReferenceExceptionBaseDefinition.DesignerSettings is null on this instance or on the underlying parameter definition.
Remarks
The cached dynamic representation is not copied. The returned parameter is marked as modified and as not yet present in the persistence store.
public string SerializeValueToJson() #Returns the serialized representation of ParameterDefinitionWithValue.Value.
Returns
Type
Description
StringIf ParameterDefinitionWithValue.IsImplicit is true, the result of calling object.ToString() on ParameterDefinitionWithValue.Value. Otherwise, the method returns the JSON produced by ParametersSerializer.Serialize(object, Type), which is null when ParameterDefinitionWithValue.Value is null.
Exceptions
Type
Description
NullReferenceExceptionpublic object GetDynamicValue() #Gets ParameterDefinitionWithValue.Value in the runtime representation used for implicit parameter data.
Returns
Type
Description
Objectnull when ParameterDefinitionWithValue.Value is null; the result of DynamicParameter.ParseJson(string) when ParameterDefinitionWithValue.IsImplicit is true; otherwise, ParameterDefinitionWithValue.Value unchanged.