Preparing a Job to Be Templatized

Before you create a Template based on a job, you may need to modify the job to make it easier to reuse.

Use Template Parameters

If there are values the user will need to change in the job after it is created, replace them with Template Parameters whenever possible. For example, if your job has a Web Request task that downloads a Web page, the template user will probably need to download a different URL than you do. Instead of leaving your URL in the job and requiring the user to change it, replace the URL with a Parameter. For example, if it the Web request's target URL was set to

http://www.arcanadev.com

change it to a parameter value such as

{URL to Fetch}

(be sure to include the curly braces). Then when you create the template using the Create Job Template Wizard, you will define the Parameter, setting the "Text to Replace" to "{URL to Fetch}" and the Prompting Text to something like "Enter the URL to download".

Now the user will be prompted for the URL when creating a job based on the template, and adTempus will plug the correct value into the job.

Use Job Variables

To make management of jobs as simple as possible, go beyond Template Parameters and use Job Variables for things such as file paths and URLs that the user may need to change in the future.

Extending the previous example, you can make the job easier to manage by replacing the URL with a Job Variable:

%URLToFetch%

Then create a new job-level Job Variable named "URLToFetch" and set its value to the Parameter value "{URL to Fetch}".

Now when the user creates a job based on the template, adTempus will prompt for the URL and create a job where the "URLToFetch" Job Variable is set to the value entered by the user.

If the user needs to change the URL in the future, she can do so by simply modifying the value of the Job Variable, rather than needing to edit the step that executes the request.

Remove Notification Recipients

If your job sends notification messages, in most cases you don't want to deliver a Template that uses your notification recipients (unless the template user will be creating a job that notifies the same people). So before you create a Template, you should edit your job to remove the recipients from any Notification Actions, Notification Tasks, or File Capture Actions in the job.

Document the Job

Add brief comments to the job, steps, triggers, Responses, scripts, etc., to explain what the various pieces do. This will help the template user to understand how the job works and to make changes to it if required.