Web Services API: WorkflowContext specifications and usage

The WorkflowGen Web Services API uses WorkflowContext data structure in important web methods such as:

  • CompleteActivityInstance

  • GetActivityInstanceContext

  • StartProcess

WorkflowContext is an XML data structure used to exchange parameters with WorkflowGen. The XML data structure is based on the ADO.NET Dataset object (serialized in XML) or the ADO Recordset (serialized in XML). This means that the structure is similar to database tables and records.

This article will use the ADO.NET Dataset format for the WorkflowContext. Here’s an example of a WorkflowContext:

        <textValue>My company</textValue>
        <fileDescription>My report</fileDescription>

<NewDataSet> node

This is a Dataset object that contains a set of parameters (parameter nodes) and one session information (session node).

<Parameter> node

The Parameter node contains information about the parameter to exchange with WorkflowGen web method:

  • <name> node: The name of the parameter defined in the Workflow Action.

  • <dataType> node: This node can have one of the following values: TEXT, NUMERIC, DATETIME, FILE.

  • <direction> node: This node can have one of the following values: IN, OUT, or INOUT.

  • <textValue> node: The text value of the parameter.

  • <numericValue> node: The numeric value of the parameter.

  • <dateTimeValue> node: The datetime value of the parameter. The date format is xsd:dateTime. Note that Datetime values are stored in GMT.

  • <fileName> node: The file name.

  • <fileDescription> node: The file description.

  • <fileSize> node: The file size in bytes.

  • <fileDateLastModified> node: The date of the last modification of the file. The date format is xsd:dateTime.

  • <fileContentType> node: The file MIME type.

  • <fileOriginalPath> node: The original path of the file (for information only).

  • <filePath> node: The file path. WorkflowGen uses this path to retrieve the file.

WorkflowContext creation with WorkflowGen.My

To simplify WorkflowContext creation and modification you can use WorkflowGen.My and its WorkflowGen.My.Data.ContextParameters class. Here’s an example in C#:

WorkflowGen.My.Data.ContextParameters myWorkflowContextParameters = new WorkflowGen.My.Data.ContextParameters();

WorkflowGen.My.Data.ContextParameter contextParamApproval = new WorkflowGen.My.Data.ContextParameter();

contextParamApproval.Name = "DECISION";

contextParamApproval.Direction = WorkflowGen.My.Data.ContextParameter.Directions.Out;

contextParamApproval.Type = typeof(string);

contextParamApproval.Value = "YES";



string workflowContext = myWorkflowContextParameters.GetXml();

Is there a limitation to how many parameters can be sent? Maybe a limit to the length of the url?

Hi @jason.smith,

This depends on the browser’s limitation. If you think you’ve reach a limit, it’s better to use an HTTP POST instead of an HTTP GET request.


1 Like