Routine Activity-Triggers
Moderators: chulett, rschirm, roy
Routine Activity-Triggers
Hi
I have a custom routine for dateconversion. When I run the sequence -
ExecuteCommand Activity-Routine Activity-Execute command Activity.I am calling my routine in Routine Activity.
It works fine when I trigger to Unconditional Expression type.But routine does not work when I give Ok condition Trigger.
The warning I get is:
@GetExpirationDate): Routine DSU.GetExpirationDate did not finish OK, return code = '20072412'
Thanks!
I have a custom routine for dateconversion. When I run the sequence -
ExecuteCommand Activity-Routine Activity-Execute command Activity.I am calling my routine in Routine Activity.
It works fine when I trigger to Unconditional Expression type.But routine does not work when I give Ok condition Trigger.
The warning I get is:
@GetExpirationDate): Routine DSU.GetExpirationDate did not finish OK, return code = '20072412'
Thanks!
Re: Routine Activity-Triggers
That's because your function 'GetExpirtationDate' returns the date string '20072412'. Any function that returns a non-zero value is NOT considered to have finished successfully.
gateleys
Re: Routine Activity-Triggers
What to do to make my job work?
Re: Routine Activity-Triggers
Assuming that your routine is to be considered successful if it returns a date in the format YYYYDDMM, then you can use the following trigger in your RoutineActivity to the next command stage-PRIYARAJ wrote:What to do to make my job work?
Len(YourRoutineActivityStageName.$ReturnValue) = 8
or
YourRoutineActivityStageName.$ReturnValue > 100
You can have one more trigger ... set to 'Otherwise' where you may handle your exception (This is triggered if the return value of the routine is not of length 8 or value may be -1 ... that is routine failed).
gateleys
-
- Charter Member
- Posts: 143
- Joined: Thu Nov 04, 2004 6:53 am
This may not neccessarily be true since we have not yet seen the complexity of the OP's routine. If it is simple and can be handled by a single expression, then yes, you can use the UserVariable stage. However, if that is not the case, then you have to use the RoutineActivity stage.vcannadevula wrote:You can also use UserVariables activity instead of Routine Activity stage.
gateleys
Thank you for your replies !
I tried the trigger which gateleys posted.The job worked fine but gives the warning.When I unchecked the option Log Warnings after activities that finish with status other than ok in Job properties,the sequence runs without any warning.
Also,I will try using UserVariable Activity & let you know.
Thanks !
I tried the trigger which gateleys posted.The job worked fine but gives the warning.When I unchecked the option Log Warnings after activities that finish with status other than ok in Job properties,the sequence runs without any warning.
Also,I will try using UserVariable Activity & let you know.
Thanks !