Hi Bill,
I am facing to two issues when tackling a set of steps.
I have three steps and each of them executes a batch process which populates output respectively.(the output will not be send out in the step until the fourth step)
The execution of fourth step is not dependent on the previous three steps, however, the exit code of the fourth step will take all results of previous three steps into account.
The fourth step moves all three outputs from previous steps to a designated archive location (the step also create a new folder named with current system timestamp), and most important is to send out email notification with outputs per the exit code.
I created a variable called 'RC' - integer - value 0. My idea is to set this variable accordingly after each of three steps. On the fourth step, I'll use a VB script to evaluate RC, True to enable step succeed and false to enable step failed. It will be a very simple script as below.
Now I am facing two issues:
1. the script does not seem work to evaluate RC -> Is my VB script wrong?
2. the fourth step does not attach the reports I moved to the designated archive location in email notification. -> I checked "include subdirectory" and "attach files since the job started".
Public Overrides Function Run() As Object
If adTempus.JobVariables("RC") = 0 Then
'Return True to trigger the job, or False to not trigger the job.
Return True
Else
Return False
End If
End Function