# Applications

## Applications screen

In the left menu on the Administration Module home page, click  ![](https://content.gitbook.com/content/KjZcMxkzmJaMCI7tSLjB/blobs/yDV189CpV6iWa4R0jzJV/left_menu_applications_small.png)  to display the **Applications** screen.

<figure><img src="https://content.gitbook.com/content/KjZcMxkzmJaMCI7tSLjB/blobs/35IW9LLiB9y2c5mQVx2G/applications_list.png" alt=""><figcaption></figcaption></figure>

## Menu banner

<table data-header-hidden><thead><tr><th valign="top">Buttons</th><th valign="top">Remarks</th></tr></thead><tbody><tr><td valign="top"><strong>Buttons</strong></td><td valign="top"><strong>Remarks</strong></td></tr><tr><td valign="top">Refresh</td><td valign="top">Refreshes the displayed application list</td></tr><tr><td valign="top">New application</td><td valign="top">Opens a blank <strong>New application</strong> form</td></tr></tbody></table>

## Filters

<table data-header-hidden><thead><tr><th valign="top">Filter on *</th><th valign="top">Remarks</th></tr></thead><tbody><tr><td valign="top"><strong>Filter on *</strong></td><td valign="top"><strong>Remarks</strong></td></tr><tr><td valign="top">Name</td><td valign="top">Filters by application name</td></tr><tr><td valign="top">Description</td><td valign="top">Filters by application description</td></tr></tbody></table>

\* A filter can be applied to a part of a field.

<table data-header-hidden><thead><tr><th valign="top">External filters</th><th valign="top">Remarks</th></tr></thead><tbody><tr><td valign="top"><strong>External filters</strong></td><td valign="top"><strong>Remarks</strong></td></tr><tr><td valign="top">Active</td><td valign="top">Displays active applications only</td></tr></tbody></table>

## Applications list

<table data-header-hidden><thead><tr><th valign="top">Columns</th><th valign="top">Remarks</th></tr></thead><tbody><tr><td valign="top"><strong>Columns</strong></td><td valign="top"><strong>Remarks</strong></td></tr><tr><td valign="top">Order</td><td valign="top">Use the arrows to change the order in which the applications are listed when adding or editing a workflow action</td></tr><tr><td valign="top">Name</td><td valign="top">Application name (click to display the application form in edit mode)</td></tr><tr><td valign="top">Description</td><td valign="top">Application description</td></tr><tr><td valign="top">Active</td><td valign="top">Application active status</td></tr><tr><td valign="top">Utilization</td><td valign="top">Number of actions in which the application is used</td></tr></tbody></table>

## Application form

### General tab

{% hint style="info" %}
These fields are displayed as applicable to the selected application type.
{% endhint %}

<table data-header-hidden><thead><tr><th valign="top">Fields</th><th valign="top">Remarks</th></tr></thead><tbody><tr><td valign="top"><strong>Fields</strong></td><td valign="top"><strong>Remarks</strong></td></tr><tr><td valign="top">Name</td><td valign="top">Unique identifier for the application; must respect nomenclature and be limited to 30 characters (required field)</td></tr><tr><td valign="top">Description</td><td valign="top">Application description limited to 255 characters (required field)</td></tr><tr><td valign="top">Type</td><td valign="top"><p>Application type:</p><ul><li>Assembly</li><li>Asynchronous Web Procedure</li><li>Incoming Webhook</li><li>Non Interactive Client</li><li>SOAP Web Service</li><li>WCF Service</li><li>Web Application</li><li>Web Procedure</li></ul></td></tr><tr><td valign="top">URL</td><td valign="top">The relative or the absolute URL of the application; both will work (required field)</td></tr><tr><td valign="top">WSDL</td><td valign="top">The WSDL URL to define a WSDL-based web service (if applicable); see <a href="#wsdl-web-services">WSDL web services</a> for details on WSDL-based web services</td></tr><tr><td valign="top">Username *</td><td valign="top">Username to be used if an authentication is required to access the application’s URL</td></tr><tr><td valign="top">Password *</td><td valign="top">Password to be used if an authentication is required to access the application’s URL</td></tr><tr><td valign="top">Content type</td><td valign="top"><p>Type of data encoding to be used when the application returns to WorkflowGen: </p><ul><li><code>application/x-www-form-urlencoded</code></li><li><code>application/xml; charset=UTF-8</code></li><li><code>application/json</code></li><li><code>multipart/form-data</code></li></ul></td></tr><tr><td valign="top">Context format</td><td valign="top"><p>Defines the format type of the context parameters exchanged between the application and WorkflowGen:</p><ul><li>JSON</li><li>XML ADO.NET DataSet (default WorkflowGen schema)</li><li>XML ADO Recordset</li></ul></td></tr><tr><td valign="top">Schema definition</td><td valign="top">If checked, the schema will be embedded inline in the XML (for XML context formats only)</td></tr><tr><td valign="top">Parameters</td><td valign="top">Application parameters (a link displays the parameters form in edit mode)</td></tr><tr><td valign="top">Default application</td><td valign="top">If checked, the application is selected by default</td></tr><tr><td valign="top">Active</td><td valign="top">If checked, the application is active</td></tr><tr><td valign="top">Impersonate username</td><td valign="top">A WorkflowGen username to impersonate by the application (for the <strong>Incoming Webhook</strong> and <strong>Non Interactive Client</strong> application types)</td></tr><tr><td valign="top">Client ID</td><td valign="top">A client ID from the <code>registered application</code> of your authentication service provider e.g. Azure Active Directory (for the <strong>Non Interactive Client</strong> application type)</td></tr></tbody></table>

\* Only needed by the web procedures and the web services.

### Parameters tab

<figure><img src="https://content.gitbook.com/content/KjZcMxkzmJaMCI7tSLjB/blobs/i9DJVcahpaAyvrhZtX87/applications_parameters_screen.png" alt=""><figcaption></figcaption></figure>

<table data-header-hidden><thead><tr><th valign="top">Columns</th><th valign="top">Remarks</th></tr></thead><tbody><tr><td valign="top"><strong>Columns</strong></td><td valign="top"><strong>Remarks</strong></td></tr><tr><td valign="top">Name</td><td valign="top">Application parameter name</td></tr><tr><td valign="top">Description</td><td valign="top">Application parameter description</td></tr><tr><td valign="top">Data type</td><td valign="top">Application parameter data type</td></tr><tr><td valign="top">Direction</td><td valign="top">Application parameter direction</td></tr><tr><td valign="top">Required</td><td valign="top">Required parameter</td></tr><tr><td valign="top">Default</td><td valign="top">Optional parameter; displays the parameter in the parameter list of the actions based on the current application by default</td></tr></tbody></table>

### Adding an application parameter

Click the **Add** button to open the **Add an application parameter** panel.

<table data-header-hidden><thead><tr><th valign="top">Fields</th><th valign="top">Remarks</th></tr></thead><tbody><tr><td valign="top"><strong>Fields</strong></td><td valign="top"><strong>Remarks</strong></td></tr><tr><td valign="top">Name</td><td valign="top">Application parameter name (required field; see the list of XML naming rules below)</td></tr><tr><td valign="top">Description</td><td valign="top">Application parameter description (required field)</td></tr><tr><td valign="top">Data type</td><td valign="top"><p>Application parameter data type:</p><ul><li>Text</li><li>Numeric</li><li>Date/Time</li><li>File</li></ul></td></tr><tr><td valign="top">Direction</td><td valign="top"><p>Application parameter directions: </p><ul><li>IN (send the value into the parameter)</li><li>OUT (receive the value from the parameter)</li><li>INOUT (send and receive the value into and from the parameter)</li></ul></td></tr><tr><td valign="top">Required</td><td valign="top"><p>Is this parameter required? </p><ul><li>Yes (disables the default property)</li><li>No (enables the default property)</li></ul></td></tr><tr><td valign="top">Default</td><td valign="top">If checked, the parameter is displayed in the parameter list of the action based on the current application</td></tr></tbody></table>

{% hint style="info" %}
Application parameter names should respect the following XML naming rules:

* They should begin with a letter or an underscore
* They should contain only letters, digits, hyphens, underscores, and periods
* They should not contain spaces
* They should not begin with the letters `XML` in any case (e.g. `xml` or `Xml`)

For more information, see <https://www.w3schools.com/xml/xml_elements.asp>.
{% endhint %}

## Deleting an application

An application cannot be deleted if it's used in a process.

## Deleting a parameter

A parameter cannot be deleted if its application is used in a process.

## Assembly application

This application allows you to declare a .NET class method as a workflow application. This is the fastest solution to develop a custom workflow application (compared to web services). The execution performance is exceptional because WorkflowGen instantiates the assembly directly without network communication or web service authentication.

#### 📌 **Example**

1. Copy a sample `.dll` assembly into a WorkflowGen `bin` folder.
2. In the **Administration Module**, click ![](https://content.gitbook.com/content/KjZcMxkzmJaMCI7tSLjB/blobs/0YhJVivYoGegogeIF3XO/left_menu_applications_small.png) in the left menu and then **New application**.
3. Enter the following information in the appropriate fields:
   * **Name:** `SAMPLE_GET_STRING`
   * **Description:** Returns a string with a `!` (exclamation point)
   * **Type:** Assembly
4. **Assembly full name or path:** `WorkflowAppSample`
5. Click **Save**.

* **Class full name:** Select `WorkflowApp.Test`
  * **Method:** Select `GetString`

These parameters are automatically generated:

* **IN:** `message` (Text)
* **OUT:** `RETURN_VALUE` (Text)

You can now use this workflow application in your process.

## WCF service application

This application allows you to declare a WCF service client proxy .NET class method as a workflow application.

#### 📌 **Example**

1. In the WorkflowGen **Administration Module**, click ![](https://content.gitbook.com/content/KjZcMxkzmJaMCI7tSLjB/blobs/FDRo1eq0OQ8J4F8c7V83/left_menu_applications_small.png) in the left menu and then **New application**.
2. Enter the following information in the appropriate fields:
   * **Name:** `WCFSERVICE_SAMPLE_GET_STRING`
   * **Description:** Returns a string with a `!` (exclamation point)
   * **Type:** WCF service
3. **Assembly full name or path:** `WorkflowAppWCFSampleTest`&#x20;
4. Click **Save**.

* **Class full name:** Select `workflowAppWCFSampleTest.ServiceClient`
  * **Method:** Select `GetString`

These parameters are automatically generated:

* **IN:** `message` (Text)
* **OUT:** `RETURN_VALUE` (Text)

You can now use this workflow application in your process.

* **Name:** `WCFSERVICE_SAMPLE_GET_STRING`

## WSDL web services

### **Overview**

WorkflowGen supports web services based on the SOAP standard. This means that web services can be integrated into WorkflowGen to be used by process actions, without the need to program them. WorkflowGen can use predefined web services and reference them by using their WSDL (Web Services Description Language) files.

A URL to the WSDL file defining the web service is required to display the available web methods that can be called by WorkflowGen. Once the WSDL is referenced and saved (in the WorkflowGen application definition), and one of its defined web methods are selected, the WorkflowGen application parameters are automatically generated.

The data types of the parameters are mapped to the corresponding WorkflowGen data types (numeric, text, datetime). All complex XML types are mapped to a WorkflowGen file data.

### **Public web services**

Public web services are web services that are available for public re-use. To reference one as a WorkflowGen application, follow the example below.

#### **Creating a WSDL web service**

1. In the Administration Module, click ![](https://content.gitbook.com/content/KjZcMxkzmJaMCI7tSLjB/blobs/KQNHbwepMHd1tYqp4q1X/left_menu_applications_small.png) in the left menu, then create a new WorkflowGen application and define the following:
   * **Name**
   * **Description**
   * **Type:** Web service
   * **Username:** A valid WorkflowGen Administrator
   * **Password:** The valid password for the username
2. Reference a web service and WSDL by defining a URL to a valid web service and to its related WSDL file and save the application.<br>

   📌 **URL example:**&#x20;

   ```
   http://quickstarts.asp.net/QuickStartv20/webservices/Samples/MathService/vb/Server/MathService.asmx
   ```

   \
   📌 **WSDL example:**&#x20;

   ```
   http://quickstarts.asp.net/QuickStartv20/webservices/Samples/MathService/vb/Server/MathService.asmx?WSDL
   ```
3. Select the web method to use. The WSDL defines which web methods are available to be used. Once you select a web method and save the application, the associated parameters are automatically mapped and the application may now be used by process actions.

## Private web service example

### Overview

Private web services are web services that are not available for public re-use. They generally use a secure URL that requires the proper authentication. To reference one as a WorkflowGen application, follow the example below.

### **Creating a WSDL web service**

1. In the Administration Module, click ![](https://content.gitbook.com/content/KjZcMxkzmJaMCI7tSLjB/blobs/KQNHbwepMHd1tYqp4q1X/left_menu_applications_small.png) in the left menu, then create a new WorkflowGen application and define the following:
   * **Name**
   * **Description**
   * **Type:** Web service
   * **Username:** A valid WorkflowGen Administrator
   * **Password:** The valid password for the username<br>

2. Reference a web service and WSDL by defining a URL to a valid web service and to its related WSDL file and save the application.<br>

   The examples below demonstrate the use of a web service located on a SharePoint 2007 website. In this example, the web service is called `lists.asmx`.<br>

   📌 **URL example:** &#x20;

   ```
   http://myspsserver/_vti_bin/lists.asmx
   ```

   \
   📌 **WSDL example:** &#x20;

   ```
   http://myspsserver/_vti_bin/lists.asmx?WSDL
   ```

3. Select the web method to use. The WSDL defines which web methods are available to be used. Once you select a web method and save the application, the associated parameters are automatically mapped and the application can now be used by process actions.

## WSDL web service action: other parameters

### **Overview**

WorkflowGen will create some extra parameters when referencing a WSDL. Other parameters can also be used in addition to those already defined in the WSDL file.

### **Other parameters**

The other parameters that are defined by WorkflowGen are:

* `RETURN_VALUE`: If the web service returns a value, WorkflowGen will automatically add an OUT parameter.
* `WFG_WS_URL`: Specify a web service URL to override the predefined URL.
* `WFG_WS_USERNAME`: Specify a username to override the predefined username.
* `WFG_WS_PASSWORD`: Specify a password to override the predefined password.
