[JBoss jBPM] - Weird setting of variables to ActionHandler and TaskControll
by frantisek.kocun@gmail.com
Hi,
in TaskControllerHandler I set variables through public set method. It is because I need to set a collection of something, so I parse it in setMethod.
public class TaskController implements TaskControllerHandler {
private static Pattern PATTERN = Pattern.compile(";");
protected String[] transientVariables;
public void setPersistentVariables(String persistentVariables) {
this.persistentVariables = PATTERN.split(persistentVariables);
}
But in ActionHandler set method doesn't work and I need to do it this way
public class StartAction implements ActionHandler {
private static Pattern PATTERN = Pattern.compile(";");
String persistentVariables;
and parse persistentVariables later. Why set method doesn't work and if I use name of field in xml which doesn't exist or is private I get no error. It would be more safe to get an error always if field is not accesible or doesn't exist and to use set method if is available (or to require set method).
Thanks Fero
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4169296#4169296
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4169296
16 years, 7 months
[JBoss jBPM] - Deployment of Process Definition
by ragna
Hi there,
I wrote my first process definition which only consists of three nodes. I can deploy it over the web console and execute it from console and code without problem.
Now I want to deploy the process definition programmatically, and I get the following error:
| 14:57:43,683 ERROR [DbPersistenceService] hibernate commit failed
| org.hibernate.PropertyAccessException: could not get a field value by reflection getter of org.jbpm.graph.def.ProcessDefinition.events
| at org.hibernate.property.DirectPropertyAccessor$DirectGetter.get(DirectPropertyAccessor.java:35)
| at org.hibernate.tuple.entity.AbstractEntityTuplizer.getPropertyValue(AbstractEntityTuplizer.java:277)
| at org.hibernate.persister.entity.AbstractEntityPersister.getPropertyValue(AbstractEntityPersister.java:3581)
| at org.hibernate.engine.Cascade.cascade(Cascade.java:130)
| at org.hibernate.event.def.AbstractFlushingEventListener.cascadeOnFlush(AbstractFlushingEventListener.java:131)
| at org.hibernate.event.def.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:122)
| at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:65)
| at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
| at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
| at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
| at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
| at org.jbpm.persistence.db.DbPersistenceService.commit(DbPersistenceService.java:260)
| at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:218)
| at org.jbpm.svc.Services.close(Services.java:223)
| at org.jbpm.JbpmContext.close(JbpmContext.java:139)
| .......
|
I tried to load a process definition in code and save it, this works fine. But I reconized that the fields events and actions where filled with empty maps. In contrast : the process definition which i read from file has null values for this fields.
Is this a hibernate configuration issue? Has someone a hint?
Here is the code i use:
| JbpmContext jbpmContext = JbpmConfiguration.getInstance().createJbpmContext();
| try {
| ProcessDefinition emailProcess = ProcessDefinition.parseXmlResource("doorprocess/processdefinition.xml");
| jbpmContext.deployProcessDefinition(emailProcess);
| } finally {
| jbpmContext.close();
| }
Thanks for any help!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4169294#4169294
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4169294
16 years, 7 months
[JBoss jBPM] - Using variables in Expressions
by vanyatka
Hi,
I'd like to use a business context variable in the EL block, like this:
| <decision name="my node" expression="#{filteredBannersCount}">...
|
This variable is declared in SLSB (via Seam) like this:
@Out(scope = ScopeType.BUSINESS_PROCESS, required = false)
| private String filteredBannersCount;
However, it seems EL should point to methods only and not variables.
I get the following error trying to use it:
| 13:28:46,887 FATAL [application] javax.ejb.EJBTransactionRolledbackException: Identity 'filteredBannersCount' does not reference a MethodExpression instance, returned type: java.lang.String
| javax.faces.el.EvaluationException: javax.ejb.EJBTransactionRolledbackException: Identity 'filteredBannersCount' does not reference a MethodExpression instance, returned type: java.lang.String
|
Can we use business context vars in expressions?
Thanks,
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4169275#4169275
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4169275
16 years, 7 months