Page 1 of 1

Problem with triggers in the Execute Command Activity stage

Posted: Wed Aug 21, 2013 8:57 pm
by JPalatianos
Hi,
We have a need to send different emails (subject, body and attachments) based on a file condition.

We have a simple sequence job with a Execute Command Activity with two links both going to Notification Stages.

The command is: "wc -l"
with the following as the parameter:
"D:\CRM\work_files\Paris_ctr.txt" | awk '{ printf "%s", $1 }'

The Dslink10 trigger is:
Expression Type: ReturnValue - (Conditional)
Expression: >0

The Dslink14 trigger is:
Expression Type: Otherwise
Expression: N/A

No matter what is returned from the command we always go to the Otherwise DsLink14

When I check the director Log I see the appropriate output:
TestingSequnceConditions_1..JobControl (@Execute_Command_12): Executed: wc -l "D:\CRM\work_files\Paris_ctr.txt" | awk '{ printf "%s", $1 }'
Reply=0
Output from command ====>
1
Since 1 is > 0, We were thinking we should go to the conditional Dslink10 but we always go to the otherwise link regardless of the output.

Any thoughts why we are seeing this behavior.

Thanks - - John

Re: Problem with triggers in the Execute Command Activity st

Posted: Wed Aug 21, 2013 9:55 pm
by SURA
Hi

You given just > 0
or
Activity variable, stagename.$CommandOutput > 0

Posted: Thu Aug 22, 2013 12:36 am
by ray.wurlod
Return value is the exit status.

You probably need to test the value of $CommandOutput activity variable.

Posted: Thu Aug 22, 2013 5:26 am
by JPalatianos
Hi Sura,
AFter changing the expression to:
Execute_Command_12.$CommandOutput > 0

The job works as expected.

Thank You Very Much for your assistance!!!!