isNotNullorEmpty showing true for null property of processVariable CDT

Hello. I built some process flow logic that's checks if a value isn't null and then performs an action. The value is for a property of a CDT processVariable:

Ex: if(  a!isNotNullOrEmpty(pv!requestItem.field),  do something, do nothing)

I came across an issue where the flow was performing the action when the value is null (value is verified)

I'm debugging in an expression rule and can replicate the issue when the query returns a Dictionary list, and I get the intended behavior when using data[1]. The issue makes sense here since the null checks were originally against the list.

However, the process variable isn't a list, its a single entity ("Multiple? is No and verified). So I'm not sure why the behavior is happening.

Has anyone experienced this and found a solution?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Can you post a screenshot of your exact process model code snippet?  Are you saying you have the bare a!isNotNullOrEmpty() rule call directly in one of the entries of an XOR gateway, or something else...?

    As a debugging step, if you're confused by the behavior you're getting, try adding a debug Script Task to save the output of the function call directly into a [new/temporary] boolean-type PV, and check whether its value gets set to the TRUE or FALSE value you were expecting.

Reply
  • 0
    Certified Lead Developer

    Can you post a screenshot of your exact process model code snippet?  Are you saying you have the bare a!isNotNullOrEmpty() rule call directly in one of the entries of an XOR gateway, or something else...?

    As a debugging step, if you're confused by the behavior you're getting, try adding a debug Script Task to save the output of the function call directly into a [new/temporary] boolean-type PV, and check whether its value gets set to the TRUE or FALSE value you were expecting.

Children
No Data