# 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

| **Parameter** | **Type** | **Direction** | **Description**                          |
| ------------- | -------- | ------------- | ---------------------------------------- |
| `REQUEST_ID`  | Numeric  | IN            | Request ID of the action to be completed |

### Action

| **Parameter**          | **Type** | **Direction** | **Description**                                                                 |
| ---------------------- | -------- | ------------- | ------------------------------------------------------------------------------- |
| `ACTION_NAME`          | Text     | IN            | Name of the action to be completed (the first instance found will be completed) |
| `ACTION_ID`            | Numeric  | IN            | Action instance ID of the action to be completed                                |
| `IMPERSONATE_USERNAME` | Text     | IN            | Username of the user who will be associated with completing the action          |

### 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:

| **Parameter** | **Type** | **Direction** | **Description**                                                                                                         |
| ------------- | -------- | ------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `REQUEST_ID`  | Numeric  | IN            | Send value of `MY_REQUEST_ID` (a numeric process data containing the request ID of the action to complete, e.g. `1320`) |
| `ACTION_NAME` | Text     | IN            | Send value of the name of the action to complete (e.g. `MYSYNCACTION`)                                                  |
| `AMOUNT`      | Numeric  | IN            | Send value of `MY_AMOUNT` (a numeric process data containing a value for the amount, e.g. `1234.56`)                    |

{% 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.workflowgen.com/admin/9.1/workflow-applications/completeaction-workflow-application.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
