Chapter 43. Automation Request Approval
In Chapter 42 we looked at how external systems can make use of CloudForms Automate workflows by calling the RESTful API. In the examples we specified
:auto_approve => true in the REST call so that our requests were immediately processed; however, we can only auto-approve our own requests if we authenticate as an admin user.
Embedding admin credentials in our external (calling) scripts is generally considered unwise, but if we still want our automation requests to be auto-approved, what can we do?
Fortunately, by this stage in the book we have learned enough to be able to implement our own approval workflow for automation requests. The example in this chapter uses an access-control group profile to control which groups can submit auto-approved automation requests.
Implementing a Custom Approval Workflow
Our automation request approval workflows will follow a very similar pattern to those for provision request approval, and we’ll reuse and adapt several of the components. We’ll implement two workflows: one triggered from a
request_created event and one from a
request_pending event (see Figure 43-1).
Before we implement anything, we need to create some new Automate Datastore components to hold our workflow objects.
We’ll create a new namespace called Automation ...