View Only

Rapid Network Automation -- The Case for Case Statements

By Tim Greenside posted Fri September 08, 2023 11:37 PM


When automating repetitive tasks, there is seldom a task that doesn't require other somewhat related tasks down the road.  As an example, if I want to add a maintenance window to my IBM SevOne NMS system (add task), I may want to list the maintenance windows already in place (list task), I may need to modify it later (modify task), and I may want to remote it altogether (remove task).  You can see that there is an entire lifecycle that a maintenance window might go through during its somewhat short, meaningful life.  Enter case statements.

Using IBM's Rapid Network Automation solution (combined with IBM SevOne NPM, it's referred to as SevOne Automated Network Observability), you can enlist a "case statement" action block in your no-code/low-code workflow to handle the different lifecycle tasks or "cases" in an organized way, allowing you to consume a single workflow license to handle all lifecycle cases, rather than consuming four licenses to handle the individual cases as discrete, unrelated workflows.

In the "Start" block of your workflow, add a mandatory "task" input variable, where you can direct your workflow using a "case" statement to perform one of the defined tasks: "create", "modify", "delete", or the default task of "list" in this case.  You are then able to pass the other input variable values into the sub-workflow (I call them subflows) for the task.  Using subflows is a great way to subdivide the various lifecyle tasks into their own workflows that can be called from our "case statement" driven workflow.
I hope this tip helps you see how you can efficiently handle task lifecycles with IBM Rapid Network Automation!