Did You Know Series -  Chain Branches, Links, and Skip Conditions

Did You Know OIS

A OneCloud Chain has the ability to have multiple Branches, whereby a Branch is a series of tasks that are executed by the Chain.  Branches can spawn multiple parallel processes and then be merged back together in subsequent Commands within a Chain.  OneCloud’s native branching intelligence waits for each Branch to complete before continuing execution on subsequent Commands.  The Branch result or Link condition for each of the inbound Branches connected to a subsequent Command is also accounted for within Branching.  The Branch result of each Branch must match the Link condition specified in order for subsequent Command to be executed. 

A helpful new feature was recently introduced to the OneCloud Integration Studio is the ability to execute a Command, even when a connected Branch is not executed.  This feature is called Execute on Skip and is applied to the Link condition.

In the below example Chain, the Map Data and Export Product Dimension branches are denoted by one (1).  The Links are denoted by two (2), and the subsequent Command (Check for New Products) is denoted by three (3).  In this particular example, the Chain has two branches after the Start Node - Map Data and Export Product Dimension.  These branches will execute in parallel but may complete at different points in time.  The subsequent Command in the Chain - Check for New Products - will not execute until both branches complete successfully.  The success criteria are determined by the Link colors between the Map Data and Export Product Dimension branches and the Check for New Products Command.

IIMG1_Chain Overview_Branches_Links-1

Image 1: OneCloud Chain Overview

In the above example, the process to check for new master data is dependent on both the map data and export master data processes completing successfully so the Links from both of these Branches must be set to Success (green).  However, there may be other processes where a given Branch in the Chain may or may not be applicable to the subsequent tasks in the Chain.  In these cases, the Execute on Skip condition on a Link is a powerful way to address this.  

Further exploring the Chain, the Conditional determines if any new master data elements were detected in the data.  If new master data elements are detected, then the Chain executes the Update EDM & Deploy branch as noted by one (1).  Functionally, regardless of new master elements being detected or not, the next step in the Chain is to load data to the target application.  This is the Load Data to Planning Group as noted by two (2).  Notice that the Load Data to Planning Group is connected to the Update EDM & Deploy branch with a Success Link (green) and also to the New Product Code Conditional with an Any Link (grey).  

IMG2_Chain Overview_Branches_Links-1

Image 2: OneCloud Chain with Conditions

As discussed above, each of the connected branches results must match the Link condition specified in order for the subsequent Command to execute.  In this configuration, the Load Data to Planning Group would execute only if a new product code was detected.  In the event that no new product codes were detected, then the Update EDM & Deploy branch would not be executed and the Load Data to Planning Group would be stuck waiting for a branch that would never be executed.  To account for this, we simply add an Execute on Skip condition to the Link connecting the Update EDM & Deploy branch to the Load Data to Planning Group.  

IMG3_Skip Condition-1

Image 3: Conditional Chain execution

Since none of the Commands and, in particular, the last Command (Refresh Cube) in the Update EDM & Deploy branch would not be executed when no new product codes are detected, the Link condition being set to Execute on Skip allows the Load Data Planning Group to also be executed when no new products are detected. We hope that this helps explain the use of a Link condition Execute on Skip and illustrates the power of this simple but elegant feature. 


Stuck? We are here to help! Contact support or learn more about OneCloud via the OneCloud Quick Start Guides

If you have any questions or need additional information, please feel free to contact us at customersuccess@onecloud.io