Last active
July 11, 2017 19:29
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// … | |
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