-
1. Re: Java Activity not using Interface
jbarrez Jan 27, 2009 4:37 AM (in response to camunda)Bernd, I agree with you. The new style is nice (especially the 'var' construct to store the result), but it'll be a bit confusing for people who are used to do jbpm3.
-
2. Re: Java Activity not using Interface
camunda Jan 27, 2009 5:55 AM (in response to camunda)I think not only confusing but also not checkable by the compiler... Flexibility is nice, but I like errors being found by the compiler already!
-
3. Re: Java Activity not using Interface
jbarrez Jan 27, 2009 6:13 AM (in response to camunda)Bernd,
I would like to see that both approaches are doable.
After all, there isn't much compile-time checking since the handler class is declared in XML. So if you refactor it, the process def will not be updated.
What added value do you believe the compiler has?
Perhaps it is possible to implement some kind of semi-compile-check when the process is deployed: eg check if the handler class exists, if it can be instantiated, if the param types are correct, ...
I really like the POJO approach: it allows to bundle business logic into a cohesive class. But I would like to see the 'old' handler, because it is easyto explain for new people. -
4. Re: Java Activity not using Interface
camunda Jan 27, 2009 6:56 AM (in response to camunda)Supporting both ways would be my favorite as well...
The compiler at leasts checks that the method exists and the parameters are clear. And since it is an ActionHandler it is clear what its purpose is... Personally I don't lilke too much POJOs and magic wiring, but yes, best for jBPM is to leave the choice to the users... -
5. Re: Java Activity not using Interface
tom.baeyens Jan 28, 2009 3:07 PM (in response to camunda)"camunda" wrote:
Supporting both ways would be my favorite as well...
that is the plan -
6. Re: Java Activity not using Interface
jbpmjboss11 Aug 24, 2009 4:05 PM (in response to camunda)when i try to get return value from the method of the class mentioned in the Java task ... i get following nullpointerException ... Have no clue how to get rid of this... I am very well able to call the method with input object and all, but for some reason i get NullPointerException on line...
String out = (String)executionService.getVariable(pid, "answer1");
And this is the exception ...
java.lang.NullPointerException
at org.jbpm.pvm.internal.cmd.GetExecutionVariablesCmd.execute(GetExecutionVariablesCmd.java:60)
at org.jbpm.pvm.internal.cmd.GetExecutionVariablesCmd.execute(GetExecutionVariablesCmd.java:36)
at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:54)
at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.getVariable(ExecutionServiceImpl.java:130)
my java task xml is ...
Thanks -
7. Re: Java Activity not using Interface
jbpmjboss11 Aug 24, 2009 4:07 PM (in response to camunda)When i try to get return value from the method of the class mentioned in the Java task ... i get following nullpointerException ... Have no clue how to get rid of this... I am very well able to call the method with input object and all, but for some reason i get NullPointerException on line...
String out = (String)executionService.getVariable(pid, "answer1");
And this is the exception ...
java.lang.NullPointerException
at org.jbpm.pvm.internal.cmd.GetExecutionVariablesCmd.execute(GetExecutionVariablesCmd.java:60)
at org.jbpm.pvm.internal.cmd.GetExecutionVariablesCmd.execute(GetExecutionVariablesCmd.java:36)
at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:54)
at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.getVariable(ExecutionServiceImpl.java:130)
my java task xml is ...<java class="com.abc.MyClass" g="173,70,175,58" method="test" var="answer" name="Retrieve Application" > <arg><object expr="#{input.apre.force}"/></arg>
Thanks -
8. Re: Java Activity not using Interface
jbpmjboss11 Aug 24, 2009 4:11 PM (in response to camunda)there was mistake in copy/paste ... I wish i could edit my posts. Anyway, here is correction for the line ...
String out = (String)executionService.getVariable(pid, "answer");
Thanks -
9. Re: Java Activity not using Interface
kukeltje Aug 24, 2009 4:53 PM (in response to camunda)wrong forum.... use the userforum
-
10. Re: Java Activity not using Interface
kukeltje Aug 24, 2009 4:54 PM (in response to camunda)and totally not related topic
-
11. Re: Java Activity not using Interface
jbpmjboss11 Aug 24, 2009 11:31 PM (in response to camunda)I think it is JBPM issue ... I haven't got any response in JBPM user forum either. In this case I am not able to find out what is the issue... I am sure its not my code. I can reach inside the method i am calling through jpdl but not able to get response for the var value I have mentioned in the jpdl. Please advise ...
-
12. Re: Java Activity not using Interface
tom.baeyens Aug 25, 2009 2:53 AM (in response to camunda)the problem is that your execution is not existing any more when you call getvariable on it.
i improved the error message
https://jira.jboss.org/jira/browse/JBPM-2498 -
13. Re: Java Activity not using Interface
kukeltje Aug 25, 2009 4:43 AM (in response to camunda)I was not saying it was no jbpm issue, it was not an issue for the jBPM DEV forum but for the jBPM USER forum. THe fact that you do not get a response there is no (valid) reason to try the dev forum.
-
14. Re: Java Activity not using Interface
jbpmjboss11 Aug 25, 2009 11:10 AM (in response to camunda)Ronald, I am really sorry about posting my issue in here...
Tom, would you mind if I send you an email regarding why my execution is not existing anymore and more details on this issue?
Thanks