Working with "Run Condition" parameter in EOS-CCM


When creating workflows in EOS-CCM, you might need to choose a different template based on some information from your data source.

This article aims to provide instructions on how to:

  1. Create a basic workflow in EOS-CCM;
  2. Customize the workflow to choose from different templates in the "Render" Step.

How to

A. Create the workflow:

  • Access the workspace from EOS-CCM and create a folder inside it;
  • Upload the local project to EOS;
  • Under the project folder, select the "New" button from the menu bar;
  • Choose the workflow option;
  • Give the Workflow a name and select OK.

B. Customize the workflow steps:

In order to obtain different documents based on the information in the data source, you need to:

  1. Use different templates for each condition;
  2. Use a "Render" step for each condition;

For example, let's assume you have to send a confirmation letter for your subscribers to your monthly or weekly newsletter. You can have two templates, one for monthly subscribers and one for weekly subscribers.

If your XML input looks like below:

  <member group-id="1" group-type="monthly">John Smith</member>
  <member group-id="2" group-type="weekly">Anna Brown</member>

You need to create two templates:

  • A template for members with @group-id="1";
  • A template for members with @group-id="2".

The workflow needs to have the following steps :

  • Get Data
    • Getting your data is usually the first task in a workflow;
    • The input, for this case, should be the XML file;
  • Split :
    • This step is used to produce several sub-XML's (one for each document), if the input file contains nodes for multiple documents;
    • This step should be connected to "Get Data" step (start) and the "Render" steps (end);
    • The context will be taken by the XML Node parameter. In our case, the value should be {XPATH:/members/member} (to generate a document for each "member" node);
  • Render - Group 1:
    • The Render task produces the output documents;
    • This step should be connected to "Split" step (start) and "End" step (end);
    • Under the Render task, you need to add three parameters:
      • Template:
        • Use the "Choose File" button to search the EOS Repository, and select the data source you would like to use;
        • In our case, we need to add the template created to display the members which belong to the first group;
      • Output format
        • By default, the PDF value is selected;
        • To generate others outputs, you just need to expand the drop down list and select the desired one;
      • Run condition:
        • The "Run condition" allows you to set a specific condition that, when met, will trigger the task to generate the necessary documents;
        • If you click on the 'fx' button, you are able to search through the XML file and choose the desired XPath;
        • In this case, the condition should look like this : {XPATH:/member/@group-id = "1"} 
  • Render - Group 2:
    • The same parameters from Render - Group 1 task should be added here;
    • This step should be connected to "Split" step (start) and "End" step (end);
    • Regarding the Run condition parameter, the value for this should be : {XPATH:/member/@group-id = "2"}

In the end, the workflow should look like this:

In the attachment below, you can see the entire project explained above.

Have more questions? Submit a request


Powered by Zendesk