-
1. Re: Assignign default values to variables
kukeltje May 12, 2006 12:05 PM (in response to aksharma)Yes, I have an idea. Since it is not in the documentation (and in the db as you say, but that is no signal), it is likely that it is not possible.
My idea would be to search the forum. -
2. Re: Assignign default values to variables
cavalera May 12, 2006 12:20 PM (in response to aksharma)Maybe you could define some Aspect using AspectJ - Spring AOP or whatever that targets...
TaskController.initializeVariables(TaskInstanace)
and populate the variables values in the aspect. -
3. Re: Assignign default values to variables
aguizar May 12, 2006 1:12 PM (in response to aksharma)AOP ??? Nah, too high... How about a custom TaskControllerHandler?
-
4. Re: Assignign default values to variables
aguizar May 12, 2006 1:15 PM (in response to aksharma)Take a look at the task controllers section in the jBPM user guide. You have to do it yourself but you can reuse many things from the default controller.
-
5. Re: Assignign default values to variables
kukeltje May 12, 2006 1:22 PM (in response to aksharma)Alex,
Although the taskcontroler thingy seems handy, I person ally had some problems with it. It almost comes down to redoing the webui completely. I did not want to comment since this has been brought up many times before, but think I should now.
Using the processdefinition that can and is stored fully in the db since 3.1.1 and the upcomming 3.2 is imo an easier way. Ok, you have to turn of validation of the process in the engine (which should be adapted so you *can* turn/keep it on) but the basic ui is now so fully grown (ok, it is adolesent in 3.2 ;-) ) that I prefere to use the ui as it is, including te taskcontroler.
just my ?0.02 -
6. Re: Assignign default values to variables
aguizar May 12, 2006 3:18 PM (in response to aksharma)Ronald,
How do you use the stored process definition document to deal with this? I'd like to hear more of that approach.
I just tought we are taking the long route. Why not writing a simple script that initializes the variables at some event (node-enter, task-create, ...)? -
7. Re: Assignign default values to variables
kukeltje May 12, 2006 9:36 PM (in response to aksharma)I'll elaborate on this in the comming week. If there was a process-start event (it is most often required at that moment) that could be used for this that would be great. AFAIK, there is none
-
8. Re: Assignign default values to variables
aksharma May 14, 2006 11:07 PM (in response to aksharma)Alex
Yaa I agree we can do that using CustomHandler but it would help to have
an attribute in<variable name=xxx access=xxx />
called value. Where I can assign a value if I want to write without having to redo what has been achieved in TaskController.
Thanks
Akshay