Skip to main content
Kinetic Community

Appendix B - Task Variables

Task Engine templates are configurable sections of text that are capable of substituting in various engine variables.  Below is a description of each of the available templates and a which engine variables are available to those templates. All templates have access to the application, engine, and loop variables.  The name of loop variables are defined in the loop head node and not included in the below list. Available Variables: @answers, @appconfig, @base, @dataset, @template, @results

Details

Connector Templates

Within the Task Builder, connector templates are configured by double clicking on the connector.

Additional Variables: @trigger

Node Message Templates

Within the Task Builder, node message templates are configured on the Messages tab of a visible task node. 

Additional Variables: @task, @trigger

Node Parameter Templates

Within the Task Builder, node parameter templates are configured on the Parameters tab of a task node.

Additional Variables: @trigger

Task Templates

Task Templates define the XML string that is passed to a task handler during initialization.  Unlike the previous three templates, Task Templates are not defined within the Task Builder.  Instead, the template is defined within the task handler process/node.xml file.  The same template syntax is used, with the exception that the '<' and '>' characters are encoded as '&lt;' and '&gt;' respectively.  This ensures that the process/node.xml file remains valid XML.

Additional Variables: @info, @parameters, @task, @trigger

Variables

Within the engine, multiple variables are available to help control process flow.  There are two places that these engine variables, also referred to as bindings, are used.  The first is in templates by the Task Builder, and the second is within a task handler's process/node.xml file.  Below is a description of each of the engine variables.  Most of these variables are built into the Task Builder template menus, however it is beneficial to understand what variables are available to what templates.

Application Variables

A Kinetic Task tree is typically initialized by the submission of a Kinetic Request service item, referred to as the base request.  In order to interact with the base data, the following five variables are exposed to the Task Engine.

@answers

The @answers variable holds information about the submitted answers of the Kinetic Request base record.  This variable is represented as a hash that maps the question menu labels to the submitted answer values.  Each service item is going to have different answers, so the keys for the @answers hash will be specific to each task tree.

@appconfig

The @appconfig variable holds information about the backend configuration of Kinetic Request.  This variable is represented as a hash that maps application configuration names, as defined in the Kinetic Request Configuration Manager form, to the configuration values.  Below is a list of application configuration keys that can be used with the @appconfig variable.

·          Default Web Server

·          Mid-Tier Server Name

@base

The @base variable holds information about the associated Kinetic Request base record.  This variable is represented as a hash that maps database field names from the KS_SRV_CustomerSurvey form to the field values of the associated base record.  Below is a list of database field name keys that can be used with the @base variable.  The most commonly used fields are displayed in bold.

·          AllowAnonymous

·          Anonymous_URL

·          ApplicationName

·          ApplicationName2

·          Assigned To

·          Assigned To2

·          AssigneeGroup

·          AssigneeGroup2

·          Attribute1 Attribute64

·          Authentication_Type

·          Authentication_URL

·          Category

·          CategoryInstanceID

·          CombineAnswers

·          Company ID

·          Company Name

·          Contact ID

·          Contact_Info_Value

·          Create Date

·          CustomHeaderContent

·          CustomerNotificationMethod

·          CustomerSessionInstanceID

·          CustomerSurveyID

·          CustomerSurveyInstanceId

·          CustomerSurveyStatus

·          Data_Set

·          Data_Set2

·          DeployNow

·          Display_Name

·          Display_Page

·          Expiration Date

·          First Name

·          Form

·          Header_Text_Style

·          IP_CallerID_Value

·          IntegrationID

·          IntegrationOperationID

·          Internal_Notes

·          IsAnonymous

·          Last Modified By

·          Last Modified By2

·          Last Name

·          LastReminderID

·          Last_Status

·          Locale

·          LockedBy_ARSID

·          LockedBy_Display

·          LookupValueId

·          Management Group

·          MessageTemplateInstanceID

·          Message_Template

·          MidTier_Server

·          Modified Date

·          NextCustSurvey_InstanceID

·          NextSurvey_InstanceID

·          NotesForCustomer

·          Opt Out

·          OriginalTemplateInstanceID

·          OriginatingID

·          OriginatingID_Display

·          PageInstanceId

·          PossibleScore

·          Priority

·          Request ID

·          Request_Closed_Date

·          Request_Status

·          Require_Authentication

·          Score

·          Score_Percentage

·          Short Description

·          Short Description2

·          Source

·          SpecialTemplate

·          SubmissionAssigneeGroup

·          Submit Type

·          Submitter

·          Submitter2

·          SurveyCompletedDate

·          SurveyID

·          SurveySentDate

·          SurveyTemplateRequestID

·          SurveyTemplateStatus

·          Survey_Background_Color

·          Survey_Context

·          Survey_Description

·          Survey_Method

·          Survey_Method2

·          Survey_Template_Name

·          TemplateCreateDate

·          TemplateModifiedDate

·          Template_Locked

·          Type

·          UseTaskEngine

·          ValidationStatus

·          Version

·          id

·          ng_ApprovalFieldID

·          ng_ApprovalValue

·          ng_DenialCommentFieldID

·          ng_EndpointSecret

·          submitScript

·          surveyTemplateInstanceID

@dataset

The Kinetic Request application allows for the creation of multiple configurable base record datasets.  These datasets define a mapping of simplified labels to a subset of base record field values.  This provides a mechanism for naming generic fields, such as the attribute fields, or providing easier to recognize names for the base data.  In the Kinetic Task Engine, the @dataset variable is bound as a hash that maps the dataset labels to the field values of the associated base record.  Below is a list of dataset labels for the SYSTEM_DEFAULTS dataset, which is the default dataset for Kinetic Request service items.

·          Application Name

·          Assignee Group

·          Attribute 1 → Attribute 64

·          Category

·          Company ID

·          Company Name

·          Contact ID

·          Customer Session Instance ID

·          CustomerSurveyInstanceId

·          Data Set

·          Expiration Date

·          First Name

·          Form

·          IP CallerID Value

·          Integration Operation ID

·          IntegrationID

·          Internal Notes

·          IsAnonymous

·          Last Name

·          Last Reminder ID

·          Locale

·          Lookup Value Id

·          MidTier Server

·          Next Cust Survey Instance ID

·          Opt Out

·          Originating ID

·          Originating ID-Display

·          Page Instance ID

·          Possible Score

·          Request ID

·          Score

·          Score Percentage

·          Short Description

·          Status

·          Submission ID

·          Submitter

·          Survey Completed Date

·          Survey Instance ID

·          Survey Method

·          Survey Sent Date

·          Survey Template Name

·          Type

@template

The @template variable holds information about the Kinetic Request service item template associated to the base request that initialized the task tree.  This variable is represented as a hash that maps KS_SRV_SurveyTemplate field names to the associated record's values.  Below is a list of template field name keys that can be used with the @template variable.

·          Allow Anonymous

·          Anonymous Url

·          *Attributes

·          Data Set

·          Description

·          Display Name

·          Id

·          Message Template

·          Message Template Id

·          Name

·          Service Catalog Id

·          Service Catalog Name

·          Status

·          Type

* Note: The @template[‘Attributes’] value is a special for the @template hash.  The value is also a hash and maps attribute names to attribute values.  If there is more than one attribute with the same name, the hash value will be an array of attribute values.

Engine Variables

In order to interact with the current task tree instance, the Kinetic Task Engine exposes execution information through a series of variables.  These variables include @results, @task, and @trigger.

@results

The @results variable holds the results of previously executed task nodes.  When a task handler is executed, the task handler returns an XML string that represents the return variables for that task node execution.  The @results variables is represented as a hash that maps the result names to the result values of all previously executed task instances.

task

The @task variable holds information about the current task node instance.  This variable is represented as a hash that maps the task node instance attribute names to the attribute values.

·          Deferral Token

·          Deferred Variables

·          Description

·          Id

·          Loop Index

·          Name

·          Node Id

·          Parent Loop Index

·          Return Variables

·          Source

·          Source Id

·          Status

·          Task Definition Id

·          Tree Id

·          Tree Name

·          Visible

@trigger

The @trigger variable holds information about the task trigger instance that initialized processing of the currently executing branch.  This variable is represented as a hash that maps the trigger instance attribute names to the attribute values.

·          Action

·          Deferral Token

·          Deferred Variables

·          Description

·          Engine Identification

·          Id

·          Loop Index

·          Message

·          Node Id

·          Source

·          Source Id

·          Status

·          Tree Id

Loop Variables

Loop variables are available to all four of the template types.  These names of these variables are defined by system loop head task handlers.  For example, if a loop head node was specified with “index” as the ‘Variable Name’ parameter value, the @index variable would be exposed to the templates.

Task Node Variables

When executing specific task nodes, the Task Engine needs to pass task node configuration information to the task handler.  In order to do this, the @info and @parameters variables are used.  These variables are only accessible in the taskDefinition/handler element of the process/node.xml task handler file.

@info

The @info variable is a hash of task info item names to values.  Task info items provide a mechanism for defining configuration values that apply to all task nodes associated with the task handler.  Info items are managed in the Kinetic Task Admin Console.

@parameters

The @parameters variable is a hash of task node parameter names to values.  These parameters are specified on the Parameters tab of a task node in the Task Builder.