ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | shark List | December 2004 Index

<--  Date Index     <--  Thread Index    

Reassign problem


Hi,

I'm using Shark 1.0 and am not able to get "reassign" to work.  An activity 
gets assigned to all users within a group.  And, one of the users accepts 
the assignment and this is the code that is getting executed ...

WfAssignment as = adm.getExecutionAdministration().getAssignment(procId, 
actId, user);
if(as != null)
{
   as.set_accepted_status(true);
}

... and this completes without any exceptions/errors.  And, I can see that 
the accept worked as I cannot see anymore an assignment for this activity in 
the WfAssignment[] returned by WfResource.get_sequence_work_item(0) for any 
other user in the group.  Later, the user that accepted the assignment tries 
to reassign it and this is the code being executed  ...

WfAssignment as = adm.getExecutionAdministration().getAssignment(procId, 
actId, user);
if(as != null)
{
   WfResource res = adm.getExecutionAdministration().getResource(anotheruser);
   if (res != null)
   {
      as.set_assignee(res);
   }
}

The set_asignee() call always throws this exception ...
 
org.enhydra.shark.api.client.wfmodel.InvalidResource: Such assignment already 
exists!
        at 
org.enhydra.shark.WfAssignmentImpl.set_assignee(WfAssignmentImpl.java
:102)
        at 
org.enhydra.shark.WfAssignmentWrapper.set_assignee(WfAssignmentWrappe
r.java:113)
        at 
org.enhydra.shark.WfAssignmentWrapper.set_assignee(WfAssignmentWrappe
r.java:79)


What am I doing wrong here ?

Thanks for your help,
Srini M



<--  Date Index     <--  Thread Index    

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.