Skip to main content
I am trying to write a service that periodically goes through all the process instances on our server and changes their priorities based on some business rules.

I've been able to get a list of process id's and can access their priorities using the k2mng.dll

However, the k2mng processinstance interface does not provide a method for viewing the process data or xml fields for each instance.

I was trying to use GetProcData method of FilterInstance.asmx in the WorkspaceService folder to get the process data but I don't know what arguments to pass it.

This is the soap request format it uses:

POST /K2V3/WorkspaceService/FilterService.asmx HTTP/1.1
Host: o2ck2dev.pens.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/GetProcData"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetProcData xmlns="http://tempuri.org/">
<PartID>int</PartID>
<UserToken>string</UserToken>
<TemplID>int</TemplID>
</GetProcData>
</soap:Body>
</soap:Envelope>



I tried running the service from the test form using my procId as the PartID, my username as UserToken and the templID which I got from another call to the service. But it returns:

System.Data.SqlClient.SqlException: Could not find stored procedure 'pProcData'.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at WorkSpaceService.FilterService.GetProcData(Int32 PartID, String UserToken, Int32 TemplID)


I'm wondering if the Workspace.dll creates the stored proc before it calls the web service and then deletes it.

Does anyone have any ideas on how to call this service, or if not maybe an alternate way to gain access to the process data fields of all the procInstances?
Be the first to reply!

Reply