cancel
Showing results for 
Search instead for 
Did you mean: 

Web localization and start event varaiables

future_makers
Champ in-the-making
Champ in-the-making
I would ask about localization ?
I develop a web application and using html and jsp form  i can't use localiztion of struts or any
I face 2 problems
1- how to see my htttpsession from actvitiy engine ?
2- i had to path my messages bundle as a variables of process or task but i face big problems i can't path varaibales to start event and i path my varaiables using process scope but i can't see it

for examples to set varaibles and not see in render form method

RuntimeService runTimeService = activitiService.getRuntimeService();
ProcessInstance pi= runTimeService.startProcessInstanceById(processDef.getId(),variables);   request.setAttribute("newStartedPI", pi.getId());
MessageResources messages=this.getResources(request);               
activitiService.getRuntimeService().setVariable((String)request.getAttribute("newStartedPI"), "lables",messages );
activitiService.getRuntimeService().setVariable((String)request.getAttribute("newStartedPI"), "processDefId",processDefId);
Object startForm = activitiService.getFormService().getRenderedStartForm(processDefId);   
exception say  lables propety not exist


I hope to help me
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
You can't set variables on one process-instance and expect it to be present on the startForm of a new process-instance… The start-form actually works on an unexisting process-instance, so you can read any variables there (only write).

Since the engine doesn't know of the web-context (lib can be used anywhere), it's up to you to get the stuff you need from the request and pass it on to the activiti-engine, using variables.