Adding text fragments
The template document you have just added to your decision tree model is where you will be adding text fragments to. The easiest way to create text fragments is to first fill your document with the desired texts. In these texts you can mark where certain variables from your decision tree model have to be entered.
A simple example illustrates this. We create a decision tree model that asks for the user’s name and birthday. The decision tree model has three nodes:
The nodes will have the following tasks:
startintroduces the decision tree model.
informationhas two questions asking the name and date of birth of the user. It also contains the formula
age(). This calculates the age of the user based on the birthday input.
documentwill create and show the document
Let’s say we have a document that contains the following paragraph:
To add a text fragment, click on the node document and select
Actions > Text fragment. Now you can add text and give the text fragment a name (in this example ‘welcome_greet’). Next, cut the text from your Word file to the text block field. It is important that you remove it from the Word file, otherwise it will end up being shown twice.
Now, we will add the variable that represents the name of the user. Select ‘[name]’ in the text fragment window and click on the or press
[F6]. More information on the finder can be found here.
Select the question which asks for the name of the user (
information.name). Double-click it and it will be added to your text fragment. If everything is done correctly, the text ‘name’ will be replaced by something like:
Repeat the same process for the age. Your text fragment should look like this:
It is possible to use a variable as an identifier. That way you can dynamically create a description for text fragments. If the Editor thinks you mean a variable, it
will tell you by warning you in de text ‘Identifier’ above the input-field.
Only a fully qualified name (graph.node.data) will be seen as variable. If you do not want this, you can just add quotes, in this example,
'main.start.question3' in stead of
These were the basics for adding text fragments. In the next section, we discuss how to make sure your text fragments end up in your Word document.