# Preesm Release 3.6.0 - New Worfklow Task Annotation

We have released Preesm version 3.6.0. Among the fixes and additions, this release introduces a new way to register the workflow tasks using annotations:

@PreesmTask(
name = "Example Task",
inputs = {@Port(name = "PiMM", type = PiGraph.class)},
outputs = {@Port(name = "PiMM", type = PiGraph.class)}
)


The main objective of this update is to centralize the task configuration, that was split in 3 files previously:

• The Java file was holding the behavior;
• The plugin.xml file was registering the task in the Preesm framework, declaring inputs/outputs;
• The doc/workflow_tasks.tex file was holding the task documentation;

With this new annotation mechanism, the tex file becomes obsolete as we can generate the documentation from the annotations. Also, the plugin.xml file will only need to register the plugin as a Preesm plugin only once for all the tasks it contains.

We have updated our documentation on new task creation. Also, complete task reference is now automatically generated. More complete examples can be found in the code base.

Migration from previous mechanism is straightforward:

1. Locate the plugin.xml file declaring the tasks (the file will exhibit errors after update);
2. For each task declaration:
• Copy the content of the ‘type’ field (that is the class name), press CTRL+SHIFT+T, paste the name, press Enter;
• Add the annotation with the content that was in the plugin.xml (id, inputs, outputs);
• Remove the task declaration from plugin.xml
3. Remove the “org.preesm.workflow.tasks” extension and add “org.preesm.commons.plugin” instead (without any child)

Updated: