Example configurable modifier actions file

This example configurable modifier actions file demonstrates the use of the all the action types.

The file defines actions that perform the following operations:
  1. Create a new business model based on the "EnterpriseApplication" business model template, add a property called "Company" with the value "IBM®", and assign the "Commerce" classification.
  2. Delete all policy documents for which the value of the "status" property is "expired".
  3. Apply the "DeployToTest" transition to the entity on which the triggering operation was performed.
  4. Make governable all WSDL service objects for which the value of the "state" property is "discovered", and apply the "ApproveForUse" transition.
  5. Remove governance from all WSDL service objects for which the value of the "version" property is "0.9".
  6. Perform the following updates to all WSDL service objects for which the "description" property contains the string "inventory":
    1. Add, or modify, the "contains" relationship, setting the relationship targets to be all objects with the name "StockControl".
    2. Remove the "status" property.
    3. Remove the "consumers" relationship if all the targets are generic objects for which the "owner" property has the value "test user".
    4. Remove the "Commerce" classification.
<action-configuration
  xmlns="http://www.ibm.com/xmlns/prod/serviceregistry/Actions"
  name="example_action_configuration"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.ibm.com/xmlns/prod/serviceregistry/Actions ../schema/Actions.xsd">

  <create-action>
    <create-entity
      model-type="http://www.ibm.com#EnterpriseApplication" />
    <set-property name="Company" value="IBM" />
    <set-classification uri="http://www.ibm.com/Commerce"/>
  </create-action>

  <delete-action target-query="/WSRR/PolicyDocument[@status='expired']" />

  <transition-action
    transition-uri="http://www.ibm.com/xmlns/prod/serviceregistry/6/0/Lifecycle#DeployToTest" />

  <make-governable-action
    uri="http://www.ibm.com/xmlns/prod/serviceregistry/6/1/Lifecycle#ApproveForUse"
    target-query="/WSRR/WSDLService[@state='discovered'"] />

  <remove-governance-action target-query="/WSRR/WSDLService[@version='0.9'"] />

  <update-action
    target-query="/WSRR/WSDLService[matches(@description,'.*inventory.*')]">
    <set-relationship name="contains" target-query="//*[@name='StockControl']"/>
    <remove-property name="status" />
    <remove-relationship name="consumers"> 
      <remove-type
        target-match="all-of" target-query="/WSRR/GenericObject[@owner='test user']"/>
    <remove-classification uri="http://www.ibm.com/Commerce" />
    </remove-relationship>
  </update-action>

</action-configuration>