# Workflow templates for output 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:** System template that will perform a remote spExec operation when onDemand triggered.

**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

### **system\_onDemand\_sendTemplatedEmail**

**Goal**: System template OnDemand triggered sending a notification email.

**Variables**:

* **Cluster**\
  Cluster that performs the file transfer
* **Select remote server**\
  Select the remote server
* **mailSubjectTemplate**\
  Subject of the email
* **templateId**\
  ID of the Template
* **mailRecipients**\
  Email addresses of the recipients
* **mailFrom**\
  Sender of the email
* **templateDefaultReplacer**\
  Template default variable re-placer

## Trigger type: New File

A New File trigger requires a VirtualPath.

FileSet is written by the FileBox component in the VirtualPath configured in the Contract.\
The variable added to the execution is file of type FileDetail. Its attributes must be set according to the event that starts this trigger.

### **system\_newFile\_flagFile-triggerFile-outTransport**

**Goal**: System Template triggered by a New file that remotely pushes a data file. If appropriate options are specified, it checks that a flag file exists before pushing and/or sending a confirmation file after pushing. Optionally, it can notify that the pull operation is successful using the notification channel options.

**Operation**:

1. If the name of a flag file is specified, before proceeding Data Mover checks that a flag file exists. If the flag file is specified but not found, the workflow exits. If the flag file is not specified or if the flag file is both specified and found in the appropriate folder, Data Mover sends the file that triggered the workflow through Virtual Box bind to the desired destination.
2. If the name of a confirmation file is specified, a dummy confirmation file is created and sent to the specified folder.
3. If the Notification Channel option is specified, a notification is sent to the appropriate recipients through the selected Notification Channel.

**Variables**:

* **Select Virtual Path**
  * When the Select Virtual Path toggle is **ON**:\
    **Actor, VFS, VFS Path** Destination Virtual path where data files will be pulled.
  * When the Select Virtual Path toggle is **OFF**:\
    **Enter VFSNAME:/VPATH** The \* wildcard character is accepted.
* **remoteFolder**\
  Remote folder where the file will be written.
* **Select remote server**\
  Client Connection to push files to their destination.
* **flagFileName** \
  Flag file filename. If set, before trying to pull files, the workflow will check the presence of a Flag file with this filename and extension in the selected folder.
* **remotePathFlagFile**\
  Flag file folder applicable only if the Flag file name is set. Remote folder where the Flag file will be verified.
* **removeFlagFile** \
  Applicable only if the Flag file name is set. If enabled, the Flag file will be removed after successfully pulling the file.
* **confirmationFileName** Trigger file filename\
  If set, once the file is successfully pushed, a confirmation file with this filename (and extension) will be pushed
* **remotePathConfirmationFile** Trigger file folder\
  Applicable only if trigger file filename is set. Remote path where the trigger file will be pushed.
* **Actor, VFS, VFS Path**\
  Actor, VFS and Virtual Path where the file will be placed. Applicable only if trigger file filename is set. Virtual Path for trigger file.
* **Notification Channel** If set, the success of the push operation will be notified using the selected notification channel.
  * **System Email Notification Channel**: see the [Configuring the default Email Notification Channel](/data-mover-1.21/notification-channels/configure-the-default-email-notification-channel.md) page for details.\
    In the **Add email** field, enter the email address and click the + button to add it.
  * **Embedded Broker Notification Channel**: this is a notification channel that transforms input notification events into output JSON JMS messages, publishing them on a user-defined queue on Data Mover embedded Artemis broker. EBNC is not and end-user feature, but rather an enabler feature that can be flexibly exploited in integration projects involving custom applications that need to interact with Data Mover.&#x20;
* **newFileFilter**\
  Enter the string to filter new files. For example, you may want the flow to be triggered only for files beginning with a specific filename or extension.

### **system\_newFile\_push**

**Goal**: Send the file triggering the instance to a remote location.

**Notes**: The file can be renamed before it is sent to the remote location.

**Variables**:

* **Select Virtual Path**
  * When the Select Virtual Path toggle is **ON**:\
    **Actor, VFS, VFS Path** Destination Virtual path where data files will be pulled.
  * When the Select Virtual Path toggle is **OFF**:\
    **Enter VFSNAME:/VPATH** The \* wildcard character is accepted.
* **Cluster**\
  Cluster where the operation will be executed.
* **spPush\_remotePath**\
  Remote path where the file triggering this instance will be sent.
* **Select remote server**\
  Client Connection to be used to send the file to the remote location.
* **File resource**\
  Resource profile applied when sending the file.
* **spPush\_renameFile**\
  New filename and extension applied to the file sent to the remote location.
* **newFileFilter**\
  Enter the string to filter new files. For example, you may want the flow to be triggered only for files with a specific filename.

### **system\_newFile\_getFile**

**Goal**: System template newFile triggered that copies the file triggering the instance to a physical folder.

**Notes**: The file can be renamed.

**Variables**:

* **Select Virtual Path**
  * When the Select Virtual Path toggle is **ON**:\
    **Actor, VFS, VFS Path** Destination Virtual path where data files will be pulled.
  * When the Select Virtual Path toggle is **OFF**:\
    **Enter VFSNAME:/VPATH** The \* wildcard character is accepted.
* **destination\_path** \
  Path where the file triggering this instance will be saved to.
* **destination\_filename**\
  New filename and extension applied to the file.
* **File resource**\
  Resource profile applied when getting the file.
* **newFileFilter**\
  Enter the string to filter new files. For example, you may want the flow to be triggered only for files beginning with a specific filename.

### **system\_newFile\_JMS-push**

**Goal**: New File triggered system template that performs a JMS push action.

{% hint style="info" %}
The JMS connector's documentation can be found in the [JMS Connector](/data-mover-1.21/transfer-protocols-and-connectors/jms-connector.md) section.&#x20;
{% endhint %}

**Variables**:

* **Select Virtual Path**
  * When the Select Virtual Path toggle is **ON**: **>**\
    **Actor, VFS, VFS Path**\
    Destination Virtual path where data files will be pulled. Virtual path storing the file that will be split in one or more messages.&#x20;
  * When the Select Virtual Path toggle is **OFF**: **>**\
    **Enter VFSNAME:/VPATH**\
    The \* wildcard character is accepted.
* **Cluster**\
  Cluster where the push operation will be executed.
* **JMSDestination**\
  Name of the JMS destination.
* **JMSDestinationType**\
  Enter QUEUE, TOPIC or JNDI.
* **Priority**\
  You can set a priority to the messages that are created when splitting the file.
* **resourceProfile**\
  (Optional) This is the resource profile to apply when sending the file. In the output contract, this variable is in the **FileResource** field.
* **DeliveryMode**\
  Method of delivery of JMS messages. Select one of the options available:
  * **Persistent**: the message is saved and its delivery is ensured.
  * **Non\_persistent**: the message must not be saved and could be lost (for example in case of problems on the server).
* **TimeToLive**\
  (Optional) You can specify how many seconds messages will live. A number higher than 0 is accepted.
* **JMS TransferProfile**\
  Enter the Client Connection that must be used to push the file to the remote path. In the output contract, this variable is in the **Select remote server** field.&#x20;
* **MessageProcessingRuleF2M**\
  Select the splitting Message Processing Rule to be applied. It must be configured in Setup > [Message processing rule](/data-mover-1.21/transfer-protocols-and-connectors/jms-connector/message-processing-rules.md).
* **PropagatesDataOneMetadata**\
  (Optional) Enable it to propagate system metadata to JMS Properties. See the [Metadata mapping for split file content](/data-mover-1.21/transfer-protocols-and-connectors/jms-connector/split-file-contents-into-jms-messages/metadata-mapping-for-split-file-content.md) page for details.
* **newFileFilter**\
  Enter the string to filter new files. For example, you may want the flow to be triggered only for files beginning with a specific filename or extension.

## Trigger type: Virtual Box Bind

A Virtual Box Unbind requires a VirtualBox.\
The instance starts when a VirtualBoxEvent is emitted by FileBox when the FileSet and the Virtual Box defined in the Contract are no longer associated.\
The variable added to the execution is file of type FileDetail. Its attributes must be set according to the event that fires this trigger.

### **system\_vbBind\_outTransport**

**Goal**: Virtual Box Bind triggered System template that will remotely push a file with an optional resource profile and optionally backs it up on VFS.

**Variables**:

* **sourceVirtualBox**\
  Enter the source virtual box or create a new one. In the output contract this variable is in  the **Select VirtualBox** field. &#x20;
* **virtualBoxFilter**\
  If you want the flow to be triggered only for specific virtual boxes, enter the string to filter virtual boxes.&#x20;
* **Cluster**\
  Cluster that performs the file transfer.
* **remoteFolder**\
  Remote folder where the file will be written.
* **Select remote server**\
  Transfer profile to use for the transfer.
* **Actor, VFS, VFS Path**\
  Actor, VFS and Virtual Path where the file will be placed. If specified, the file will be backed up to the desired destination.
* **File resource**\
  If specified a resource profile will be applied.

### **system\_vbBind\_flagFile-triggerFile-outTransport**

**Goal**: System Template, triggered by a Virtual Box bind, pushing a file remotely. If appropriate options are specified, the presence of a flag file can be verified before pushing and/or sending a confirmation file after pushing.\
Optionally, it can notify that the pull operation is successful using the notification channel options.

**Description**:

1. If the name of a flag file is specified, before proceeding Data Mover verifies that a flag file exists. If the flag file is specified but not found, the workflow exits. If the flag file is not specified or if the flag file is both specified and found in the appropriate folder, Data Mover sends the file that triggered the workflow through Virtual Box bind to the desired destination.
2. If the name of a confirmation file is specified, a dummy confirmation file is created and sent to the specified folder.
3. If the Notification Channel option is specified, a notification is sent to appropriate recipients through the selected Notification Channel.

**Variables**:

* **sourceVirtualBox**\
  Enter the source virtual box or create a new one. In the output contract this variable is in the **Select VirtualBox** field. &#x20;
* **virtualBoxFilter**\
  Enter the string to filter virtual boxes. For example, you may want the flow triggered only for specific virtual boxes.
* **remoteFolder**\
  Remote folder where the file will be written.
* **Select remote server**\
  Client Connection to be used to push the file to their destination.
* **flagFileName**\
  Optionally, a flag file can be specified so that the data file is pulled only when the flag file is in the specified folder. The pulled data file can optionally be archived and/or deleted at the source.
* **remotePathFlagFile** \
  (Required only if Flag file name is set) Remote folder where Flag file presence will be checked.
* **removeFlagFile** (Required only if Flag file name is set) If enabled, the flag file will be removed after successful data file pull.
* **confirmationFileName** Trigger file filename\
  If set, once the file is successfully pushed, a confirmation file with this filename (and extension) will be pushed.
* **remotePathConfirmationFile** Trigger file folder\
  Applicable only if trigger file filename is set. Remote path where the trigger file will be pushed.
* **Actor, VFS, VFS Path**\
  Actor, VFS and Virtual Path where the file will be placed.
* **Notification Channel** If set, the success of the push operation will be notified using the selected notification channel.
  * **System Email Notification Channel**: see the [Configuring the default Email Notification Channel](/data-mover-1.21/notification-channels/configure-the-default-email-notification-channel.md) page for details.\
    In the **Add email** field, enter the email address and click the + button to add it.
  * **Embedded Broker Notification Channel**: this is a notification channel that transforms input notification events into output JSON JMS messages, publishing them on a user-defined queue on Data Mover embedded Artemis broker. EBNC is not and end-user feature, but rather an enabler feature that can be flexibly exploited in integration projects involving custom applications that need to interact with Data Mover.
* **confirmationFilePath**\
  Local path for the creation of a trigger file.

### 🚀 **system\_vBind\_JMS-push**

**Goal**: System template triggered by a Virtual Box bind. It performs a JMS push action.

{% hint style="info" %}
The JMS connector's documentation can be found in the [JMS Connector](/data-mover-1.21/transfer-protocols-and-connectors/jms-connector.md) section.&#x20;
{% endhint %}

**Variables**:

* **sourceVirtualBox**\
  Enter the source virtual box or create a new one. In the output contract this variable is in the **Select VirtualBox** field. &#x20;
* **virtualBoxFilter**\
  Enter the string to filter virtual boxes. For example, you may want the flow triggered only for specific virtual boxes.
* **DeliveryMode**\
  Method of delivery of JMS messages. Select one of the options available:
  * **Persistent**: the message is saved and its delivery is ensured.
  * **Non\_persistent**: the message must not be saved and could be lost (for example in case of problems on the server).
* **TimeToLive**\
  (Optional) You can specify how many seconds messages will live. A number higher than 0 is accepted.
* **JMSTransferProfile**\
  Enter the Client Connection that must be used to push the file to the remote path. In the output contract this variable corresponds to the **Select remote server** field. &#x20;
* **MessageProcessingRuleF2M**\
  Select the splitting Message Processing Rule to be applied. It must be configured in Setup → [Message processing rule](/data-mover-1.21/transfer-protocols-and-connectors/jms-connector/message-processing-rules.md).
* **PropagatesDataOneMetadata**\
  (Optional) Enable it to propagate system metadata to JMS Properties. See the [Metadata mapping for split file content](/data-mover-1.21/transfer-protocols-and-connectors/jms-connector/split-file-contents-into-jms-messages/metadata-mapping-for-split-file-content.md) page for details.
* **Cluster**\
  Cluster where the file will be pushed.
* **JMSDestination**\
  Name of the JMS destination.
* **JMSDestinationType**\
  Only QUEUE is currently supported.
* **Priority**\
  You can set a priority to the messages that are created when splitting the file.
* **resourceProfile**\
  (Optional) This is the resource profile that will be applied when pushing the file. In the output contract this variable corresponds to the **File Resource** field.&#x20;

## **Dataflow templates**

These templates can be used with dataflows.

Common variables:

* **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: Virtual Box Unbind**

A Virtual Box Unbind requires a VirtualBox.\
The instance starts when a VirtualBoxEvent is emitted by FileBox when the FileSet and the Virtual Box defined in the Contract are no longer associated.\
The variable added to the execution is file of type FileDetail. Its attributes must be set according to the event that fires this trigger.

## **df\_vbBind\_outFilesystem**

**Goal**: Virtual Box Bind triggered DataFlow template that saves a file on filesystem (spget), and optionally backs it up on a VFS.

**Variables**:

* **sourceVirtualBox**\
  Enter the source virtual box or create a new one. In the output contract this variable is in  the **Select VirtualBox** field. &#x20;
* **virtualBoxFilter**\
  If you want the flow to be triggered only for specific virtual boxes, enter the string to filter virtual boxes.&#x20;
* **jobManagerPriorityQueueName**\
  Default Queue.
* **Cluster**\
  Cluster where the operation will be executed.
* **destinationFolder**\
  Destination folder where the file will be written on the filesystem.
* **Actor, VFS, VFS Path**\
  Actor, VFS and Virtual Path where the file will be placed.

## **df\_vbBind\_outTransport**

**Goal**: Virtual Box Bind triggered DataFlow template that remotely pushes a file and optionally backs it up on a VFS. Eligible for DataFlow.

**Variables**:

* **sourceVirtualBox**\
  Enter the source virtual box or create a new one. In the output contract this variable is in  the **Select VirtualBox** field. &#x20;
* **virtualBoxFilter**\
  If you want the flow to be triggered only for specific virtual boxes, enter the string to filter virtual boxes.&#x20;
* **remoteFolder**\
  Remote folder where the file will be written.
* **Select remote server**\
  Select the remote server.
* **Actor, VFS, VFS Path**\
  Actor, VFS and Virtual Path where the file will be placed.


---

# 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-output-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.
