www.contoso.se

Cloud and Datacenter Management by Anders Bengtsson

Building a SLEEP activity for Orchestrator

When building runbooks you sometimes need to include a delay or a sleep. You can configure a delay on the links between activities, but it is not always a good solution. In the example in the image below I have a delay on each link. As you can see it looks like the runbook is on the first activity, but it is not, it is on the link, waiting. You don’t see the link as a step in the runbook and you cant see the link delay as a step in the history log either. A better alternative is to use a “wait” or “sleep” activity. In this blog post I will show you how you can build a “sleep” activity with Orchestrator Integration Toolkit. We will use a Powershell cmdlet named start-sleep and input number of seconds we want to sleep.

  1. Download and install the Orchestrator Integration Toolkit
  2. Start the Orchestrator Command-Line Activity Wizard
  3. On the welcome page click Next
  4. Assembly Details. Input a name a assembly file, for example ContosoSleep as name and C:\IP\ContosoSleep.dll as assembly file
  5. Commands. Click Add
  6. Add/Edit Command. Input
    Name: Sleep
    Mode: Run Windows PowerShell
  7. Switch to the Arguments tab, click Add parameter
  8. Add/Edit Parameter. Input
    Name: Number of seconds to sleep
    Usage mode: Command Argument
    Display Style: Text
    Default value: <leave blank>
  9. Click Ok
  10. On the Arguments tab, in the Command Line text field, input
    start-sleep -s
    then click Insert and Number of seconds to sleep
  11. Click Ok
  12. Commands. Click Next
  13. When you see “The wizard completed successfully” click “Build Integration Pack”
  14. Product Details. Fill in the information, for example
    Product Name: Contoso Sleep
    Category Name: Sleep
    Company: Contoso
    You can click Modify and change the icon. Click Next
  15. Activities. Verify that your Sleep activity is listed, then click Next
  16. Dependencies and included files. Our example don’t need any extra files so click Next
  17. Orchestrator Integration Pack File. Input a path where the Integration Pack will be created. Click Next
  18. The integration pack is created. Click Finish to exit the wizard

Now, register and deploy the integration pack with Deployment Manager. After that is successfully you can restart your Runbook Designer console and you will see a new Integration Pack with your new activity.

As you can see in the image below we can now easy see that the runbook is in “sleep mode” as Sleep is its own activity. More examples with the Orchestrator Integration Toolkit can be found here. You can download my sleep IP here. ContosoSleep . Please note that this is provided “as is” with no warranties at all.

« »

© 2019 www.contoso.se. Theme by Anders Norén.