Value cannot be null.Parameter name: replacement

  • 16 August 2007
  • 5 replies
  • 1 view

Badge +9

Hi All,


Consider this scenario :


I created a process where I have one client event which assigns a task to a user(A).


In .NET , using K2ROM dll, I opened the worklist for that user(A). Then I opened the worklistitem for that user(A) and redirected the worklistitem to another user(B).


Then I opened the worklist for B. And when i tried to finish the worklistitem , i got the error : "Value cannot be null.Parameter name: replacement".


What I also found out is that , this error comes when we redirect a worklist to another user from Service Manager also.


I have broken my head over this.


The following is the code  :


Connection

oK2Connection = new Connection();


Worklist oWorkList;


 


oK2Connection.Open(

"server", "[;];Authentication=External;User="A";Password=");


oWorkList = oK2Connection.OpenWorklist(

"ASP");


 foreach (SourceCode.K2ROM.WorklistItem oWorkListItem in oWorkList)


{


if (oWorkListItem.Status == WorklistStatus.Available)


oWorkListItem.Finish(true);


if (oWorkListItem.Status == WorklistStatus.Available)


{


oWorkListItem.Redirect(

"B");


oWorkListItem.Update();


}


I would also like to add that while executing oWorkListItem.Update(); , I am getting the error .


The bottomline is after redirecting to another user, the error comes.


Maybe I am missing something.


 


Please guide.


Thanks and Regards


5 replies

Badge +11

My guess is that the problem is in your process definition and in particular your Client Event.  Can you give us the code behind your client event?  (or a screenshot of the Client Event Template in K2.net Studio)


Regards,


Ockert

Badge +9

Hi All,


Thanks a lot for replying.


I have attached the screenshot of the Client Event Template.


Pls guide.


Thanks and Regards


14450i2C2CA38A2FE79626.jpg
Badge +11

Yes, that's your problem.  Where did you get this code from?  Go through the training material, configure a client event through the wizard and have a look at the code behind.


Regards,


Ockert

Badge +9

Hi,


Thanks a lot for replying.

Badge +4
we've found this error can also occur when you attempt to complete an activity using it's Serial No via the K2ROM, but the process is in an error state.

Reply