question

jansiranikrishnan-1796 avatar image
0 Votes"
jansiranikrishnan-1796 asked jansiranikrishnan-1796 commented

working with "Invoke Runbook" Activity in System Center Orchestrator

Hi Experts,

I have a Runbook (A) which invokes another Runbook (B). The Runbook (B) receives inputs via Initialize Data and creates an incident in SCSM and Returns data. when i invoke Runbook(B) alone, it is getting triggered and ticket gets created in SCSM and returns data. When i invoke Runbook(A), the return data from Runbook(B) is not getting returned to Runbook(A). Please find attached few images on the Runbooks.

Could anyone please guide me on how to invoke runbook?

Runbook(B):
163660-image.png
163704-image.png

Runbook (A):
163718-image.png
163629-image.png

Please let me know if I am missing anything here.

Regards,
Jansi


msc-orchestrator
image.png (5.6 KiB)
image.png (10.4 KiB)
image.png (3.9 KiB)
image.png (24.7 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AndreasBaumgarten avatar image
0 Votes"
AndreasBaumgarten answered jansiranikrishnan-1796 commented

Hi @jansiranikrishnan-1796 ,

could you please set the option Wait for completion in the Invoke Runbook activity of Runbook A and try again.


(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

Regards
Andreas Baumgarten

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi Andreas,

Thanks for responding. I tried setting up the option "wait for completion" and tested the Runbook. I usually check the Return Data values in the Orchestrator console -> View Instances -> View Details -> Output parameters tab. In this case, no values were shown for both the Runbooks in the tab "Output Parameters" as shown below.

163953-image.png

Is there any way where can see the Returned Data values for a Runbook?
What is the significance of "wait for completion" and "Invoke by Path" options?
How to make or get the return data from Runbook (B) to Runbook (A)?

Please help me out.

Regards,
Jansi


0 Votes 0 ·
image.png (8.2 KiB)
AndreasBaumgarten avatar image
0 Votes"
AndreasBaumgarten answered jansiranikrishnan-1796 commented

Hi @jansiranikrishnan-1796 ,

the option "Invoke by Path" and "wait for completion" are explained here: https://docs.microsoft.com/en-us/system-center/orchestrator/standard-activities/invoke-runbook?view=sc-orch-2019

Regarding the Returned Data in Runbook A take a look here: https://docs.microsoft.com/en-us/system-center/orchestrator/standard-activities/invoke-runbook?view=sc-orch-2019#published-data


(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

Regards
Andreas Baumgarten

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi Andreas,

I have already gone through these links and it wasn't clearly mentioned. So I asked here for more details.

Regards,
Jansi

0 Votes 0 ·
StefanHorz avatar image
1 Vote"
StefanHorz answered jansiranikrishnan-1796 commented

Hi @jansiranikrishnan-1796,

Andreas is quite right: You must check "Wait for completion" in the "Invoke Runbook" Activity to get the Published Data in the Activties after "Invoke Runbook".
From your first reply to Andreas it seems to me that you get not the Published Data you expect from "Run .Net Script" Activity which you have subscribed to the "Return Data".
Make sure that you get the expected Published Data from "Run .Net Script" Activity. You can check "Store Activity specific Published Data" in the properties of the invoked Runbook and after the next run you will see the Published Data in Log History.

Regards,
Stefan

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi StefanHorz,

Thank you for your patience in guiding me. You and Andreas were correct. I was bit confused in validating the returned data from the Invoke-Runbook. I was looking for the values in the Orchestrator console -> Output Parameters as mentioned in one of the images attached above rather than checking the Log History -> Published Data.

I have another question regarding web-service call to the orchestrator which i will do another post. Please please try to help me out with your inputs.

Regards,
Jansi

0 Votes 0 ·