.Net activity mapping parameters

This topic covers the information related to mapping parameters.

  • You can only provide static values for an input variable.

  • A parameter type containing a question mark (for example, Boolean?) indicates the parameter is nullable.

  • All the columns configured in the complex and dynamic complex variables appear in the drop down as per the names that you have provided for the columns.

  • TotalAgility does not support Dynamic Complex variable mappings on more than two levels.

  • The Dynamic Complex variables are always passed as an object to the custom .Net method. For example, a String array (public boolean methodName (string[][] StringArray) as an input parameter on your custom DLL does not work, as TotalAgility passes a Dynamic Complex variable as an object. Instead, use the public boolean methodName (object StringArray,) and then convert the object to string[][] in your method.

  • If a data object variable is created from a data model containing a list field that has data objects along with nested object fields, you can map the list to an array and use nested object fields within the list. You can display all the columns configured in the data list along with the nested object fields up to nine levels.

  • TotalAgility does not support DataSet parameters.

  • To help transfer asset binary data, map string variables as an input or output to byte[] array type parameter. The variable must contain asset ID as a value. If mapped to the output variable, this value can be empty.

  • To allow the binary content of a document to be optionally used (instead of the document instance ID), map the document variable as input or output to a binary stream or byte array type parameter and specify the mime type. A document's binary data can be of different mime types (such as PDF, TIFF, or JPEG). Therefore, you need to specify the mime type of the binary data to be correctly retrieved or updated in the capture document content at runtime.

  • If the document variable is mapped to a string variable type, it is possible to retrieve or update the document by specifying the binary data as a base64 string instead of the instance ID. The “Data as Base64 string” or “Instance id” options are available if a document variable is mapped to a string variable as input or output. By default, the “Instance id” is selected as the mapping type. If the data is set as base64 string, you must specify a mime type. If the specified mime type is not available in the document, the system reports an error at runtime.

    When executing a .Net activity, for an input parameter, the document data is read and passed as byte[] or binary stream to the mapped API parameter. For an output parameter, the document data is set from the supplied byte[] or a stream. If the document variable points to an existing capture document, a new document is created instead of updating the old document data.

    See the mime types supported by TotalAgility. The "XLT" mime type is not applicable for a .Net activity.

Troubleshooting: Data mapped incorrectly when using a complex variable in a .NET method configuration

If you map a complex variable itself and do not map the columns to the properties on the returned .NET class in a method but map them outside of the method, the resulting data may not be in the order necessary to properly map the columns to the variables.

Mapping the properties on the returned .NET class to complex variable columns in the method configuration assures that the data is correctly mapped.

See the following example of the .NET method configuration.

This image displays the configuration of the Dynamic Complex variable.active

This image displays the configuration of the .NET method that uses a complex variable mapped to the Return Parameter, ResourceIdentity[].Active

This image displays the correct configuration of the .NET method using the complex variable where each column of the variable is also mapped to the property on the returned .NET class.Active