Many times, our customers ask us how to call the Workload Automation functionality from their external programs. Starting from version 9.3 FP2, Workload Automation provides a new set of REST APIs that give you programmatic access to Workload Automation services (we have already discussed this topic in a previous blog post: Driving Workload Scheduler with REST APIs is super simple with Swagger UI!). Ok, but wouldn’t it be great to have some chunks of code to make developer’s life easier and ensure they’re using the APIs in the best supported manner? That’s what the Client library does. Today I want to show you how to use the Workload Automation Client libraries to submit an existing Job Stream. Let’s start!
Step 1: Connect your Engine First, you have to connect your apiClient to your Workload Automation Engine: Step 2: Retrieve the Jobstream ID Now, just retrieve the JobstreamID of the Jobstream that you want to submit. In this example, only the Jobstream name and the workstation are passed, but if you want to include also the Job Stream validFrom, validTo or validInRange, just add them to the JobstreamFilter. Step 3: Create a new object in the planWith the JobstreamID just retrieved, you will create a new object in the plan and add all the wanted information. Note that the setInputArrivalTime and the Alias are mandatory! Step 4: Submit the new object in the planWe have almost finished! Just submit the new object! That’s it… Oops!...I was forgetting…if you prefer to disable the certificate validation, just write a simple method like this and call it in your project! If you liked my blog or if you would like to have more example of how to use the Workload Automation Client libraries, just leave a comment here or send an e-mail to Vincenzina Leone [email protected].
Thanks, and see you next blog!
3 Comments
Mariano
2/4/2018 05:56:12 pm
Very interesting !
Reply
Vincenzina
2/6/2018 04:24:32 am
Thanks Mariano!
Reply
Vincenzina
2/22/2018 11:17:11 am
Hi, for everyone who is interested in learn more about WA REST APIs see the link below: https://youtu.be/7WPaiarZtV0
Reply
Your comment will be posted after it is approved.
Leave a Reply. |
Archives
August 2024
Categories
All
|