I have a workflow that assigns an Addressee DN based on the user's location
and job code. I've been assured that there is one and only one of these
people at each location, and that all locations have one.

WRONG...

So, When the workflow attempts to assign an addressee and the user does not
exist, I get a "Terminated: Error" status.

Have any of you done "fallback" addressee assignment...

I assume I need some code that queries and if the node set returned is
null, then set addressee = "a specific fallback user or group."

Code ideas?

Here's the current addressee assignment logic:

IDVault.globalQuery("dataEntry", {l:IDVault.get(flowdata.get('studentmap'),
'user', "l"),jobCode:'70404'})

Can someone help me wrap that in a test so that if that query comes back
empty, then set the value to "cn=fallback escalation,ou=grp,o=data"

Thanks! I'll keep plugging in the meantime, and if I succeed before a
response comes through I'll post the code.

R