[jBPM Users] - Variables keep old values
by aroeder
I tried to update my variables after I changed them on a webpage. The code looks basicly like that:
| JbpmContext ctx = JbpmConfiguration.getInstance("jbpm.cfg.xml").createJbpmContext();
|
| TaskInstance currentTI = ctx.getTaskInstance(this.currentTaskInstanceID);
|
|
| Map<String, ? extends Object> variables = this.getFormDescription().getModelMap();
|
| if (variables != null) {
|
| currentTI.getContextInstance().addVariables(variables);
| }
|
| ctx.save(currentTI);
|
When I debug the code the variables from my model map contain the new values. Also the the values of the variables do change when I call addVariables. After calling ctx.save(currentTI); I expected that also values would change in the table JBPM_VARIABLEINSTANCE, but they don't.
What do I miss here?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268246#4268246
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268246
14 years, 4 months
[Installation, Configuration & Deployment] - Re: Unreasonable Problems with deployed EJBs
by jaikiran
You seem to be having a couple of issues:
1)
anonymous wrote : 09:24:01,137 ERROR [AllowedOperationsAssociation] getCallerPrincipal should not be access from this bean method: IN_EJB_CREATE, allowed is [IN_EJB_TIMEOUT, IN_BUSINESS_METHOD, IN_SERVICE_ENDPOINT_METHOD]
| java.lang.IllegalStateException: getCallerPrincipal should not be access from this bean method: IN_EJB_CREATE
| at org.jboss.ejb.AllowedOperationsAssociation.assertAllowedIn(AllowedOperationsAssociation.java:158)
| at org.jboss.ejb.StatelessSessionEnterpriseContext$SessionContextImpl.getCallerPrincipal(StatelessSessionEnterpriseContext.java:221)
| at com.acme.business.article.sessionBean.ArticleManagementEJB.sendError(ArticleManagementEJB.java:4044)
| at com.acme.business.article.sessionBean.ArticleManagementEJB.ejbCreate(ArticleManagementEJB.java:257)
As the message states, you are not allowed to call getCallerPrincipal from the ejbCreate method.
2)
anonymous wrote :
| What confuses me even more is that after I restarted the servers a few times without changing anything, the problem just disappears. One restart later the problem returns.
|
| And it isn't always the same EJB (in the exception above it is the Stateless session bean ArticleManagement), the problem occurs radomly in the existing beans, no matter if it is a session bean or an entity bean.
Looking at your stacktrace:
| org.jboss.ejb.StatelessSessionEnterpriseContext$SessionContextImpl.getCallerPrincipal(StatelessSessionEnterpriseContext.java:221)
| at com.acme.business.article.sessionBean.ArticleManagementEJB.sendError(ArticleManagementEJB.java:4044)
| at com.acme.business.article.sessionBean.ArticleManagementEJB.ejbCreate(ArticleManagementEJB.java:257)
the getCallerPrincipal probably gets called *only* when there is some other error and the ArticleManagementEjb decides to send/report that error. While doing so, it tries to get the caller principal - an operation which is not allowed. So effectively the original error is lost and you see this exception instead.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268234#4268234
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268234
14 years, 4 months