The Append Prototype to file Hook
The Append Prototype to file Hook
This Hooks listens to a Capsule and appends to a single file each value of Prototype it listens. This way, all the output values for parallel executions of a Task can be appended in one file.
As an example, let us doing an Exploration on a dummy Groovy Task, wich takes an Integer Prototype nb as input, multiplies it by 2 and exposes it as output. This output is hooked and appended in an dummy.txt file :
> create a the dummy Task and add it on the Scene. Add nb as input and output
> create a simple Complete Sampling on the Prototype nb an makes it vary from 1 to 10
> create an Exploration Task, link it to the previously created Sampling, and add it on the Scene
> build a Transition between the Exploration and the dummy Task, and make sure that the Exploration is the starting Capsule.
> Create the Hook by selecting Hook > Append. Input the path of the file in which the Prototype has to be stored. Give it a name and create it.
> click on the output circle of the Dummy Task (the right one). Indeed, the Hooks listen on the outputs of a Task and set the Hook previously built.
> press the build Button
> press the play button

> the dummy.txt file contains the following lines:
nb 2 4 6 8 10 12 14 16 18 20
