Skip to main content
Nintex Community Menu Bar

Value cannot be null.Parameter name: replacement

  • August 16, 2007
  • 5 replies
  • 21 views

Forum|alt.badge.img+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

Forum|alt.badge.img+11
  • Nintex Employee
  • August 16, 2007

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


Forum|alt.badge.img+9
  • Author
  • August 17, 2007

Hi All,


Thanks a lot for replying.


I have attached the screenshot of the Client Event Template.


Pls guide.


Thanks and Regards


14450i2C2CA38A2FE79626.jpg

Forum|alt.badge.img+11
  • Nintex Employee
  • August 17, 2007

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


Forum|alt.badge.img+9
  • Author
  • August 20, 2007

Hi,


Thanks a lot for replying.


Forum|alt.badge.img+4
  • October 3, 2007
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.