Custom Task Guide

Custom Task Guide

Creating & Setting Variables

Creating & Setting Variables

It is common for tasks to create or replace a variable in the project so the variable can later be used in subsequent tasks. For example, if you want to generate an output variable that points to the destination file, you need to set the variable using the following line of code:
project.createOrReplaceVariable(“variableName”, destinationFile);
It is usually a good idea to have an attribute available in the task for the user to specify the name of the output variable.

0 COMMENTS

We’d like to hear from you!