[jboss-user] [JBoss jBPM] - process variables out of session

2008-08-05 Thread [EMAIL PROTECTED]
Hi, I use variables (business objects) in ActionHandler

public class Task_ABC implements ActionHandler{

public void execute(ExecutionContext executionContext) throws Exception 
{
ContextInstance c = 
executionContext.getProcessInstance().getContextInstance();

Abc abc= (Abc) c.getVariable(abc);

 do something ...
 
executionContext.leaveNode();
}
}

Problem is that this variables are not registered in session, if variable has 
an association and I use it, I get an exception. But if I have variable class 
has only primitive attributes (String, BigDecimal..) it works perfectly. 
Workaround is to declare all association in Hibernate as lazy=false what I 
don't want. But really interesting is, that if I change value in variable that 
it will be stored in db. That means that jbpm will register variables in 
Hibernate session but later and I don't know when.

I don't use any special workflow configuration. This is snip set from my 
workflow interface:




public class WorkflowService extends HibernateDaoSupport implements 
IWorkflowService {

private static JbpmConfiguration jbpmConfiguration = 
JbpmConfiguration.getInstance();


public void startWorkflow(Workflow workflow, MapString, Object 
variables) {
JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
jbpmContext.setSessionFactory(getSessionFactory());
jbpmContext.setSession(getSession());

try {
 ProcessInstance processInstance = 
jbpmContext.newProcessInstanceForUpdate(workflow.getFullName());
 
processInstance.getContextInstance().setTransientVariables(variables);
 processInstance.signal();
} finally {
jbpmContext.close();
}
}

Thanks

Fero


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4168667#4168667

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4168667
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss jBPM] - process variables - how to acces

2008-01-18 Thread Pebbels
Hi @all,

I am confused in using process variables:

I have a processdefinition.xml which calls an ActionHandler when leaving a node.
Within this ActionHandler I need the value of an input field from a form(xhtml) 
which belongs to processdefinition.xml.
- The form includes an input type 'date' its value I need within the 
ActionHandler.
So I am having the following questions:
1. Is 'date' a process variable?
2. How to acces the value of 'date' within the ActionHandler?

Thx for help,
Tina

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4121250#4121250

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4121250
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss jBPM] - process variables

2007-08-23 Thread galvino
hi, want to define process variables, into my processdefinition.
have you got an tutorial or an example ?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4077230#4077230

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4077230
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user