How to get the current JobID and current StepID

553
1
Jump to solution
07-01-2019 10:00 PM
DharmaRajan
Occasional Contributor

Dear All,

In Workflow Manager, I want to execute a GPtool(JTXSteps.ExecuteGPTool) which requires current JobID and current StepID as input parameter. Kindly suggest how to fetch these values and pass the same arguments.

0 Kudos
1 Solution

Accepted Solutions
SamWest1
Esri Contributor
Hello,

Normally, our system of tokens could be passed as arguments to the step type. However, current step ID is not one of those, so we'll have to use our Python API. I recommend running your GP tool as a python tool to make use of the currentSteps property to obtain the current step ID and the ID property to retrieve the job ID. You would then just need to pass these as parameters to the tool you are trying to execute.

Let me know if you have further questions.

Thanks!
Sam

View solution in original post

1 Reply
SamWest1
Esri Contributor
Hello,

Normally, our system of tokens could be passed as arguments to the step type. However, current step ID is not one of those, so we'll have to use our Python API. I recommend running your GP tool as a python tool to make use of the currentSteps property to obtain the current step ID and the ID property to retrieve the job ID. You would then just need to pass these as parameters to the tool you are trying to execute.

Let me know if you have further questions.

Thanks!
Sam

View solution in original post