Appearance
Liquid Expressions
The following Liquid expressions are supported:
Common Variables
Workflow Variables
Use the following syntax to access a workflow variable:
{{ Variables.NameOfVariable }}
For example, given a workflow variable called FirstName
with a value of "Alice"
, the expressionHello {{ Variables.FirstName }}
will result in Hello Alice
.
Input
Input values can be accessed using the following syntax:
{{ Input }}
Activity Output
To access a named activity's output, use the following syntax:
{{ Activities.SomeActivityName.Output }}
CorrelationId
Returns the correlation ID (if any) of the currently executing workflow.
{{ CorrelationId }}
WorkflowInstanceId
Returns the workflow instance ID of the currently executing workflow.
{{ WorkflowInstanceId }}
WorkflowDefinitionId
Returns the workflow definition ID of the currently executing workflow.
{{ WorkflowDefinitionId }}
WorkflowDefinitionVersion
Returns the workflow definition version of the currently executing workflow.
{{ WorkflowDefinitionVersion }}
Common Filters
json
A liquid filter that renders the specified value as a JSON string.
{{ Input | json }}
Example output:
{
"SomeDocument": {
"Title": "About Workflows"
}
}
base64
A liquid filter that renders the specified value as a bas64 representation. The value is first converted to a string. If the value is an object, array, dictionary or datetime, it is first serialized using JsonConvert.SerializeObject
before being encoded as base64.
{{ "Some string value" | base64 }}
Example output:
U29tZSBzdHJpbmcgdmFsdWU=
Workflow Filters
workflow_definition_id
Translates the specified workflow name or workflow tag into a workflow ID. This is useful for activities such as RunWorkflow
which require a workflow ID to run.
Usage:
{{ "SomeWorkflowName" | workflow_definition_id }}
{{ "SomeWorkflowTag" | workflow_definition_id: tag }}
HTTP Variables
Request
Provides access to various properties on the current HTTP Request object:
{{ Request.QueryString }}
{{ Request.ContentType }}
{{ Request.ContentLength }}
{{ Request.Form }}
{{ Request.Protocol }}
{{ Request.Path }}
{{ Request.PathBase }}
{{ Request.Host }}
{{ Request.IsHttps }}
{{ Request.Scheme }}
{{ Request.Method }}
HTTP Filters
signal_url
A liquid filter that generates a fully-qualified absolute signal URL that will trigger the workflow instance from which this function is invoked.
Example:
{{ "MySignal" | signal_url }}
Example output:
https://localhost:5001/signals/trigger/{some base64 token}