TIBCO Tutorial: How To Run Operating System Commands In TIBCO BW Processes

By | June 21, 2014

While developing business processes in TIBCO Designer, often we need to run external commands like Operating System commands to perform certain actions. TIBCO provides External Command activity to execute operating system commands from inside a BW process.

In this tutorial, you will learn how you can run operating system command to copy files from one folder to another. This project is being developed in Windows platform so I will be using Windows OS command. If you are working on Linux/Unix environment; you need to run the commands which are available in your Operating System.

Step 1: Decide the command to run using External Command activity

For this tutorial, I am going to run XCOPY windows OS command which is used to copy files from one folder to another. I have some files in a folder named original from which I wish to copy files to another folder named backupfolder. Command to do this copy operation is as follows:

XCOPY D:\ExternalCommandTest\original D:\ExternalCommandTest\backupfolder /m /e /y

Step 2: Write TIBCO BW Process to run External Command

In this step, I am going to create a process in TIBCO Designer for running the above command.

The command to run is specified in command filed in the Input Tab as you can see below:

tibco run external command

Step 3: Test TIBCO Process to run External Command

Once the process has been implemented and validated successfully, load the process in designer tester and start it. As you can see below, process has run successfully and the file from the source path has been copied to the destination path:

tibco designer tester external command run

Ajmal Abbasi

Ajmal Hussain Abbasi is Integration Consultant By Profession with more than 7 years experience in TIBCO products. He has extensive practical knowledge of TIBCO Business Works, TIBCO Spotfire, TIBCO BE, EMS and TIBCO ActiveSpaces. He has worked on a number of highly critical integration projects in Telecom sector by using his skills in Tibco Designer, Adapters, TIBCO EMS, RV, Administrator, TIBCO BE, TIBCO ActiveSpaces etc.
Ajmal Abbasi is also experienced in developing solutions using Oracle PL/Sql, Linux and Java.
You can contact Ajmal Abbasi for Consultancy, Technical Assistance and Technical Discussions.

More Posts - Website - Facebook - LinkedIn

10 thoughts on “TIBCO Tutorial: How To Run Operating System Commands In TIBCO BW Processes

  1. Abraham

    I would like to display all the BW Processes up and Running and alert if its not running, can I do this using Engin command . Your advise

  2. B Satish

    Hi Ajmal,

    Kindly, help me on how to encrypt file using gpg commands in tibco bw.

    Thanks & Regards,
    Satish B

  3. krishnarao potti

    i want to run the multiple commands in single external commands like
    SFTP connection establishment
    SFT P get command

    how to do it
    i dont want use the SFTP plugin and java code

    1. Ajmal Abbasi Post author

      Dear Krishnarao,

      You can write a shell script and get it executed through “External command” palette activity. Thanks

  4. kiran bairi

    how to move particular formated files from one directory to another directory [ after moving source files should be delete from source directory]

    1. Ajmal Abbasi Post author

      Dear Kiran,

      You can create a shell script having mv command to move the file to another directory and then call it using external command activity.

      Alternatively, if you don’t want to use linux commands; you can use file palette activity copy file to copy the file to new location and then use remove file activity to delete from the source folder.

  5. Vinay

    Hi Ajmal,

    How to run a shell script file with input parameter (like “./flows.sh suspend”) and print the the result in file.
    Thanks in Advance.


  6. Bhavani


    I tried the Same command but i got the error-invalid number of parameters.
    return code-4.

    how to remove the error?

  7. Raaj

    Same above command i have placed in .sh file and i tried to run but i am getting below error please help!!
    CreateProcess error=193, %1 is not a valid Win32 application.
    at com.tibco.plugin.cmdexec.CmdExecActivity.a(Unknown Source)
    at com.tibco.plugin.cmdexec.CmdExecActivity.eval(Unknown Source)
    at com.tibco.pe.plugin.Activity.eval(Unknown Source)
    at com.tibco.pe.core.TaskImpl$SeparateThreadEval.run(Unknown Source)
    at com.tibco.pe.util.ThreadPool$ThreadPoolThread.run(Unknown Source)

    1. Ajmal Abbasi Post author

      Dear Raaj,

      The example command is for windows environment and make sure that you use corresponding linux commands if you are running a shell script. Thanks


Leave a Reply

Your email address will not be published. Required fields are marked *