Page 1 of 1

how to use DSJobInvocationId

Posted: Fri Jan 27, 2012 2:51 pm
by ashishm
Hi,

I have a User Variable Activity Stage in a Sequence job, which is using the DSJobInvocationId. My question is how to pass a value to DSJobInvocationId when I run that Sequence job. For example, the Sequence job name is S1. Thank you.

Posted: Fri Jan 27, 2012 3:22 pm
by ray.wurlod
You don't pass the value directly to DSJobInvocationId because this is a macro that invokes the DSGetJobInfo() function. The invocation ID is set when a multi-instance job is submitted for running.

Posted: Fri Jan 27, 2012 4:13 pm
by ashishm
Thanks, so in our project, I see in the scheduler, the sequence job S1 is called as S1.<some text>, and looks like the DSJobInvocationId will pick up the value of <some text>, I just want to know whether this is the only way we can assign our own value to DSJobInvocationId?

Posted: Fri Jan 27, 2012 5:53 pm
by ray.wurlod
If you're using dsjob then, yes, this is the only way. If the job was started from a client tool, such as Director or Designer, the Invocation ID has its own field.

Posted: Sat Jan 28, 2012 8:57 pm
by ashishm
Thank you, Ray