How to run executable application in Data Integration Platform?
Introduction
This document illustrates the steps to run executable application in Data Integration Platform.
Summary
Data Integration Platform has built-in processors to run and schedule any executable application.
Processors
Any executable application and scripts can be run in Data Integration Platform using processors listed below,
- ExecuteProcess
- ExecuteStreamCommand
ExecuteProcess Processor
-
Any executable application can be run using ExecuteProcess processor with or without arguments.
-
The ExecuteProcess processor does not have any upstream connections.
-
Application path and arguments should be configured in ExecuteProcess processor.
-
Command Arguments property of the ExecuteProcess processor have expression language support.
-
Argument delimiter property is used to separate arguments for a command [default: space]. It must be a single character such as (,*%^$@;:# etc.).
Workflow
Consider the below sample to run the same C# application using ExecuteProcess processor.
Create C# sample to perform addition operation and return the result. See the code snippet below,
Step 1: Build the C# application and keep the EXE ready in a location.
Step 2: Drag and Drop the ExecuteProcess and PutFile into the workspace. Connect the ExecuteProcess output to PutFile as like in below screenshot
Step 3: Configure with Execute process with below details.
Property | Value (E.g) | Description |
Command |
C:\CustomApplication\SampleAddition.exe | It is the required property in ExecuteProcess processor. Must specify the file path of the EXE location. |
Command Arguments |
5;8 |
It is optional. Need to specify the arguments which used to execute the program. Here two arguments were used and delimited by ‘;’. |
Argument Delimiter |
; |
Delimiter to use to separate arguments for a command [default: space]. It must be a single character. Here ‘;’ used as delimiter. |
Step 4:
Configure PutFile processor to define the output file directory. Executable application output will be stored in a file under configured directory.
Step 5:
Once the configuration is complete, start the processor. The program gets executed and the output of the C# application writes into a file which is configured in PutFile processor.
For more information about configuring ExecuteProcess processor, refer to https://help.syncfusion.com/data-integration/processors/executeprocess
ExecuteStreamCommand Processor
-
Any executable file can be run using ExecuteStreamCommand processor with or without arguments. It has both upstream and downstream connections.
-
Since ExecuteStreamCommand Processor have upstream connection. In the form of expression language, the processor uses flowfile attribute.
-
Both the Command Arguments and Command Path property of the ExecuteStreamCommand processor have expression language support.
-
The path of the application should be configured in Command Path property of ExecuteStreamCommand processor.
-
Argument delimiter property used to separate arguments for a command [default: semicolon]. It must be a single character such as (,*%^$@;:# etc).
Workflow
Consider the below sample to run the same C# application using ExecuteStreamCommand processor with upstream connection.
Step 1: GenerateFlowFile processor generates a flow file with configured value in it.
Step 2: ExtractText processor used to generate attribute from the flow file content configured in step 1.
Here arguments attribute will be created with value 5;6
Step 3: Configure ExecuteStreamCommand to specify C# application location and command arguments.
Property |
Value (E.g) |
Description |
Command Arguments |
${arguments} | ${arguments} is an attribute created using ExtractText processor for the flow file generated in GenerateFlowFile processor. |
Command |
C:\CustomApplication\SampleAddition.exe | It is the required property to specify the application file path (.exe) |
Argument Delimiter |
; |
Delimiter is used to separate arguments for a command [default:semicolon]. Must be a single character. Here ‘; ’ used as delimiter. |
Step 4:
Configure PutFile processor to define the output file directory. Executable application output will be stored in a file under configured directory.
Step 5:
Once the configuration is complete, start the processor. The program gets executed and the output of the C# application writes into a file which is configured in PutFile processor.
For more information about configuring ExecuteStreamCommand processor, refer to https://help.syncfusion.com/data-integration/processors/executestreamcommand
Scheduling
Based on your requirement, you can schedule processor in the following scheduling strategies
- Time driven
- CRON driven
- Run Once
For more information about Data Integration workflow scheduling, refer https://help.syncfusion.com/data-integration/user-guide#scheduling-tab