Introducing the all-new TIBCO Community site!

For current users, please click "Sign In" to reset your password and access the enhanced features. If you're a first-time visitor, we extend a warm welcome—click "Sign Up" to become a part of the TIBCO Community!

If you're seeking alternative community sites, explore ibi, Jaspersoft, and Spotfire.

Jump to content

Scribe IF control crashes when checked property doesn't exist


Artem Krot

Recommended Posts

I've got a Scribe workflow problem. I'm receiving a JSON contact information object, that might or might not contain a uniqueID property.

The problem is, that an IF condition, asking if this property has value, crashes, when the successfully parsed object doesn't contain this property, saying:

 

Operation failed. Label: Parse the JSON into a Contact Object, Name: ContactFetch, Message: Field MyMapper_ContactFetch.properties.uniqueid.value, used in current Map/Flow is not a part of the failed record's data.:

 

Ie. this is processed fine:

{

"firstname":"John",

"lastname":"Doe",

"uniqueid":"hd2h92hasd21231c1",

...

}

 

but this crashes:

 

{

"firstname":"John",

"lastname":"Doe",

...

}

 

Any ideas how to fix this Can I somehow add the property if it doesn't exist before the IF step Or is there a way to set up the IF condition so that it doesn't crash, when a property doesn't exist

 

I'm honestly supersurprised, that this is a thing - if the property doesn't exist, shouldn't it be just handled as not having a value, resp. having null value

Link to comment
Share on other sites

Hi Artem,

 

Since you are using the mapper activity already you can take into account an empty string in your field mappings.

If you use the IF(ISNULLOREMPTY()) formula you can decide to put a default value if the Id field is empty else you provide the uniqueIdvalue coming in.

thanks

Nick

Link to comment
Share on other sites

  • 2 weeks later...

Thank you Nick,

but this is useful in the next stage, in the mapping. But my workflow crashes right after beginning, after processing JSON data, basically saying:

"workflow can't continue, because it wants to process an attribute which doesn't exist in the data object"

and crashes.

So the problem isn't really that I can't check the value when mapping it, I can't use the value in an IF condition, if it doesn't exist - because the IF condition crashes on it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...