Using the Process Executor tool

You can use the Process Executor tool to automate the execution of processes and to execute them from a command line.

You can, for example, invoke the processes from your own .cmd files.

Note: The Process Executor tool requires a farm with at least Configuration Service, Repository Service and Application Engine Service running.

The executable file of the Process Executor tool, Infor.BI.Applications.ProcessExecutor.exe, is installed with Application Studio. You can invoke the tool from a command line. Only a few parameters are required for the tool to run a process.

This table shows the command line options that can be used with the tool:

Options Description
-f Farm: Required name of the Application Engine farm connection profile.
-j Project: Required name of the repository project.
-u User: Required name of the repository user.
-p Password: Required password of the repository user.
-t Ticket: Required parameter to log in as the repository user. It can be used instead of user name and password.
-s Process: Required name of the process to be executed.
-v Version: Required version of the process to be executed. Specify “*” to use the latest version.
-m Parameters: Optional list of process parameters in the form "#<parameter name> <parameter value>".
-c Console: Optional parameter to output the process' console data.
-l Log: Optional parameter to output the process' log.
-n Notification: Optional parameter to output the process' notifications.
-o Output: Optional file to which the process' results and output are redirected.
-help Help: Displays the help screen.

In this example, the farm connection profile ApplicationEngineFarmConnectionProfile is used to publish a process named Add to a project named ApplicationEngine. The user name is Admin and the password is a. The process expects two numbers and returns their sum. It outputs the sum to the console and to the log file.

#define EngineVersion 5.0

#define RuntimeVersion 5.0

 

int Add(int x, int y)

@Description: "Adds two numbers.";

@Category: "Demo";

@Parameter[x]: "First number.";

@Parameter[y]: "Second number.";

@Returns: "The sum of x and y.";

{

  int sum = x + y;

  WriteLine("Sum = " + sum);

  LogDebug("Sum = " + sum);

  return sum;

}

You can then execute the process with the Process Executor tool from a command line:

c:\>Infor.BI.Applications.ProcessExecutor.exe -f ApplicationEngineFarmConnectionProfile -j ApplicationEngine -u Admin -p a -s Add -v 1 -m #x 5 #y 7

The process Add with version 1 has been executed successfully.

Process Result = 12

You can see that the process has been executed successfully and you can also see its result.

To show the output of the process to the console, you must activate the console option:

c:\>Infor.BI.Applications.ProcessExecutor.exe -f ApplicationEngineFarmConnectionProfile -j ApplicationEngine -u Admin -p a -s Add -v 1 -m #x 5 #y 7 -c

The process Add with version 1 has been executed successfully.

Process Result = 12

Process Output:

Sum = 12

Similarly, when you activate the log option, you can inspect the messages that are sent to the log file:

c:\>Infor.BI.Applications.ProcessExecutor.exe -f ApplicationEngineFarmConnectionProfile -j ApplicationEngine -u Admin -p a -s Add -v 1 -m #x 5 #y 7 -l

The process Add with version 1 has been executed successfully.

Process Result = 12

Process Log:

[Debug] Sum = 12

You can also activate all options together to see all the output:

c:\>Infor.BI.Applications.ProcessExecutor.exe -f ApplicationEngineFarmConnectionProfile -j ApplicationEngine -u Admin -p a -s Add -v 1 -m #x 5 #y 7 –c –l -n

The process Add with version 1 has been executed successfully.

Process Result = 12

Process Output:

Sum = 12

Process Log:

[Debug] Sum = 12