Creating an Object
In order to create an object (instance of an exposed interface), you have to use the "create" action. It is possible to define attributes that will be set during the creation (equivalent to a "create...values" statement).
Simple type attributes
To set an attribute of a simple type in a create action, just use the attr XML element with its "value" attribute.
<test name="test_action_create_1"> <description>Test action create</description> <action> <create object="1" type="prov::ServiceOrder"> <attr name="orderId" value="test_action_create_1"/> </create> </action> </test>
Object attributes
It is possible to assign an object to an attribute. You have to use the provtest reference to do that along with the "object" XML attribute.
<test name="test_action_create_5"> <description>Test action create with referenced object attribute</description> <action> <create object="1" type="sodata::ServiceOrderData"> <attr name="orderId" value="test_action_create_5@@1"/> </create> <create object="2" type="prov::ServiceOrder"> <attr name="orderId" value="2"/> <attr name="sodata" object="1"/> </create> </action> </test>
Copyright © Cloud Software Group, Inc. All rights reserved.