Hands-On Exercise 5: using parameters

In this exercise we will study the usage of parameters in the workflow.


Install the Hands-On

  • Install the Hands-On Exercise 5, just type:
cd dcs-hands-on
mvn clean install -D hands.on=5 -P bash

Inspect the application.xml

  • Checking the updated application.xml, you will see now the parameter expression:
<?xml version="1.0" encoding="us-ascii"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" id="beam_arithm">
    <jobTemplate id="expression">
        <parameter id="expression">l1_flags.INVALID?0:radiance_13>15?0:100+radiance_9-(radiance_8+(radiance_10-radiance_8)*27.524/72.570)</parameter>
    <workflow id="hands-on-5" title="Using parameters" abstract="Exercise 5, using parameters">
    <node id="node_expression">
      <job id="expression"/>
        <source refid="file:urls">/application/inputs/list</source>

Inspect the run executable

  • Open the file expression/run and search for the lines containing the function ciop-getparam:
    # retrieve the parameters value from workflow or job default value
    expression="`ciop-getparam expression`"

    # run a check on the expression value, it can't be empty

Run and debug the workflow

  • Run the node node_expression:
ciop-run node_expression
Attempts output


  1. We added a parameter in the job template of a processing node, defined in the application workflow;
  2. We used the value of that parameter in our run executable.