HandlebarsTemplate

Generate String value or payload using Handlerbars template

Table 1. Supported parameters
Parameter Required Data type Details
destination Yes object Specify the destination of the string rendered using the template
input No array List of the AssemblyContext data to make available for the template. All items must be unique.
template Yes object Handlebar template to provide the value
Table 2. Options for destination
Parameter Required Data type Details
messageBody Yes object Set the body of a specified message
variable Yes object Set a variable in the Assembly Context
distributedVariable Yes object Set a variable on a remote database
Table 3. Options for input
Parameter Required Data type Details
variables No enum (of string) Use variables in the template to access variables from AssemblyContext
message Yes object Use message in the template to access an object representing the specified message containing body, headers, method, version, uri (if message is a request), and status (if message is response) keys. If more than one message is specified as input, access each message by its name as a field in message. body is set only if payload of the specified message is parsed as JSON. headers is an array of objects with key and value fields. status is an object with code and reason fields.
Table 4. Options for template
Parameter Required Data type Details
  No string Inlined template as a text
moduleRef Yes object Reference to a file within Runtime modules containing the template
Table 5. Nested properties inside moduleRef
Parameter Required Data type Details
name Yes string Name of module
path Yes string Relative path within named module