Class SubstitutionsProcessor
OptimaJet.Workflow.Core.CodeActions.SubstitutionsProcessor
Expands process parameter placeholders embedded in action, condition, and rule parameters, annotation values, and other text evaluated for a process instance.
Namespace: OptimaJet.Workflow.Core.CodeActions
public static class SubstitutionsProcessorMethods
public static Task<(string newValue, bool wasSubstituted)> SubstituteAsync(string value, ProcessInstance processInstance) #value with values resolved through processInstance.Parameters
valueStringReturns
Exceptions
Exceptionjson.RegexMatchTimeoutExceptionRemarks
Placeholders use the @ParameterName or @(ParameterName) form recognized by RegexPattern.ParameterAndMaybeQuotes. Parentheses can delimit a placeholder from adjacent text and allow spaces in parameter names. Dotted names resolve values within structured parameters.
A nonempty format after : is passed to the value's ToString(string) overload. The special json format serializes the value with ParametersSerializer. Matching single or double quotes immediately around the entire placeholder are consumed as part of the match: ordinary replacements are emitted in double quotes, while a json replacement is inserted as a serialized JSON value.
Example
Order @Order.Id was created on @(CreatedAt:yyyy-MM-dd) substitutes a nested parameter value and a formatted date. @(Payload:json) inserts the serialized parameter value.