I am copying the xml back using the following code:
_pi.XmlFields["ASR"].Value = Utilities.GetString(_doc);
_conn.StartProcessInstance(_pi);
So the next step I load the xml into the web page. Fill in the values that are already filled out and then allow the user to complete the next part of the form. I then upload the xml and complette the activity like so:
_pi.XmlFields["ASR"].Value = Utilities.GetString(_doc);
WorklistItem _wli = _conn.OpenWorklistItem(Request.QueryString["SN"], "asp");
_wli.Actions["Form Complete"].Execute();
When I check the ASR field in debug it has the correct values but after this activity completes the new values are missing. I tried to update the xml in the activity as follows, assuming that the activity was overwriting the process when it completed, but I am receiving a XML field not found error:
WorklistItem _wli = _conn.OpenWorklistItem(Request.QueryString["SN"], "asp");
_wli.ActivityInstanceDestination.XmlFields["ASR"].Value = Utilities.GetString(_doc);
_wli.Actions["Form Complete"].Execute();
I also tried it with an index of [0] and it said that the index was out of bounds. I am thinking this is pretty easy and I am just missing something. Any help would be appreciated.