-
1. Re: JBPM task description localization via EL
cbensemann Jan 22, 2010 10:34 PM (in response to roben)I have found the same behaviour. Basically the EL in description appears to resolve variables that are stored in the BUSINESS_CONTEXT only. I will try to document the work around I am using below.
In your task definition do something like this:
<task\-node name\="approve request"> <task name\="consider request" description="#{description}"> </task> </task\-node>
Then in your controller bean you would have something like:
@Out(scope = ScopeType.BUSINESS_PROCESS, required = false) private String description; @In private Map<String, String> messages; //other class code omitted @EndTask public String save() { description = messages.get("my_descripton_key"); // your other processing code here }
Hope this makes sense.
-
2. Re: JBPM task description localization via EL
roben Jan 25, 2010 11:02 AM (in response to roben)Thank you. But I solved this problem in a different way: i simply stored the message-key in the task description and let the view resolve it. This has some benefits i didn't think of the first time. Firstly if you update your message-bundle the task-descriptions will be updated too and secondly if people with different locales are working on the same task they would get only the translation from the actor who started the task if it were resolved upon task-deployment.
-
3. Re: JBPM task description localization via EL
cbensemann Jan 25, 2010 8:38 PM (in response to roben)I figured you had solved it as it was such an old post. I just found it while I was looking for a solution to a similar problem and thought I would share my solution. Thanks for sharing yours - I hadn't thought of sharing a message key but I'm sure that will come in handy in the future. I needed to store the actual values as they are user entered description fields so I don't need to worry about internationalization.