# TaskUtils Methods

A `TaskUtils` object is an operation to perform with a conversation task. This object is the input to the function that you use for your conversation task (you specify the function to use in your task configuration JSON file).

If you have a `TaskUtils` object, you can call its methods by using the '`:`' operator. For example:

    taskUtils:getSessionVar("USER_NAME")

Method | Description
--- | ---
ask | Sends a question to Answer Server answer systems.
clearAllSessionVars | Deletes all the session variables from the conversation session.
clearAllTaskVars | Deletes all task variables from the current task.
clearSessionVar | Deletes a specified session variable from the conversation session.
clearTaskVar | Deletes a specified task variable from the current task.
getPrompts | Gets the list of prompts that the current task will return.
getSessionVar | Gets the value of a specified session variable.
getTaskId | Gets the ID of the current task.
getTaskVar | Gets the value of a specified task variable.
getUserText | Gets the user input text.
getValidator | Gets a validator object that you can use to validate a string.
markAsValid | Marks a string as valid text.
setNextTask | Sets the ID of the task to run next.
setPrompts | Sets a list of prompts to return in the current task.
setSessionVar | Sets the value of a specified session variable.
setTaskVar | Sets the values of a specified task variable.

© Copyright 2016-2020 Micro Focus or one of its affiliates | Send documentation feedback Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a mail client, and then send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm