-
1. Re: How to access process variables?
fuligj Jun 19, 2007 7:04 AM (in response to dabd)Another question. How could I get a process variable ( for example var['quantity']) in an external web page?
Thank You! -
2. Re: How to access process variables?
cristian_e Jun 19, 2007 4:30 PM (in response to dabd)You can try executionContext.getVariable("quant") directly. At least this is the way we have worked with variables in ActionHandlers (with the appropriate cast). In our case the variables have been set programatically, but I think it's the same thing with your scenario.
About fuligj's question, I'm not sure I understand what you mean. If you are asking about how to show this variable in a web page, all I can say is you have a million ways, where probably struts and JSF are the most popular.
Hope it helps. -
3. Re: How to access process variables?
fuligj Jun 20, 2007 3:41 AM (in response to dabd)I say thank you for it your answer. I believe it, you misunderstood a small one. I would like to attain the variables of the process, apart from a process from a web page. But in the external page, the var[] data map does not live. I think, this the taskInstanceBean's job. A solution would be needed for this problem.
Thank You! -
4. Re: How to access process variables?
fady.matar Jun 20, 2007 4:08 AM (in response to dabd)Why don't you create a map of variables at your application context level and store it there.
Moreover you can have this variable in an external database and create the hibernate mapping for it and make it accessible for all of your requirements -
5. Re: How to access process variables?
dabd Jun 20, 2007 4:25 AM (in response to dabd)"cristian_e" wrote:
You can try executionContext.getVariable("quant") directly. At least this is the way we have worked with variables in ActionHandlers (with the appropriate cast). In our case the variables have been set programatically, but I think it's the same thing with your scenario.
Hope it helps.
I think the reason I was getting a null pointer exception was that in the web console form I was clicking on the save button instead of the save & close button, so the process variable was not being updated. This form was generated by the gpd. -
6. Re: How to access process variables?
fuligj Jun 20, 2007 5:24 AM (in response to dabd)Because the data would turn up duplicated then.
-
7. Re: How to access process variables?
kukeltje Jun 20, 2007 9:43 AM (in response to dabd)woooowwww .... lots of wrong assumptions here
pressing save does save the variables, just not make the task finish and the process take an transition
The taskinstancebean is for the console, but can be reused. If you want to combine data from your own system with processdata, you'll have to develop a small framework for it (e.g. MyTaskBean class) and use the jbpm api in there