One area where Aware IM is sorely lacking in comparison with conventional programming languages is in its lack of support for arrays. You can use a FIND action to create a result set, but once the set is created, you can only perform operations on the entire set as a whole. There is no way to access individual members of the result set.
I came across this limitation when trying to create a system that would allow for attaching the same document to multiple emails. You can attach the document by reference to as many emails as you like, but when you send the email, Aware IM has no way of processing attachments by reference. To work around this, you have to manually copy each referenced attachment into the OutboundEmail notification. However, since there is no way of specifying which attachment reference you are copying to which attachment, the situation becomes even more complex. I ended up working around this limitation by creating an intermediary BO called AttachmentPointer that stores the references to the attachments along with an attribute called OrderNumber that is essentially a manually created array index. However, to make matters even worse, there's no way of accessing individual instances of a BO within a rule beyond the first two instances. You can use the THIS and THAT prefixes to access the first two instances, but you then have to create a whole separate process to access the third instance. Imagine if you had ten attachments to process!
This whole process could be made vastly simpler if Aware IM allowed the user to access individual BO members as arrays. For example:
OutboundEmail.Attachment1 = OutgoingEmail.Attachments[1]
OutboundEmail.Attachment2 = OutgoingEmail.Attachments[2]
OutboundEmail.Attachment3 = OutgoingEmail.Attachments[3]
Furthermore, if you had multiple instances of the OutgoingEmail BO in the context, it would be nice to be able to access the instances using array format, rather than THIS/THAT. For example:
OutboundEmail.Attachment1 = OutgoingEmail[1].Attachments[1]
OutboundEmail.Attachment2 = OutgoingEmail[1].Attachments[2]
OutboundEmail.Attachment3 = OutgoingEmail[1].Attachments[3]
OutboundEmail.Attachment4 = OutgoingEmail[2].Attachments[1]
OutboundEmail.Attachment5 = OutgoingEmail[2].Attachments[2]
OutboundEmail.Attachment6 = OutgoingEmail[2].Attachments[3]
OutboundEmail.Attachment7 = OutgoingEmail[3].Attachments[1]
OutboundEmail.Attachment8 = OutgoingEmail[3].Attachments[2]
OutboundEmail.Attachment9 = OutgoingEmail[3].Attachments[3]