none
child runbook status RRS feed

  • Question

  • What does the published data child runbook status mean? what could be the possible value?

    Thanks


    Thanks

    Wednesday, September 11, 2019 6:33 PM

Answers

  • Yes, only common published data.

    I usually have something like this in the "failed email" activities:

    Subject:

    • <Runbook Name> has failed 

    Message:

    • Error message: <Error summary text from previous runbook activity/activities>


    If you want the "Error Summary Text" from a child runbook, yes you will have to use a Return Data activity for that.


    Blog: https://thesystemcenterblog.com LinkedIn:

    • Marked as answer by msloy Wednesday, September 11, 2019 11:09 PM
    Wednesday, September 11, 2019 11:07 PM
  • Correct.

    Blog: https://thesystemcenterblog.com LinkedIn:

    • Marked as answer by msloy Tuesday, September 17, 2019 10:05 PM
    Tuesday, September 17, 2019 10:03 PM

All replies

  • Hi,

    The "Child runbook status" simply tells us the status of the child runbook that was invoked.

    Examples:

    Parent runbook invokes child runbook, child runbook runs successfully -> Child runbook status = success.

    Parent runbook invokes child runbook, child runbook runs successfully with warnings -> Child runbook status = warning.

    Parent runbook invokes child runbook, child runbook runs and fails -> Child runbook status = failed.

    The possible values of the "child runbook status" are:

    • success
    • warning
    • failed

    Best regards,
    Leon


    Blog: https://thesystemcenterblog.com LinkedIn:


    Wednesday, September 11, 2019 6:50 PM
  • I am currently using a return data activity in child runbook to return a true if the activity in the child runbook success, return false if failed.

    Then parent runbook use the returned data to decide to go to further steps in parent runbook.

    I am just wondering what is the difference of the child runbook status and the one I use return data?

    I am wondering If i can use child runbook status, why i need to write my own return data?

    Thanks,


    Thanks

    Wednesday, September 11, 2019 7:08 PM
  • If you use the "child runbook status", you will get the whole child runbook's status and not a single activity's status from the child runbook.

    If you only want to know the status of a specific activity in the child runbook, then use Return Data.


    Blog: https://thesystemcenterblog.com LinkedIn:

    Wednesday, September 11, 2019 7:36 PM
  • Thanks, that helps!

    what is the best way to do below?

    If I have a master runbook and invoke 2 different child runbooks

    and the master runbook is like this:

    monitor time-->check schedule--->invoke child runbook1----> invoke child runbook2.

    and invoke child runbook1 activity has to be successful then go to invoke runbook2. since runbook2 depends on 1's data.

    If I want to notify user the runbook fails, what is the best practice to include the send email in child runbook or in the master runbook?


    Thanks

    Wednesday, September 11, 2019 9:55 PM
  • You can for example do it like this:

    The link conditions from each Invoke Runbook check the status of the child runbooks:

    • If a child runbook 1 is successful, we go forward to child runbook 2.
    • If a child runbook 1 fails, we send an error email.
    • If child runbook 2 fails, we send an error email.
    • If child runbook 1 and 2 are successful, we send a success email.


    Blog: https://thesystemcenterblog.com LinkedIn:

    Wednesday, September 11, 2019 10:12 PM
  • Thanks, so the send email (failed) can only get common published data of runbook name, it will not get activity name since two activity connects to it, correct?  What you usually put in the send email (failed) task?

    Also if you want to return error text from child runbook to parent, you will have to set return data, correct?

    thanks,



    Thanks

    Wednesday, September 11, 2019 10:44 PM
  • Yes, only common published data.

    I usually have something like this in the "failed email" activities:

    Subject:

    • <Runbook Name> has failed 

    Message:

    • Error message: <Error summary text from previous runbook activity/activities>


    If you want the "Error Summary Text" from a child runbook, yes you will have to use a Return Data activity for that.


    Blog: https://thesystemcenterblog.com LinkedIn:

    • Marked as answer by msloy Wednesday, September 11, 2019 11:09 PM
    Wednesday, September 11, 2019 11:07 PM
  • In parent runbook,  iI use child runbook A status to check if it is success then go to next invoke runbook.

    In my child runbook A it has an run program activity as the last one. 

    Will the parent runbook get child runbook status success in which of the two cases:

    1. as soon as the run program activity is called successful in child runbook

    or 2. wait for the run program activity finished running.

    Thanks


    Thanks

    Tuesday, September 17, 2019 8:07 PM
  • It depends how you have configured the Invoke Runbook activity.

    If you have checked the "Wait for completion" check mark, then you will be able to get the child runbook status of either failed or success.

    This means what it says, the parent runbook will wait for the child runbook to finish before continuing forward.

    However if you don't check the check box, you will only receive a "queued" child runbook status.

    But to answer your question, the child runbook status will be returned once the last activity of the child runbook has finished, but for this to happen you will need the "Wait for completion".

    If you don't have the "Wait for completion" checked, the parent runbook will just continue to the next step after the invoke runbook, and it will not wait for anything in the child runbook.


    Blog: https://thesystemcenterblog.com LinkedIn:

    Tuesday, September 17, 2019 9:21 PM
  • My case happens to be the child run book last activity is a run program activity.

    That is what becomes confusing.

    For run program activity I understand once it calls the command line script successful, it is considered success, correct? no matter it finished or not?


    Thanks

    Tuesday, September 17, 2019 9:43 PM
  • If the Run Program successfully is able to call the command/script it is considered as success yes, but the Run Program (by default) waits for the command/program to finish, unless you change it:


    Blog: https://thesystemcenterblog.com LinkedIn:

    Tuesday, September 17, 2019 9:50 PM
  • Thanks that make sense.

    But it will always return success unless it uses the process exit code for child run program activity, correct?

    If not using process exit code, then the child runbook status will always return success, is that correct?

    thanks


    Thanks

    Tuesday, September 17, 2019 10:01 PM
  • Correct.

    Blog: https://thesystemcenterblog.com LinkedIn:

    • Marked as answer by msloy Tuesday, September 17, 2019 10:05 PM
    Tuesday, September 17, 2019 10:03 PM