[JBoss jBPM] - context variables not being persisted
by mabogunje
I have jbpm set up using the in memory HSQL DB. I have written a simple unit test creating process variables on the context instance loke so :
ProcessDefinition definition = jbpmContext.getGraphSession().getProcessDefinition(Long.parseLong(instanceTO.getTemplateId()));
ProcessInstance instance = new ProcessInstance(definition);
ContextInstance contextInstance = (ContextInstance) instance.getInstance(ContextInstance.class);
contextInstance.setVariable(name,"name");
contextInstance.setVariable(test,"test");
jbpmContext.save(instance);
However when I load the instance again, those variables do not exist. Debugging into my code I find that when the variables are created they exist in a transientInstances list while the instances list remains null.
I dont know why these variables are not being persisted. any ideas ?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4135347#4135347
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4135347
18 years, 1 month
[JBoss Portal] - "sendRedirect cannot be called after " with new portletbridg
by avogt_sundn
I get the following exception with the new portletbridge 1.0.0.B
16:18:50,797 ERROR [STDERR] java.lang.IllegalStateException: sendRedirect cannot be called after setPortletMode/setWindowState/set
| RenderParameter/setRenderParameters has been called previously
| 16:18:50,797 ERROR [STDERR] at org.jboss.portal.portlet.impl.jsr168.api.ActionResponseImpl.sendRedirect(ActionResponseImpl.jav
| a:153)
I tried to figure out why:
The portletbridge caused a setRenderParameter(..) call that prevents the redirect. It sets the parameter javax.faces.portletbridge.STATE_ID
Daemon Thread [http-localhost%2F127.0.0.1-8080-2] (Suspended (breakpoint at line 177 in ActionResponseImpl))
JBossActionResponse(ActionResponseImpl).setRenderParameter(String, String) line: 177
| PortletStateHolder.getStateId(FacesContext) line: 247
| PortletStateHolder.getWindowState(FacesContext) line: 164
| AjaxPortletBridge.doFacesRequest(ActionRequest, ActionResponse) line: 140
| GenericFacesPortlet.processAction(ActionRequest, ActionResponse) line: 165
If I patch the JBossActionResponse class I'd get around the illegal state.
Armin
Is there a legal way to allow a redirect during a JSF commandbutton action?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4135340#4135340
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4135340
18 years, 1 month