Roles and Destinations

  • 10 March 2008
  • 6 replies
  • 0 views

Badge +3

Hi


I'm having a problem getting my destination slots working how i'd like. I have a role which has several users.  The role is set as the destination.  I'd like for a user within that role to be able to open an item, then cancel it and still have it available to all the other users in the role. However, as soon as one user submits the form as opposed to cancelling, the process should continue and everyones work list items should be removed.


At present, once one user has opened an item, it is stopping any one else from seeing it.  I've tried playing with the advanced destination settings and can get it to stay available to all users but they then all must submit it before the process will move on.


Is there a way to achieve what I'm after?


Thanks for your help
P


p.s. this is BlackPearl sp1 within MOSS with custom webparts for the forms (New request, Approval etc) and a custom web part for the task list instead of the K2 worklist webpart.


6 replies

Badge +3

Hi PhillipaR,


It seems you are on the right track "At present, once one user has opened an item, it is stopping any one else from seeing it."


And it seems the part that's missing is the release: "I'd like for a user within that role to be able to open an item, then cancel it and still have it available to all the other users in the role."


To allow a user to "cancel" their choise of opening a worklist item, you'll need to call the Release() method on the WorklistItem.


if you're using ASP.NET, then you should already have something like the following working somewhere in your application, based on your description above:


   SourceCode.Workflow.Client.Connection conn = new SourceCode.Workflow.Client.Connection();
   SourceCode.Workflow.Client.WorklistItem wli = conn.OpenWorklistItem(mySerialNumber);
   wli.Actions[myAction].Execute();


all you'll have to do to allow users to release the worklist item is to call the release method like this:


    wli.Release();


you would do that instead of calling the Actions[].Execute() method.  Execute finishes the worklist item.


 


now if you're not using ASP.NET ... say you're using InfoPath, IP Forms Services, WF Integration, WinForms, or some other user interface, then you'll need to give the user access to the worklist item reference in some other way that's appropriate for your UI.


hope that helps.

Badge +9

PhillipaR,


Another option is to call the OpenWorklistItem with a different overload.  Since you are using custom webparts, you should have access to the OpenWorklistItem.  If so, check out the 3rd overload.  The last parameter of this method is called "Alloc".  If you pass in true (which is the default for overloads 1 and 2) it will change the status to "open" which I think causes the behaviour you are seeing.  If  you set Alloc = false, then the task can be programmatically opened without consuming the underlying slot.  FYI, the Platform parameter in the 2nd position of this overload can most likely be "ASP" (the default platform token and used in almost all cases, unless otherwise changed by the workflow developer).


For example:


                SourceCode.Workflow.Client.WorklistItem oWli = oConn.OpenWorklistItem(strSN, "ASP", false);


HTH.

Badge +3

Thank you both for your replies.  I went with the OpenWorklistItem(strSN, "ASP", false) option and it worked perfectly!


Thanks again
P

Badge

Hi,


 We're having the exact same issue w/ SP1.  Have you been able to resolve this?  803 won't install on any environments that have the default install path other than C:


 


Thanks,


G

Badge

Sorry for this post, i didn't see the replies until i logged in.


 


G

Badge +6

Could you please indicate how to actually release a worklist item from InfoPath?


 


Let's say that two actions may be configured, one to Save (updates the task), and one to Submit (complete the task) for the activity.


 


The event would be an InfoPath Client event off course, but how will I go about to ensure the worklist item is in fact released when a user


of the group (activity destination) opens the task, make some changes and Save it. I would like the task to then be released and made


available for other users to open. I do not wish to make use of managed code behind the Form though.


 


Any help appreciated.

Reply