cancel
Showing results for 
Search instead for 
Did you mean: 

Unexpected error Data Type mismatch in array: Element '' has type instead of expected type 'System.Boolean'

SebT
Level 4
Hi

I'm running into a similar issue as the poster here:
Digital Exchange (blueprism.com)

I was wondering whether anybody has had luck creating a custom code to handle the response from the Outlook Graph API if it comes as boolean instead of string as BP expects?

E.g see response example below.

"isReadReceiptRequested":false,
"isRead":true,
"isDraft":false,

However Blue prism expects:

"isReadReceiptRequested":"false",
"isRead":"true",
"isDraft":"false",

Any help would be appreciated.
Thanks

Br
Sebastian
2 REPLIES 2

ewilson
Staff
Staff
@Seb T,

This is a tough one. I think the only way around this is to change the response content handling in the service definition and remove the return collection processing. Then, within your process/VBO you could process the raw Response Content data item yourself with Newtonsoft and handle whatever exceptions are raised by it directly. I've seen a few examples online of people creating their own extensions of the JSON serialization code, but none of them show examples of super complex structures like what Outlook presents for a message.

If you're organization uses a standard Outlook message template definition you could even define a .NET class to implement that template and then use Newtonsoft to serialize the message directly to an instance of that class type. 

Cheers,

SebT
Level 4
Hi Eric

Thanks for your response. It seems that by removing the response content in the service definition and instead just using the 'JSON to Collection' action for the raw JSON response i was able to achieve what i wanted.

Once again thank you.