Page 1 of 1

Trigger the next activity based on the output of routine

Posted: Sun Mar 03, 2013 10:56 pm
by suja.somu
The requirement is to pass the output value of the routine to the next activity, based on the value of the output.

Routine calculates the link count of a particular link of a job. I calculate through an after job subroutine( after job successfully completes).

I have to execute the job based on the link count.

If the linkcount =0 then execute the job
Else if link count > 0 then stop the sequence flow.

how to do this in Sequencer?

Posted: Mon Mar 04, 2013 1:23 am
by ray.wurlod
What does the after-job subroutine do with the result? Simply have the sequence read it from there. Ideally the subroutine will write the result into the job's User Status area.

Posted: Mon Mar 04, 2013 2:54 am
by prasson_ibm
Hi Suja,

Below could be a Sequence design of your requriment:-

JobActivity----->Nested Condition ---------> Job
-----------> Stop seq flow


In nested condition you should calculates the link count of a particular link of a jobActivity. Write below Expression in nested condition:-

LinkStopSeq=Routinename(Jobactivity.Jobname,"StageName","linkName")>0
LinkExeJob=Otherwise

I hope this will work.

Posted: Wed Mar 06, 2013 3:05 pm
by suja.somu
Do I need to use the nested activity? Can the logic be acheived as below.

Job activity1 ------------------------------> Job activity 2


In the triggers of the Job activity can I directly call the DSGetLinkInfo routine

1) LinkStopSeq: Custom( conditional) :
DSGetLinkInfo(Validation_Job,'Stage name', 'linkname', DSJ.LINKROWCOUNT) >0

2) LinkExeJob:Otherwise :


Just a thought, Will this work ?

Posted: Wed Mar 06, 2013 3:35 pm
by ray.wurlod
The Nested Condition activity is one that has no body, only triggers. There is nothing special about its triggers; the same triggers can be used on other kinds of activity as well.

Posted: Fri Mar 08, 2013 12:13 am
by suja.somu
In the sequence job

Job activity1 ------------------------------> Job activity 2


In the triggers of the Job activity I call the DSGetLinkInfo routine

1) LinkExecSeq: Custom( conditional) :
DSGetLinkInfo(Validation_Job,'Stage name', 'linkname', DSJ.LINKROWCOUNT) =0

2) LinkExeJob:Otherwise : Email notification

the link count is zero, still the job2 is nto triggered. instead the email job is triggered .

Can anyone explain why the condition is not getting executed.? where is the issue

Posted: Fri Mar 08, 2013 12:17 am
by chulett
Not a big fan of using routines like that directly in triggers, prefer the Routine Activity stage.

That routine requires a job handle, not a job name, hence the need for a wrapper routine to establish it, get the link count, detach from the job and then pass back the result.