Book Image

Hybrid Cloud Management with Red Hat CloudForms

By : Sangram Rath
Book Image

Hybrid Cloud Management with Red Hat CloudForms

By: Sangram Rath

Overview of this book

Table of Contents (17 chapters)
Hybrid Cloud Management with Red Hat CloudForms
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

State machines


A state machine is a collection of a number of states, where each state refers to a process that is happening and follows a cycle by transitioning from one state to another. Successful completion of the previous state is necessary for the next state to begin.

CloudForms includes some default state machines in the ManageIQ or CloudForms domain, which cannot be changed. ProvisionRequestApproval is one such state machine that we will work with in this chapter and it is relevant for the request approval process.

State machine components

There are six state machine components that you can work with and set values for:

  • On_Entry: This component will run a desired method upon entering the state

  • On_Exit: This component lets you run a method when exiting the state

  • On_Error: This can run a method if there is an error during the running state

  • Default value: This runs the desired method after the On_Entry method

  • Max retries: This will retry the state a certain number of times before exiting...