Edit String table data in K2 via K2 API

  • 11 January 2011
  • 3 replies
  • 0 views

Badge +3

Can we change the data in string table in K2 via K2 API??


if can how?? because i need some data in string table to be changed by using asp


 


thx


3 replies

Badge +8

You can using the WorkflowManagementServer object. Have a look at the following location in the Help File, find the GetStringTable and UpdateStringTable methods:


SourceCode.Workflow.Management Assembly > SourceCode.Workflow.Management Namespace > WorkflowManagementServer 

Badge +3

Hi DC,


 


Thanks for the answer, but i already check the updatestringtable method but it just boolean without any parameter to input with (so how i want to update the data in the string table??) and for the getstringtable method the parameter input is asking for environment but what i know is the key for stringtable


 


oyeah and i have a problem with workflow management server that i'm not authenticated to acces the getstringtable method, and i'm already using admin acces for it


 


thank you 

Badge +8

You can try the following:



SourceCode.Workflow.Management.WorkflowManagementServer oServer = new SourceCode.Workflow.Management.WorkflowManagementServer();


 


try


{


    oServer.CreateConnection();


    oServer.Connection.Open(BuildConnString());


 


    //Params:   Environment Name


    //          Old String table field Name


    //          New String table field Name


    //          New String table field Value


    oServer.EditStringTableEntry("Development", "Web Service URL", "Web Service URL", "http://localhost:80");


}


finally


{


    oServer.Connection.Close();


}


MessageBox.Show("Done");


You will still need the Name of the Environment and the field you want to update.


For your authentication issue, you will need to give more details on your environment. If you have a distributed environment, you will need to validate the Kerberos settings as per Help file.

Reply