[jboss-user] [JBoss jBPM] - assigning user to taskinstance, does nothing
ricardomarques
do-not-reply at jboss.com
Wed Aug 22 10:04:23 EDT 2007
Hi guys
I'm trying to reassign a task instance to a new user, but i can't, the information don't get saved on database, and i get no error output, i think that's some with the way that the connection to the engine is made.
I open a connection when the first JSF phase begins and ended when the JSF las phase ends.
were are some code:
Code from my Command interface implementation:
| public Object execute(JbpmContext jbpmContext) throws Exception {
|
| /* Verify if all the needed attributes are set */
| if ((this.taskInstanceId == 0) || (this.username == null))
| throw new NotSetWorkflowException("missing required command attributes!");
|
| /* updates the task instance with new actor */
| TaskInstance taskInstance = jbpmContext.getTaskInstanceForUpdate(this.taskInstanceId);
| taskInstance.setActorId(username,true);
|
| return taskInstance;
| }
|
This code is called like this:
| Command cmd = new AssignUserToTaskCommand(taskInstanceId,username);
| engine.execute(cmd); // -> this calls the command.execute()
|
my phase listenner:
| public void beforePhase(PhaseEvent phaseEvent) {
|
| if (phaseEvent.getPhaseId() == PhaseId.RESTORE_VIEW) {
| getJbpmEngine(phaseEvent).openJbpmContext();
| }
|
| }
|
| public void afterPhase(PhaseEvent phaseEvent) {
|
| if (phaseEvent.getPhaseId() == PhaseId.RENDER_RESPONSE) {
| getJbpmEngine(phaseEvent).closeJbpmContext();
| }
|
| }
|
|
Jbpm: 3.2.1
mysql 5
Jboss 4.0.5
I appreciate some feedback on this please, thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4076876#4076876
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4076876
More information about the jboss-user
mailing list