Kelvin Posted November 16, 2017 Share Posted November 16, 2017 I have a problem in a BPM where a decision wont behave as expected (it did when first built but not correctly over the past couple of days) I have a decision with the following Expression The alternative one which == Rejected works but when the Custom Field A is left blank the above Goto will not fire. Am I missing something? Link to comment Share on other sites More sharing options...
James Ainsworth Posted November 17, 2017 Share Posted November 17, 2017 Hi @Kelvin Thanks for your post. What are all the possibilities that can be stored in Custom Field A? Rejected, Accepted, and blank? Is there a use case for someone leaving it blank? On your decision node, are you using a 'No Match' option as well? For now, I was thinking that you could try and add multiple custom expressions in the above Goto if for each possible value for Custom Field A excluding Rejected. Then create a 'No Match' branch which should be picked up when the Custom Field A is blank. We can also do some tests around the !=Rejected in case there is some reason that a null or blank value is not recognised by this. James Link to comment Share on other sites More sharing options...
Kelvin Posted November 17, 2017 Author Share Posted November 17, 2017 @James Ainsworth The field is either blank or "Rejected". The decision Node only has 2 outputs == Rejected (which works) and != Rejected (which fails) Link to comment Share on other sites More sharing options...
Steve Giller Posted November 17, 2017 Share Posted November 17, 2017 @Kelvin Instead of != Rejected try using No Match - I believe the nodes are SQL based which means that = or != do not apply to empty (null) values. 1 Link to comment Share on other sites More sharing options...
NeilWJ Posted November 20, 2017 Share Posted November 20, 2017 Hi Guys, The conditions are tested in a javascript engine that the BPM server uses. The problem here is that the SM flowcode used to get Custom Field A is not actually populating the output param 'Custom Field A' because it is empty. As such there is actually no field to test so the BPM engine can't reference it.@Kelvin You could modify your condition to add an OR statement and use the "is not set" operator. So you are then testing:- IF FIELD != Rejected || FIELD IS Not Set THEN GO TO SOME NODE. Or as @DeadMeatGF suggests just use the No Match because by the sounds you are only testing for 1 value:- IF Rejected THEN go to a node ELSE go to another node. The ELSE being what a no match does. Cheers 1 Link to comment Share on other sites More sharing options...
Kelvin Posted November 20, 2017 Author Share Posted November 20, 2017 @DeadMeatGF @NeilWJ Thanks for the feedback. I have changed the decision to no match as there are only the 2 different choices. All now working. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now