How to call a command or a script from BusinessWorks or BusinessWorks Container Edition

Emmanuel Marchiset
2 min readJan 23, 2022

It is sometimes needed to call a system command or a command script from a BusinessWorks process. This is possible using the ‘External Command’ activity but there are a few useful things to know.

This article aims to explain how to use the ‘External Command’ activity in a Windows Environment.

# Windows environment

To call a basic command like ‘DIR’ the External Command activity should be configured with following options.

1. Check the ‘Provide Command Output’ to get the output of the command :

Option to check to have the output of the command available in the output of the activity

2. In the Input tab map the command field with a string containing the command and its parameters (note that it should start by ‘cmd /c’):

Example of the syntax to use to call a command

The same approach can be used to start a batch script:

Example of the syntax to use to call a script

# Linux environment

To call a basic command like ‘ls’ the External Command activity should be configured with following options.

1. Check the ‘Provide Command Output’ to get the output of the command :

Option to check to have the output of the command available in the output of the activity

2. In the Input tab map the command field with a string containing the command and its parameters (if the command or its parameters never change it can be entered in the ‘Command To Execute’ field) :

Example of the syntax to use to call a command

A batch script can be launched using the same approach:

Example of the syntax to use to call a script

Reference elements

https://docs.tibco.com/pub/activematrix_businessworks/6.10.0/doc/html/Default.htm#binding-palette/external-command.htm

--

--

Emmanuel Marchiset

I work as an Architect at TIBCO Software on Integration products. Opinions here are my own.