Page 1 of 1

I need a help to pass Invocation ID at run time to a Sequenc

Posted: Thu Apr 07, 2011 5:49 pm
by SURA
Hi All

I need a help to pass Invocation ID at run time to a Sequence.


What i am trying to do?
I am triggering a SEQUENCE job (Multiple Instance) using Server Routine (TriggerRoutine). So that the SEQUENCE can trigger different jobs at the same time concurrently.


My Loop Design Approach:

GetJobsToRun --> StartLoop --> TriggerRoutine --> EndLoop

TriggerRoutine --> This will trigger a Sequence Job, which is a multiple instance in which i need to pass Invocation ID to this Sequence.


Say for example:
If i need to trigger the Sequence for the jobs J1,J2,J3. i wish the sequence to run like Seq.J1, Seq.J2, Seq.J3. So the it can be triggered almost(!) at the same time

Thanks in Adcance,
DS User

Posted: Thu Apr 07, 2011 6:22 pm
by chulett
So... what's your actual question? :?

Without knowing how your routine runs jobs, it's hard to provide specific advice. It seems like you know you just include the Invocation ID with a 'dot' after the job name when launching it. How exactly does 'GetJobsToRun' work? Seems to me the best approach would be for it to return a delimited list of invocation ids and then you tell the Loop stage to iterate through that list. A User Variables stage is where you would typically do that work and then pass the list from there to the Loop Start.

Posted: Thu Apr 07, 2011 6:56 pm
by SURA
I amy Sorry, i may not explained properly.

Let me explain .

I will get the list of jobs names to run for the day in a file.
Ex:
J1
J2
J3

I created a job design in Sequence to trigger the above jobs.

Command Activity --> StartLoop --> TriggerRoutine --> EndLoop

Here, TriggerRoutine will always trigger a SEQUENCE job called "StartJob" which is a multiple instance job.

What StartJob will do?

RoutineActivity --> RunAJob --> RoutineActivity

RoutineActivity --> Make an entery in a table about the job start.
RunAJob (Multiple instance) --> Server Job; Code written in Job Control to trigger a job.
RoutineActivity --> Make an entery in a table about the job end.

Expectation:
Jobs J1, J2,J3 will be triggered by the master loop job one by one in each iteration.

Wish:
J1 need to start a seperate instance StarJob.J1
J2 need to start a seperate instance StarJob .J2
J3 need to start a seperate instance StarJob .J3

This is what i am trying to do.

Let me know to do this!
Let me know if it is not a good approach.

Thanks
DS User

Posted: Thu Apr 07, 2011 8:48 pm
by ray.wurlod
You seem a little confused about how to invoke multi-instance jobs. "StartJob", for example, is a constant. Also, the invocation ID follows, rather than precedes the job name.

Best practice is to determine the sequence's invocation ID (probably in a routine activity) and pass that to the Job activities that run J1, J2 and J3.

Posted: Thu Apr 07, 2011 10:11 pm
by SURA
ray.wurlod wrote:You seem a little confused about how to invoke multi-instance jobs. "StartJob", for example, is a constant. Also, the invocation ID follows, rather than precedes the job name.

Best practice is to determine the sequence's invocation ID (probably in a routine activity) and pass that to the Job activities that run J1, J2 and J3.
Hi All

Thanks for your guidance.

I got it and did it.

I will mark it as resolved.

Thanks a lot.

DS User