Hello,

I need to set Token name when it is created. Token class allows setting name 
only through the constructor (setter setName() is missing). Starting the 
process is done like this:


  | JbpmContext context = getJbmContext();
  | ProcessDefinition pd = 
context.getGraphSession().findLatestProcessDefinition(definition);
  | context.setActorId(Actor.instance().getId());
  | ProcessInstance p = new ProcessInstance(pd);
  | TaskMgmtInstance taskMgmtInstance = p.getTaskMgmtInstance();
  | context.save(p);
  | TaskInstance task = taskMgmtInstance.createStartTaskInstance();
  | task.start();
  | task.end();
  | context.save(task);
  | context.close();
  | 

but ProcessInstance creates Token with empty name! 

I think the best solution would be another ProcessInstance constructor like 
this:


  | public ProcessInstance( ProcessDefinition processDefinition, String 
rootTokenName){ ... }

Is this a good idea? Feature request in Jira?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060018#4060018

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060018
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to