[Design of JBoss jBPM] - Re: New console snapshot published, Task Forms included
by SNy
OK, while the dynamic approach ain't working, I'll workaround by hardcoding the template options (it's a mockup, anyway, so the main aim is to get it working ASAP).
As far as suggesting a solution, I guess it depends on wether or not the outcome (as in: result of the action) is actually useful in subsequent process steps. If not, it probably should not be introduced into the process at all. I don't have sufficient insight into the ways of jBPM yet and therefore don't know about side-effects.
Another idea would be to have the default context stuff that you put into the form as an independent element/namespace 'ctx' or somesuch, containing everything that would go there (it would be nice, BTW, to have a list of the items one can use, I looked in vain for the activity name). 'ctx' should then be regarded as reserved in some way and not be taken from the process.
Or, maybe it would be even better to encapsulate the process variables in an element/namespace of their own, maybe named 'process'?
Just my 2 cent,
regards,
Marko
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4245829#4245829
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4245829
16 years, 8 months
[Design of JBoss Transaction Services] - beanifying the config
by jhalliday
In an effort to better accommodate the assorted bean centric configuration and dependency wiring frameworks (e.g. Spring, MC) I'm considering further changes to the way TS internals are configured.
Currently we have a property management system based on a per module Environment class (a set of named constant Strings), paired with a per module PropertyManager (which is basically a java.util.Properties). The normal usage idiom for retrieving config is something like
String theValue = mymodulePropertyManager.getPropertyManager().getProperty(mymodule.Environment.SOME_KEY);
The drawbacks of this are a) it's not type safe - theValue may need munging to a particular type, a somewhat laborious process that's repeated all over the codebase and b) the PropertyManager does not know about default values - applying one is up to the consuming code, which means they are spread all over the place as I discovered whilst trying to update the manuals.
What I'd like to do is introduce a per-module EnvironmentBean, which will simply have typesafe getters and setters for any property currently defined in the corresponding Environment class. A singleton instance of this will be created and populated by walking the properties file and calling setters accordingly. Anything not set will have a default value declared in the EnvironmentBean, making it easy to find these. Injection frameworks can retrieve this singleton and apply their own config by making additional setter calls.
Usage will therefore become of the form
MyType theValue = mymodulePropertyManager.getEnvironmentBean().getMyValue();
and the type conversion and default handling code will vanish from the point of consumption.
This will also reduce the desire to do this property retrieval in static blocks, as there will no longer be any significant hassle or performance overhead to retrieving it from the manager on each use. However, actually relocating the retrieval code will need careful thought - in some cases all hell will break loose if a value is changed whilst the system is running. Maybe the javabeans validation/veto mechanism or similar can eventually be used to disallow changes when the system is in certain states. Meanwhile we are no worse off than currently, as System.setProperty carries equivalent risks at present.
Thoughts?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4245824#4245824
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4245824
16 years, 8 months