top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

shell script to execute multiple informatica work flows

+1 vote
1,436 views

I am relatively new to shell scripting and UNIX. I am using a Solaris box and the problem is that we have a shell script called strtwrfl.sh which takes a parameter as the workflow name and starts the workflow, e.g. ./strtwrfl.sh ABC where ABC is the workflow name.

I have to run over 200 of such workflows, each workflow is dependent on the successful completion of the previous workflow, i.e. if there are 2 workflows ABC and BCD, strtwrfl.sh BCD will be successful only if strtwrfl.sh ABC successfully executed.

Each workflow takes different time to execute successfully.

I have to write a single shell script such that those 200+ informatica workflows must (I dont mind manually entering those workflows into the script) execute one after another, and if one fails the script should halt displaying which workflow failed.

Since this is a production environment I will not be able to share strtwrfl.sh here.

posted Sep 26, 2014 by Amit Sharma

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

you can do something like this:

meta_strtwrfl.sh:
#!/bin/sh

script="./strtwrt.sh"
workflows="
        ABC
        BCD
        CDE
"

for workflow in ${workflows}; do
        "${script}" "${workflow}" || { echo "$0: workflow '${workflow}' failed!"; exit 1; }
done
echo "$0: all workflows finished successfully!"

Change script="./strtwrt.sh" to reflect the path to your strtwrt.sh script and change workflows accordingly. I don't know which standard shell you have on your solaris system, so we don't use an array for the workflow variable, which means that your workflow names cannot have spaces in them this way.

Example runs:
$ ./meta_strtwrfl.sh
./meta_strtwrfl.sh: all workflows finished successfully!

$ ./meta_strtwrfl.sh
./meta_strtwrfl.sh: workflow 'ABC' failed!
answer Oct 6, 2014 by Shweta Singh
Similar Questions
+1 vote

I have some unique requirement, where I need to do something like this -
1. My script takes the argument as file name which is absolute filename.
2. I need to separate the filename and directory from this absolute file name for the further processing.

Any suggestions -

0 votes
...