# Workflow templates for mediation contracts

The following properties are common to all templates. They are also optional and, therefore, can be skipped if not needed.

Common properties:

* **Error handling**\
  The **Enable workflow error handling** option can be set to ON to use PRIMEUR system workflows to manage errors. Enabling the toggle switch, the **Select error handling template** drop-down list will appear with 2 templates: one to log all variables and one to notify errors. You can find details about the ehwft\_logAllVariables and ehwft\_logAllVariables templates in the [Error Handling Workflow Templates](/data-mover-1.21/workflow-templates/error-handling-workflow-templates.md) section.
* **systemEnableLogDebugToFile**\
  Set this toggle button to ON to activate logs

## **Trigger type: On Demand**

The On Demand trigger does not require any mandatory variable.\
The On Demand triggered workflow templates are triggered by a direct API invocation via REST. This API will accept a map of variables that will be passed to the instance as process variables. Any variable explicitly declared on the template to be requested when creating the Contract is added to the set of variables coming from the REST invocation. If a variable name is used when creating the Contract and is used in the map passed via REST as well, this second one wins over the Contract one.

### **system\_onDemand\_exec**

**Goal:** This system template performs a remote spExec operation when triggered onDemand.

**Variables:**&#x20;

* **cluster**\
  STENG cluster where the spExec operation is performed.
* **executable**\
  Executable command to be run on the remote STENG shell.
* **arguments** \
  Arguments that will be passed to the selected executable command.

### RemoteLsOnDemand

**Goal:** This system template performs a remote Ls operation when triggered onDemand.

There are no variables apart from **Enable workflow error handling** and **systemEnableLogDebugToFile** described above.&#x20;


---

# 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.primeur.com/data-mover-1.21/workflow-templates/system-workflow-templates/workflow-templates-for-mediation-contracts.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.
