Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


TheDon
2014-03-11T00:05:24Z
Hello all,

We are trying to implement global notifications that are not bound to an individual job. I've been able to get this to work within notifications, except for one small issue.

The job basically downloads from our sFTP to our file server. On success it sends an email to our analytics team with all the usual stuff, run at this time with this result.

What I can't get working is a list of files that were downloaded in the fist task of the job. The task list is as follows:

1. Download from sFTP
2. PGP decrypt
3. Move to File server

Below is the html code for my notification:

<html>
	<head>
		<title></title>
	</head>
	<body>
		<p>
			<u style="font-size: 18px; text-align: center; color: rgb(178, 34, 34);"><strong>{JOB(Active|Name)}</strong></u></p>
		<p>
			<span style="font-size:14px;">SFTP Transfer {JOB(Active|Name)} was run at {JOB(Active|LastExited|d/MM/yyyy HH:mm)}. The result is <b>{TASK(PrevTask,ExitCodeDesc)}</b> Details below:</span></p>
		<p style="margin-left: 40px;">
			<span style="font-size:14px;"><strong style="font-size: 14px;">Downloaded File(s):</strong></p>
		<p style="margin-left: 40px;">
			<span style="font-size:14px;">{TASK(Active,Result.DownloadedFilesNames)}</p>
		<p>
			<span style="font-size:14px;">Please contact &nbsp;<a href="mailto:blah?subject={JOB(Active|Name)}%20Failure">blah</a>&nbsp;if any issues with the file(s).</span></p>
		<p>
			&nbsp;</p>
	</body>
</html>


What isn't working is {TASK(Active,Result.DownloadedFilesNames)}. I've even tried using a list files task and using stdout, but with no luck.

Any help would be great.
Sponsor
Forum information
Support
2014-03-11T08:24:12Z
Try changing it to:

{TASK(PrevTask,Result.DownloadedFilesNames)}

From version 7.x all Notifications inherit from Tasks which means that Active point to the Notification itself and not the previous Task.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
TheDon
2014-03-11T22:09:10Z
Thank you.

Changed the code and got the following:

(No match on Variable: TASK(PrevTask,Result.DownloadedFilesNames) for this task type)
TheDon
2014-03-12T01:27:14Z
My post above was an error message.

So it doesn't actually display the file list.
Users browsing this topic
Scroll to Top