Handling Source Node Optional / Destination Required Scenarios

Handling Source Node Optional / Destination Required Scenarios

Post by Colin Bowe » Tue, 05 Sep 2006 03:22:50


With transforms I've had a few scenarios now where I've had the following:

The destination node "PartnerName" is required but the source node
"FulfillmentPartnerName" is optional.

I'm curious how other approach this scenario? The source schema isn't
always within my control from a definition perspective. At the stage in
which the map is called the optional value will always have a value, but
that isn't necessarily the case earlier in the process. My current
workaround is to use a scriptoid as an intermediary.

Cheers,
Colin
 
 
 

Handling Source Node Optional / Destination Required Scenarios

Post by Jan Eliase » Sat, 09 Sep 2006 05:43:40

On Sun, 3 Sep 2006 14:22:50 -0400, "Colin Bowern"


I am unsure what you mean.

If you have a schema with an optional field, then that's just great.
But then, I read your post as if you modify the document coming in, in
order to assure that there is always a value in this optional field.
You could create a second schema that is just like the first one, only
the field isn't optional anymore. And use that after you have put a
value into the field.

Or you can just ignore the warning - it isn't an error, only a
warning.

If you need to do stuff in your map depending on the existing of this
optional field, then take a look at the logical "existence"-functoid
with the value mapping functoids. They can probably help you.

A custom scripting functoid is also a good idea.

--
eliasen, representing himself and not the company he works for.

private email: XXXX@XXXXX.COM