BAQ analyze error - Argument Data Type XML

Wonder if anyone has any ideas how to query BPMs for email addresses for a specific domain?

My first thought was to BpDirective.Body but… when I tried to use MATCHES
I receive an error “Argument data type xml is invalid for argument 1 of like function”.

Ref screenshot of BAQ and error

If possible, I’d like a simple list of BPM Groups/Names that have email addresses specified.
Just to make it easier to find them when needed. (In this case a domain name is changing soon).

Thanks in advance.

Try making a calc field of type varchar, with the expression
convert(varchar, BpDirective.Body)

Then use a Sub query criteria to check the calc field.

I’m not sayin that this will work, it’s just the first thing I’d try.


the above doesn’t work. But the following does:

cast(BpDirective.Body as nvarchar(max))

or skip making a varchar to hold that and directly test it (and using a bit filed to hold the result) with:
(case when charindex(@Param1,cast(BpDirective.Body as nvarchar(max))) = 0 then 0 else 1 end)

Then add that calculated bit field to a sub query criteria:

Yes, this worked, thanks.

Note that the max size of a nvarchar is 4000. So I’m not sure what happens if the XML is bigger than 4K characters.

Yes, that caught my eye too
I haven’t checked how many characters are actually included… yet.

Since in my case it appeared to be catching all BPMs with the email addresses.
I still need to do some digging, just to be safe.