Contents

  1. Introduction
  2. Create the workflow
  3. Launch the workflow

Introduction

For now we have only used workflow parameters as dynamic inputs. But there is something else we could use: a parent's task output.

This is very common as is allows us to create dynamic task chaining (including conditions and loops). For this time, we will not be using conditions and loops. Instead we will recreate this shell functionality:

root@evqueue:~# ls / | wcf -l

What do we have here? We have a first task, 'ls' whose output is piped (sent dynamically) to the next one's input (ws).

Let's see how we can do this in evQueue!

Create the workflow

The first part will be pretty straightforward. Create a new dynamic shell task and set its path to '/bin/ls /'. This time we do not use dynamic input for simplicity reasons, but you could as well add a parameter to the workflow to set the path.

Create a second task under the first one and set its path to '/usr/bin/wc -l'.

You should get this:

This was the easy part! Now we will do some settings on the last task (wc). Open it and go to the well named 'Stdin' tab.

Set mode to text and add a new input part of type XPath value. Choose your parent task's output and save.

Your task's stdin should now be configured to the ls output as input.

Exit the interface saving your changes. You are now ready to try your new workflow!

Launch the workflow

Launch your new workflow and have a look at the instance details.

Have a look at the first task's stdout. You should see some directories or files. Then, have a look at the second task's output. It should be the number of lines of the previous task's output.

For this example, we have used 'stdin' input, but this also works with the standard command line parameters ('Input' tab).