Skip to content

Instantly share code, notes, and snippets.

@EliJDonahue
Last active July 11, 2017 19:29
Show Gist options
  • Save EliJDonahue/be1aff5993a2cc82223082a75d5bbadf to your computer and use it in GitHub Desktop.
Save EliJDonahue/be1aff5993a2cc82223082a75d5bbadf to your computer and use it in GitHub Desktop.
Demonstrates a sub-optimal approach to retrieving a collection of items from an array of ids.
// …
for (int i = 0; i < openWorkflows.Length; i++)
{
// Query per each cycle iteration
Item openWorkflow = inn.getItemById("workflow process", openWorkflows[i]);
// …
}
// …
// generates the following AML queries, one for each element in openWorkflows
// <AML>
// <Item type="Workflow Process" action="get" id="openWorkflows[0]" />
// </AML>
// <AML>
// <Item type="Workflow Process" action="get" id="openWorkflows[1]" />
// </AML>
// ...
// <AML>
// <Item type="Workflow Process" action="get" id="openWorkflows[n]" />
// </AML>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment