Return to Navigation

Defining Script Trees

This section discusses how to add, configure, modify and delete nodes

Page Name

Definition Name

Usage

Script Tree

RC_BS_TREE

Configure the flow of questions within a script.

Use the Script Tree page (RC_BS_TREE) to configure the flow of questions within a script.

Image: Script Tree page

This example illustrates the fields and controls on the Script Tree page.

Script Tree page

Nodes in Branch Scripts

To add a node to a branch script:

  1. Select the node under which the new node should be added.

  2. Click the button for the type of node that you are adding.

    Different buttons are available depending on the selected node. The following table summarizes the available buttons:

    Selected Node

    Add Answer or Rule

    Add an Any Node

    Add a Question

    Add a Question Group

    Add a Subscript

    Question

    Y

    Y

    -

    -

    -

    Question Group

    -

    Y

    -

    -

    -

    Subscript

    -

    Y

    -

    -

    -

    Script

    -

    -

    Y

    Y

    -

    Answer or Rule

    -

    -

    Y

    Y

    Y

    Any node

    -

    -

    Y

    Y

    Y

    After you click the button, a group box appears with the fields specific to the new node type.

    Note: Answers and rules use the same icon. However, rules are not equivalent to answers. Rules represent branching logic following a question whose answers are dynamically generated.

  3. Enter information specific to the type of node.

    See Configuring Nodes.

  4. Click the Add <Node Type> button.

    The button name varies depending on the type of node that you are adding.

    Clicking this button does not save the component; it updates the script tree with the new node information.

    Alternatively, click the Cancel button to cancel the new node. You also cancel the changes if you navigate to another node (or another page) without clicking the Add <Node Type> button.

Nodes in Linear Scripts

To add a node to a linear script:

  1. Select an existing node.

    If the selected node is the script's root node, the new node is appended to the end of the script.

    If the selected node is an existing question or question group, the new node is inserted before the node.

    If the selected node is an answer, a rule, or an Any node, you cannot add a new node. (You can't insert a node after an Any node because linear scripts do not incorporate branching logic. Nevertheless, you must still insert an Any node after a question group; without the Any node, the script does not run properly.)

  2. Click the button for the type of node that you are adding.

    Different buttons are available depending on the type of node that you selected. The following table summarizes the available buttons:

    Selected Node

    Add Answer or Rule

    Add an Any Node

    Add a Question

    Add a Question Group

    Question

    Y

    Y

    Y

    Y

    Question Group

    Y

    Y

    Y

    Y

    Script

    -

    -

    Y

    Y

    After you click the button, a group box appears with the fields specific to the new node type.

    Note: Answers and rules use the same button. However, rules are not equivalent to answers. Rules represent branching logic following a question whose answers are dynamically generated.

  3. Enter information specific to the type of node.

    See Configuring Nodes.

  4. Click the Add <Node Type> button.

    The button name varies depending on the type of node that you are adding.

    Clicking this button does not save the component; it updates the script tree with the new node information.

    Alternatively, click the Cancel button to cancel the new node. You also cancel the changes if you navigate to another node (or another page) without clicking the Add <Node Type> button.

Access the Script Tree page.

Question Nodes

To configure a question node:

  1. Enter the question name.

  2. (Optional) Enter an action set name.

    The action set includes actions that run when the questioner reaches the question.

  3. Click the Add Question button or the Update Node button to update the tree.

Question Group Nodes

To configure a question group node:

  1. Enter the group name.

  2. (Optional) Enter an action set name.

    The action set includes actions that run when the questioner reaches the question group.

  3. Click the Add Question Group button or the Update Node button to update the tree.

    Note: You must insert an Any node after every question group node.

Configuring Any Nodes

To configure an Any node:

  1. (Optional) Enter an action set name.

    The action set includes actions that run when the questioner reaches the question that follows the Any node.

  2. Click the Add Any button or the Update Node button to update the tree.

Subscript Nodes

To configure a subscript node:

  1. Enter the setID, script name, and effective date of the subscript.

  2. (Optional) Enter an action set name.

    The action set includes actions that run when the questioner reaches the first question of the subscript.

  3. Click the Add Script button or the Update Node button to update the tree.

Answers

To add answers:

  1. Review the answers in the default answer set.

    When you click the Add Answer button for a question that is associated with a static answer set, the Answer Set Information group box displays the answer set name that is associated with the question.

    Click the Answer Set Detail link to review or modify the answer set definition in a new browser window.

  2. Select the answers to add to the tree.

    The Answers grid lists each answer value in the answer set.

    Use the Select check box to select the answers to include in the tree.

  3. (Optional) Enter an action set name for one or more selected answers.

    Each answer is individually associated with an optional action set. The actions in an action set run (or are available to be run manually) when the questioner selects the associated answer.

  4. Click the Add Answers button or the Update Node button to update the tree.

    Each selected answer is added to the tree.

    To add more answers (if you didn't add an entire answer set), click the Add Answer button again.

Rules

To add rules:

  1. Select a rule set name.

    When you click the Add Answer button for a question that is associated with a dynamic answer set, the Rule Set Information group box appears.

    Click the Rule Set Detail link to review or modify the rule set definition in a new browser window.

  2. Review the list of rules in the rule set.

    When you select a rule set, the Rules grid shows each rule name in the rule set.

  3. Select the rules to add to the tree.

    Use the Select check box to select the rules to include in the tree.

  4. (Optional) Enter an action set name for one or more selected rules.

    Each rule is associated with an optional action set. The actions in the action set run if the rule is true. Actions associated with rules run automatically, regardless of whether the Action Triggered Automatically check box is selected on the Action Set page. These rules run when the questioner moves to the question that follows the rule.

  5. Click the Add Rules button or the Update Node button to update the tree.

    Each of the selected rules is added to the tree as a rule node.

    To add more rules (if you didn't add the entire rule set), click the Add Answer button.

Access the Script Tree page.

Existing Nodes

To modify an existing node:

  1. Select the node.

    A group box appears with the fields specific to the node type.

  2. Modify the information in the group box.

    The fields in the group box vary according to the type of node, but normally you change only the action set associated with the node.

  3. Click the Update Node button to update the selected node based on the modifications.

    Clicking this button does not save the component; it updates the script tree with the new node information.

    Alternatively, click the Cancel button to cancel your changes. You also cancel the changes if you navigate to another node (or another page) without clicking the Update Node button.

Access the Script Tree page.

To delete a node:

  1. Select the node.

  2. Click the Delete the Current Node button next to the selected node.

    Clicking this button deletes the current node and all of its children. However, the root node is never deleted. The button is available for any type of node.

Access the Script Tree page.

To create a new script object as you build the script tree:

  1. Access the configuration group box for a node.

    The group box appears when you add a new node or select an existing node.

  2. Click the Create <Object Type> button.

    The name of the button depends on the type of object that you are configuring. The button is available when you work with questions, question groups, answer sets, and rule sets. It is not available when you work with scripts (either the root node or a subscript) or with Any nodes.

    When you click the button, the system opens a new browser window with the page where the object is defined.

  3. Create the object.

    Define the object, save it, and then close the new browser window to return to the Script Tree page.

Access the Script Tree page.

To preview and test a script:

  1. In the Select Action field, select either Execute Script or Execute Self-Service.

  2. Click the Go button to run the script in the selected mode.

    Note: The variables that come from an underlying component (for example, case-specific variables) do not work in test mode, because the underlying component is not available.

  3. When testing is complete, click the Return to Tree Definition link on the Execute Script page.

To clone a script:

  1. In the Select Action field, select Clone Script.

  2. Click the Go button.

    The Clone Script page appears.

  3. Enter the setID and name for the new script.

    The new script inherits the effective date of the original script.

  4. Click the Clone Script button.

    The system creates the new script.

    Access the new script by clicking Return to Cloned Script or return to the original script by clicking Return to Define Tree.