Skip to main content

Hi All


I have a bit of an issue where i am actioning a workflow that is assigned to Sharepoint Group A.


I am dynamically creating the action link by URL + ProcessInstanceId _ ActivityInstanceDestinationID and storing this in a sharepoint list.


If there are two members in the sharepoint group to action the request - person A + person B ... if person A starts the workflow and continues it - all is fine, but if person B tries to action it after it is started i am sometimes getting


Exception message: 26030 Worklist item xxxx_xxx not found for K2:AAA123456 at 127.0.0.1:869


When i look in the FLOW chart - i can see the participants and both the correct participants form the sharepoint group are listed, but it seems the action link is only valid for the person that has started the workflow ????


I am writing the action link away to a sharepoint list as i am surfacing these in a sharepoint screen for actioning by status for any members of the sharepoint group to pick up.


Can anyone offer any advice on this please? Is it correct to write that action link away - and would it be valid for any members of the sharepoint group?


Any advice appreciated


Thanks


Bill


Just to add to this ... i have looked and can see Person A cannot access the item via the "URL + ProcessInstanceId _ ActivityInstanceDestinationID" but Person B CAN (person B started the workflow)... the item is however available to person A via the K2 webpart .. so im presuming the "URL + ProcessInstanceId _ ActivityInstanceDestinationID" is user specific ???? I have written this away to a sharepoint list ..


Is there anyway i can set the URL and destination id to be GROUP specific? ie; so that any user in the sharepoint group can action it from my written away link ???


Thanks again - Bill


 

Hi billirvine,


 


Unfortunately this will not be possible to make the form user specific, because of security reasons and validation purposes.


 


Kind regards,


Hi All,


Just to finish this off and answer the post in case it is of use to anyone else out there ...


1 - the serial as outlined procesinstanceid + _ + activitydestid is correct and would be valid for all users of the workflow ** WHILE the workflow item was 'available'.


My problem was that i was 'opening' the workflow item first, to show the 'actions available' in a custom .aspx form. This is what was changing the serial number.


The change i had to make was, when loading the actions into the dropdown list for people to view, use the overloaded method on openworklistitem - so as not to allocate the item. This still left the original SN i had written as valid - all now works.


Many thanks - Bill


The overloaded method to get the workflow actions for loading into a dropdown list is as below:


 public static IEnumerable<string> PossibleActionsForSN(string


serialNumber)


{

 



 



 


try


 



{



 



 



 


using (Connection wfConn = new Connection


())

{



 



 



 


string


host = K2HostName;

wfConn.Open(host, GetWorkflowConnectionString(


host,



 



 



 


SVSettings


.ConnectionStringPort,

 



 



 


SVSettings


.SecurityLabelName));

SourceCode.Workflow.Client.



 



 


WorklistItem item = wfConn.OpenWorklistItem(serialNumber, "ASP", false


);

 



 



 


return item.Actions.Cast<SourceCode.Workflow.Client.Action


>().Select(a => a.Name);

}


}



 



 



 


catch (Exception


ex)

{



LogException(



 



 


"PossibleActionsForSN."


, ex);

 



 



 


throw


;


Thanks for posting back Bill, I am sure this will be helpful to the community!


Reply