-
1. Re: JBPM 4.3 EL cannot read process property with null value
kukeltje Jan 29, 2010 11:25 AM (in response to jsobolewski)I've seen this before and there might even be a jira issue for it. Can you check? -
2. Re: JBPM 4.3 EL cannot read process property with null value
jsobolewski Jan 29, 2010 7:02 PM (in response to kukeltje)I've searched by "javax.el.PropertyNotFoundException" then "PropertyNotFoundException" and "EL" on JBPM projects... I could not find anything related.
Should I open new issue ?
-
3. Re: JBPM 4.3 EL cannot read process property with null value
sebastian.s Jan 30, 2010 3:29 AM (in response to jsobolewski)If you haven't found anything please open one. -
4. Re: JBPM 4.3 EL cannot read process property with null value
kukeltje Jan 30, 2010 6:46 AM (in response to sebastian.s)afair, the issue was not specifically about retrieving variables with a value of null through EL, but retrievingvairables with a value of null generically. If that one is solved, it would be solved for EL as well I think -
5. Re: JBPM 4.3 EL cannot read process property with null value
jsobolewski Jan 30, 2010 7:49 PM (in response to kukeltje)The thing is I can retrieve null variable from Java code with no problem... JBPM sees it and returns proper (null) value. Exception is raised only when I try to access it in EL. -
6. Re: JBPM 4.3 EL cannot read process property with null value
sebastian.s Jan 31, 2010 2:26 AM (in response to jsobolewski)In this case I would consider to open an issue. Please state the difference you have observed (working in Java but not in EL) and supply a test case to reproduce the problem. -
7. Re: JBPM 4.3 EL cannot read process property with null value
jsobolewski Jan 31, 2010 10:22 AM (in response to sebastian.s)I filed JIRA issue: https://jira.jboss.org/jira/browse/JBPM-2777
and updated test case (it shows the problem better now)
-
test.zip 7.9 KB
-
-
8. Re: JBPM 4.3 EL cannot read process property with null value
sebastian.s Jan 31, 2010 11:19 AM (in response to jsobolewski)Why didn't you just extend JbpmTestcase? This is the normal way of doing unit tests for jBPM. -
9. Re: JBPM 4.3 EL cannot read process property with null value
jsobolewski Jan 31, 2010 1:21 PM (in response to sebastian.s)You're right - I should have prepared JbpmTestCase (attaching to this post, I'll change it on JIRA)
I just started working on proxy class for JBPM and I wanted to see how to get everything working manually in basic JUnit test (to understand better what is going on) - that's why previous code doesn't use JbpmTestCase - I simply forgot that it exists (I'm new to JBPM by the way)
Using JbpmTestCase doesn't change test result.
Regards
-
test.zip 7.9 KB
-
-
10. Re: JBPM 4.3 EL cannot read process property with null value
sebastian.s Jan 31, 2010 1:24 PM (in response to jsobolewski)Never mind. I just wanted to point you to this because it's more convenient for people. And this has advantages for you since the chance that a core dev grabs the test and runs it is higher. And he can even integrate the test in the test-suite if he wants to. Thanks for providing a new version of the test. -
11. Re: JBPM 4.3 EL cannot read process property with null value
kukeltje Jan 31, 2010 2:15 PM (in response to jsobolewski)In your test I see no test for this. In fact, the difference between a non-existent variable and one with the value of 'null' is none when retrieving from java. The executionService.getVariable(pi.getId(), "NoneExistentVariable") returns null as well, so null is seen by jBPM as 'none existent'. That is basically the bottom line. I'll try to find out more.So it is not that retrieving the value of a variable with null succeeds ;-)
Regarding your test, you can even reduce more. if you use the deployment method in JbpmTestCase, the teardown of the super class does the undeploy automagicallly. And there are also interesting additional assertions.
-
12. Re: JBPM 4.3 EL cannot read process property with null value
kukeltje Jan 31, 2010 2:27 PM (in response to sebastian.s)I'm trying this now, but against 4.4-SNAPSHOT from trunk since Tom has refactored a lot regarding expressions to be CDI compliant -
13. Re: JBPM 4.3 EL cannot read process property with null value
jsobolewski Jan 31, 2010 3:57 PM (in response to kukeltje)There is also statement in test that checks existance of "user_var2" in java after exception is caught. I added this in second zip.
if (executionService.getVariableNames(pid).contains("user_var2")) {
System.out.println("user_var2 is seen as process var from java code");
}
I put it in catch block after EL exception to show that variable exists and you can find and read it from Java.
I'm aware that test code is not perfect I just wanted to show the problem asap
-
14. Re: JBPM 4.3 EL cannot read process property with null value
kukeltje Jan 31, 2010 5:53 PM (in response to jsobolewski)What I meant whas that you could have put whatever variable name in execution.getVariable(..), it always returns null, even if the variable is not threre at all. Sorry if I formulated that wrongly.
So the current behaviour is:
Case Java EL var exists and has a non-null value value value var exists and has value of 'null' null fails var does not exists null fails This should at be identical I think, at least for the case where the variable exists. I created a little patch that solves this (all unit tests still are green). If you file a jira issue about this, I'll attach the patch to it that make EL return null if the variable exists but has a value of null. It does make the last case identical (not it should, and if it should, shoud it fail? or should EL also return null?) Ask that in the Jira issue to.