# COMPLETEACTION

## Overview

The **COMPLETEACTION** workflow application lets you complete an ongoing action with the corresponding parameters. It provides a simple solution for inter-process communications and synchronization.

## Parameters

### Request

<table data-header-hidden><thead><tr><th valign="top">Parameter</th><th valign="top">Type</th><th valign="top">Direction</th><th valign="top">Description</th></tr></thead><tbody><tr><td valign="top"><strong>Parameter</strong></td><td valign="top"><strong>Type</strong></td><td valign="top"><strong>Direction</strong></td><td valign="top"><strong>Description</strong></td></tr><tr><td valign="top"><code>REQUEST_ID</code></td><td valign="top">NUMERIC</td><td valign="top">IN</td><td valign="top">Request ID of the action to be completed</td></tr></tbody></table>

### Action

<table data-header-hidden><thead><tr><th valign="top">Parameter</th><th valign="top">Type</th><th valign="top">Direction</th><th valign="top">Description</th></tr></thead><tbody><tr><td valign="top"><strong>Parameter</strong></td><td valign="top"><strong>Type</strong></td><td valign="top"><strong>Direction</strong></td><td valign="top"><strong>Description</strong></td></tr><tr><td valign="top"><code>ACTION_NAME</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top">Name of the action to be completed (the first instance found will be completed)</td></tr><tr><td valign="top"><code>ACTION_ID</code></td><td valign="top">NUMERIC</td><td valign="top">IN</td><td valign="top">Action instance ID of the action to be completed</td></tr><tr><td valign="top"><code>IMPERSONATE_USERNAME</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top">Username of the user who will be associated with completing the action</td></tr></tbody></table>

### Optional parameters

The optional parameters are the parameters of the action to be completed. You will have to define these parameters in the corresponding action parameters.

#### 📌 Example

If you want to complete an asynchronous web procedure action called `MYASYNCACTION`, which has the following parameter:

* `AMOUNT`: receive data into `TOTAL` (you have to create this process data)

Then, in your process, you have to add an action using the COMPLETEACTION application with the following parameters:

<table data-header-hidden><thead><tr><th valign="top">Parameter</th><th valign="top">Type</th><th valign="top">Direction</th><th valign="top">Description</th></tr></thead><tbody><tr><td valign="top"><strong>Parameter</strong></td><td valign="top"><strong>Type</strong></td><td valign="top"><strong>Direction</strong></td><td valign="top"><strong>Description</strong></td></tr><tr><td valign="top"><code>REQUEST_ID</code></td><td valign="top">NUMERIC</td><td valign="top">IN</td><td valign="top">Send value of <code>MY_REQUEST_ID</code> (a numeric process data containing the request ID of the action to complete, e.g. <code>1320</code>)</td></tr><tr><td valign="top"><code>ACTION_NAME</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top">Send value of the name of the action to complete (e.g. <code>MYSYNCACTION</code>)</td></tr><tr><td valign="top"><code>AMOUNT</code></td><td valign="top">NUMERIC</td><td valign="top">IN</td><td valign="top">Send value of <code>MY_AMOUNT</code> (a numeric process data containing a value for the amount, e.g. <code>1234.56</code>)</td></tr></tbody></table>

{% hint style="info" %}
You should add exception handling on COMPLETEACTION type actions in case of error (for example, an invalid request number or an invalid action number, etc.).
{% endhint %}
