I am trying to get around the design that does not allow me to apply any flow logic to an in queue email. I am not sure this was a decision that best fits how to utilize API calls and Data Action to address requirements.
I have found that I can put an inbound email for a new, or reopened threat in a loop and preform logic, but Genesys is inconsistent at best. I have a data action to get the email attachment information, it checks each time it loops. I apply logic to set the tag based on a success, or I just continue to loop if there is no email attachment for X number of hours. This seems to basically work.
However I a able to crash the flow, and I also get poor or crazy results for embedded built in variables. For instance Email.Message.attachments[0].name as a Set Participant Data will successfully give me the name of the 1st attachments in a thread. But it will give an error based on the Genesys logs that it is out of bounds for the next loop that has an email attachment. This is a collection, an array, I fond that to be a bug.
Also, Count(Email.Message.attachments) == 0 have very strange results. What I have found it that if I put
Set Participant Data , Count(Email.Message.attachments) At the op of the loop, just before my data action, It will return a 0 the first time around and then 1 and stops.
Email.Message.attachments[0].name , this gives me the results in the participant data, then I get the error.
These really have nothing to do with any data action, but the platform will not get the data after the 1st time. I believe its broken, it should work or not, not work one or two times then crash
My open ticket is Case #0003382347.
here is the log data. for the name array;
Exception (com.inin.workflow.exceptions.pub.IndexOutOfBoundsEvaluateException): Expression index out of bounds near position 13
t:"2023-10-15T00:47:34.109Z",
message:"EXECLOOP: Executing actions caused an exception, put the flow in error. Context=[organizationId=2a6ab887-dbc9-4404-8914-f2970c8cc8e7, flowConfigType=InqueueEmail, flowConfigId=[4efd081a-0b83-4aff-a76c-00816b931c73:3.0.0 ([REDACTED len=21])], flowConfigName=[REDACTED len=21], flowExecId=ti267m4tv88385o6invemjkr9rc020mn4osec0qu80b2shdfok, flowInstanceName=[REDACTED len=80], conversationId=110c8fe4-61c9-4488-8fbf-b846fc6edf42, runningState=Running, launchTime=2023-10-15T00:46:01.697Z, errorCode=null, actionExecCount=18]
Error=
Exception (com.inin.workflow.exceptions.pub.IndexOutOfBoundsEvaluateException): Expression index out of bounds near position 13
Position 13 is where the array position is, that worked once and not again.
I need to know when an email attachment comes in, and because its an array and read only, I must know that a reopened threat does or does not have a new attachment. The decision on the data action seems to give me "success" when it is reopened simply because the built-in variable gives me the last result from the previous thread but I can never get to it consistently. I will upload the flow here so you can see what I am doing.