hasVariable returns true for me in specific cases when getVariable returns null
@Edmondo_Porcu can you provide more detail on the usage to get this result?
“I would try ${not empty service_result_id}”
This is the one that works for me reliably.
@StephenOTT I have reproduced a case where I have process A calling process BP: a simple CallActivity. The mapping is such that sometimes an optionally nullable variable of process A is mapped to process B, and when this occurs, the variable will be set to NULL in process B but it will exist in the variable store
Therefore, some expressions that are used in Gateways might fail to behave correctly
Would you say this is a bug?
I think it is, it is a bug in the input/output mapping.
If want to map a variable that is optional in process A, and it happens to be missing, I don’t want that execution.hasVariable(‘myVar’) in subProcess B returns true because the mapping has created a null variable in subProcess B