How to update the datafields..?

  • 9 April 2007
  • 8 replies
  • 3 views

Badge +1
Hi,
i have tried to update the process data fields of a particular process whose worklist item and serial nos i know,but its showing error "value cannot null"...


Connection con = new Connection();
con.Open("192.168.18.223", "[;];Authentication=External;User=sheshku;Password=");
WorklistItem wli = con.OpenWorklistItem("MDPTHAM33271, 1425, 58", "ASP");

wli.ProcessInstance.DataFields["CaseId"].Value = 2;
wli.Update();
wli.Finish();
textBox1.Text = wli.ProcessInstance.DataFields["CaseId"].Value.ToString();


plz help me regarding this..

8 replies

Badge +11
Which User Manager are u using? ADUM, SQLUM or custom?
Badge +1
I am using ADUM....I want to update the datafields by trying C# codes...
Badge +11
In that case your connections string may be the cause of the problem. Try to replace the line:
con.Open("192.168.18.223", "[;];Authentication=External;User=sheshku;Password=");
with
con.Open("192.168.18.223");
In this case, the logged-on user's credentials will be used to connect to the K2Server.

Otherwise, have a look in the Help file for valid connection string formats.

HTH,
Ockert
Badge +1
There is no problem in connection string....Please let me know how to update the data fields by writing codes....I am getting the following error....



Value cannot be null.
Parameter name: replacement
Badge +3
icon-quote.gifSanjeev:
There is no problem in connection string....Please let me know how to update the data fields by writing codes....I am getting the following error....

Value cannot be null.
Parameter name: replacement


I was just running into the same issue as you a few minutes ago with the exact same error. Mine turned out to be a bad escalation rule. When I checked the k2 errors in the service manager, there was an error there for an escalation on the process/activity I was trying to update. Once I remedied that error, it worked just fine.
Badge +5

This forum is great 🙂 I was actually breaking my head over the exact same problem for a whole week !


My event vwr showed the same error. To add to the complexity of the scenario: it were remote users that connect to our K2 and IIS server trough network NAT. They use basic authentication.


They saw the worklistitems, but when they tried to handle them, they got the exception: Value cannot be null, etc.


The same users managed to approve a request a week earlier though !


I was almost giving up, could not simulate the problem, until I discovered this thread.


I was also having an error on my escalation rule (mail field for the particular users was not filled in in AD)

Badge +2

OK, I believe I'm missing something here.


I am getting the same error: Value cannot be null. Parameter name: replacement


But, there are no errors, that I can see anyway, showing up in the manager or the workspace.


However, I will note that the error occurs when offsite people are accessing my applicaiton. Or, I have not seen the error with local users. And, I'm fairly certain it has worked for offsite people in the past.

Badge +2
If anyone is pondering my post, I'll now state that the SN was indeed invalid, causing the OpenWorklistItem call to cough. Cheers.

Reply