Click or drag to resize

RuntimeServiceUpdateProcessInstanceComment Method

Update an existing request comment.

Namespace:  Advantys.Workflow.Web.Services.Processes.Runtime
Assembly:  Advantys.Workflow.Web.Services.Processes.Runtime (in Advantys.Workflow.Web.Services.Processes.Runtime.dll) Version: 7.7.0.0 (7.7.0.0)
Syntax
public void UpdateProcessInstanceComment(
	int processInstanceId,
	int commentNumber,
	string message
)

Parameters

processInstanceId
Type: SystemInt32
Request ID of the comment.
commentNumber
Type: SystemInt32
Number of the comment
message
Type: SystemString
The comment text
Remarks

Optional Parameters.
These parameters can be used in the query string or as parameters of the SOAP headers (see examples for more information).
*** Important: The tag and geolocation data will be reset if they are not provided as part of the update operation.

delegateUsername (string)Specifies the delegator username for delegation mode.
tag (string)Specifies the tag value for additional information.
geoLocationLatitude (double)Specifies the GeoLocation latitude.
geoLocationLongitude (double)Specifies the GeoLocation longitude.
geoLocationAltitude (double)Specifies the GeoLocation altitude.

Examples
Try out these URLs directly in your browser.
- Update the comment #1 of request #1 (Tag and geolocation data will be reset):
http://yourserver:port/wfgen/ws/ProcessesRuntime.asmx/UpdateProcessInstanceComment?processInstanceId=1&commentNumber=1&message=Hello World!<br />
- Update the comment #1 of request #1 with tag and geolocation data:
http://yourserver:port/wfgen/ws/ProcessesRuntime.asmx/UpdateProcessInstanceComment?processInstanceId=1&commentNumber=1&message=Hello World!&tag=J9FH12TH4&geoLocationLatitude=43.21&geoLocationLongitude=87.65&geoLocationAltitude=1211.109<br />
- Update the comment #1 of request #1 with delegation security access from wfgen_admin:
http://yourserver:port/wfgen/ws/ProcessesRuntime.asmx/UpdateProcessInstanceComment?processInstanceId=1&commentNumber=1&message=Hello World!&delegateUsername=wfgen_admin

This HTTP GET sample updates the comment #1 of request #1.
using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
  class Program
  {
    static void Main(string[] args)
    {
        // Variables
        System.Net.HttpWebRequest httpWebReq = null;    // Http web request object
        System.Net.HttpWebResponse httpWebResp = null;  // Http web response object
        System.IO.StreamReader myReader = null;         // To read response stream
        string url = string.Empty;                      // URL of the web method of the API
        string response = null;                         // string used to display response

        // Call the Web Service API method (replace yourserver and port with your hostname)
        url = "http://yourserver:port/wfgen/ws/ProcessesRuntime.asmx/UpdateProcessInstanceComment?processInstanceId=1&commentNumber=1&message=Hello World 2!";

        // Prepare the request
        httpWebReq = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(url);
        httpWebReq.Method = "GET";
        httpWebReq.Credentials = System.Net.CredentialCache.DefaultCredentials;
        httpWebReq.ContentType = "text/xml; charset=utf-8";

        // Gets the stream associated with the response
        httpWebResp = (System.Net.HttpWebResponse)httpWebReq.GetResponse();
        myReader = new System.IO.StreamReader(httpWebResp.GetResponseStream());
        response = myReader.ReadToEnd();
        httpWebResp.Close();

        // Display the XML in the console
        Console.Write(response);
    }
  }
}

This SOAP example updates the comment #1 of request #1 with tag and geolocation data.
A web reference at www.mycompany.com has been added in the project.
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Net;
using System.Xml;
using System.Xml.Xsl;
using com.mycompany.www;
<br />
public partial class _Default : System.Web.UI.Page
{
    protected RuntimeService myRuntimeService = null;
<br />
    protected void Page_Load(object sender, EventArgs e)
    {
        ProcessInstanceCommentHeader myProcessInstanceCommentHeader = null;
<br />
        // Settings and parameters
        myProcessInstanceCommentHeader = new ProcessInstanceCommentHeader();
        myProcessInstanceCommentHeader.Tag = "J9FH12TH4";
        myProcessInstanceCommentHeader.GeoLocationLatitude = 43.21;
        myProcessInstanceCommentHeader.GeoLocationLongitude = 87.65;
        myProcessInstanceCommentHeader.GeoLocationAltitude = 1211.109;

        // Set NetworkCredentials with the credentials of the current connected user
        myRuntimeService = new RuntimeService();
        myRuntimeService.ProcessInstanceCommentHeaderValue = myProcessInstanceCommentHeader;
        myRuntimeService.Credentials = CredentialCache.DefaultCredentials;
<br />
        // Call the Web Service API method
        myRuntimeService.UpdateProcessInstanceComment(1, 1, "Hello World 3!");
    }
}
<br />
See Also