Page 1 of 1

Sequencer-Routine Activity-Triggers

Posted: Thu May 12, 2005 7:56 am
by subramanya
Hi,
In a Sequencer job, I am executing a routine in the routine activity stage and later a job. If Triggers -- Expression Type is specified as "OK - (Conditional) in the routine activity stage then my job is not triggerred. If you give "Unconditional" or "Failed-(Conditional)" then the job will be triggerred. This leads to the conclusion that the routine is invalid. But the routine is fine. What could be the problem?

Also no entries are made in the job log about routine activities(Like "Starting routine stage activity" or "Finishing routine stage activity"

Thnx
Subs

Posted: Thu May 12, 2005 8:11 am
by chulett
What kind of values does the routine return? Anything other than a zero is considered to be a failure, so you have to take that fact into account when designing the triggers or error handling.

Posted: Thu May 12, 2005 8:52 am
by subramanya
Hi,
The routine is getting the time when the job last run. What i wanted was if the routine executed without any error, then the job should execute with the parameter retured from that routine. But now it looks that I shud give "Unconditional" in the Expression Type. Is there any method to make sure that the routine is excuted properly.
Thnx a lot for the info.

Thnx
Subs

Posted: Thu May 12, 2005 5:35 pm
by ray.wurlod
Use a Custom trigger and detect that something other than was requested was returned. For example Len(returnvalue) <> 19 (assuming that it returns an ISO 8601 TimeStamp).

Posted: Thu May 12, 2005 8:12 pm
by chulett
Or specifically trap your errors in the Routine and return something easily recognizable. I usually pass back negative numbers as long as normal returns can never be negative and them check for that in a custom trigger. Or as Ray noted, check the size of what you return.