Setting the policy state
Usually, you can set the state of a policy by following the steps described in Creating the HCL OneTest™ API policy topic. However, in some versions of CentraSite, you must perform extra steps to set the policy state.
About this task
Procedure
- In CentraSite, select . The Lifecycle Model window opens.
- Click and open the HCL OneTest™ API Model for which you are changing the policy state.
-
Add at least three lifecycle states to the model:
- On the States tab, click Add State.
- Enter a name for the state, for example, Inactive State.
- Repeat these steps to create two more lifecycle states, for example, one called Active State and one more, called Retired State.
-
Connect the states to each other by setting target states to the values that you
specified in step 3. To have more than one target state, click the plus sign
(+) to the right of the existing target state.
Here is an example of how you could define the target states for the lifecycle states in step 3 (note that there are two target states for the Active state):
State Name Target State Inactive State Active State Active State Inactive State, Retired State Retired State (empty) These definitions allow the items in the Inactive State to be set to Active State only. Items in the Active state can either be retired by setting them to the Retired state or made inactive by setting then to the Inactive State. When an item is retired, it is irreversible.
-
Associate the life cycle with a service type. You must associate the service type with
this lifecycle model so that a service's state can be changed to the states that are
defined here.
- In the HCL OneTest™ API Model, click the Associated Types tab.
- Under Available Types, locate the appropriate service type and select it. When you select a service type that is related to other service types in the list (for example, REST Service, IS Service Interface, XML Service and their Virtual counterparts), those service types are also selected.
- Click the Greater Than (>) symbol to move all the selected service types to the Selected Types list.
- Save your changes to the lifecycle model by clicking Save in the upper right corner.
-
Associate a lifecycle model state with the policy:
- In the HCL OneTest™ API Lifecycle model, click .
- Under Name, click the name of the policy (HCL OneTest API).
- Click the States tab.
- Under Before the object enters state, click Add States.
- Click OK. , and then click
The HCL OneTest™ API policies are now ready to use, and you can change the state on the HCL OneTest™ API policy.