Demonstrates the Aras Best Practice of using a select statement to retrieve only the necessary properties in a query.
Item workflow = this.newItem("Workflow","get");
// use select attribute to retrieve only the necessary properties
workflow.setAttribute("select", "source_id,source_type");
Item workflowProcess = workflow.createRelatedItem("Workflow Process","get");
Item workflowProcessActivity = workflowProcess.createRelationship("Workflow Process Activity","get");
Item activity = workflowProcessActivity.createRelatedItem("Activity", "get");
activity.setID('activityId');
workflow = workflow.apply();
// generates the following AML query
// <AML>
// <Item type="Workflow" action="get" select="source_id,source_type">
// <related_id>
// <Item type="Workflow Process" action="get">
// <Relationships>
// <Item type="Workflow Process Activity" action="get">
// <related_id>
// <Item type="Activity" action="get" id="activityId"/>
// </related_id>
// </Item>
// </Relationships>
// </Item>
// </related_id>
// </Item>
// </AML>