[jBPM Users] - Re: Using Process variables as parameters for method calls
by sebastian.s
Hello Joram,
no, everything works fine for me. I had an error in reasoning. I was trying to access process variables which were not set yet. But I noticed one thing of which I was not aware before because I wasn't that proficient with reflection:
Supposing you want to use an integer process variable as an argument for a method call you'll have to use the wrapper class in the method signature. Maybe one should mention this in the userguide to have this remembered when writing java classes to be invoked. I used "int" and at first could not understand why my methods could not be found on the class.
However, I am not sure if I understand the issue you pointed me to. What is Tom trying to do? He's trying to have an existing process variable be parsed as an Integer and then he is saving the result in a process variable of the same name?
Cheers
Sebastian
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263784#4263784
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4263784
16 years, 5 months
[jBPM Users] - Re: JpdlProcessDefinition cannot be cast to java.util.List
by sebastian.s
Hello Joram,
I will try to provide the stacktrace tomorrow.
The situation is the following. I've got a process definition with a couple of automated activities, a bunch of java classes mainly used to invoke Axis2 webservices and 2 tasks for users. The process definition is deployed with no problem. I have a webservice using the jBPM api to start a process instance.
When the Tomcat server is freshly started and there is no process engine instance yet I call the webservice which tries to retrieve the process engine which is then created and stored. But the starting of the process fails and the exception telling that JpdlProcessDefinition cannot be cast to java.util.List is thrown.
If I use the jBPM console afterwards to start a process instance this error does not show up but a different one since I cannot supply the process instance variables needed in the first and automated activity via the jbpm-console. Strangely afterwards I can start as many process instances as I want with using my webservice without problems and they all run without problem from start to end.
I had trouble seeing more than the cast exception but as bwestrich stated there is normally an inner cause for this one but I could not locate one.
I'll try to get the stacktrace. Is there something you shouldn't do within java classes invoked by activities in the process? For example regarding calls in the constructor or whatever?
Thanks for any hints
Sebastian
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263755#4263755
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4263755
16 years, 5 months