updating the datafields of a process instance in an error state

  • 23 December 2010
  • 3 replies
  • 2 views

Badge +11

Hi


I am planning to use the GOTOActivity to move a certain process instance to a previous step (Activity). the problem is that i need to update some datafields before i apply the GOTOActivity .


how is that possible in both the workspace and code?


What table in what k2server database is responsible for saving current datafields of the process instance?


3 replies

Badge +11

Hi


The table is _FieldActInst in the k2server dataBase.





can updating be done on the datafields of a process instance that is in error state




Badge +8

Can be done in Code, snippet below:



SourceCode.Workflow.Client.Connection wfConn = new SourceCode.Workflow.Client.Connection();


 


try


{


    wfConn.Open("blackpearl");


 


    SourceCode.Workflow.Client.ProcessInstance oProc = wfConn.OpenProcessInstance(24);


 


    // Update fields that were not correctly updated by a previous SmO call or data update


    oProc.DataFields[0].Value = 15;


 


    oProc.Update();


}


finally


{


    wfConn.Close();


}



Note that the account executing this code will need to have Admin permissions on the Process.


 

Badge +11

Many thanks DC

Reply