Idea ID: 2758875

OO-Designer: Add menu option "Add Decision"

Status : Waiting for Votes
over 1 year ago

In OO-designer I can add a custom Python operation, but if I need a

custom decision I can not do this from menu.

 

RobertBuerger_0-1580040322906.png

I wrote an own CloudSlang file and uploaded this to my git. After a pull from git I used it in Designer.

The code for a decision is super easy, so it would be great to do this from menu.

 

# Custom decision, RoB, 01.2020
#
########################################################################################################################
#!!
#! @description: Verifies NSO service state.
#!
#! @input service_state: State to compare.
#! Default: ''
#! Optional
#!
#! @result INSYNC: State is in-sync.
#! @result OUTOFSYNC: State is out-of-sync.
#! @result EMPTY: State is something else
#!!#
########################################################################################################################

namespace: wise.int.nso.decisions

decision:
name: check_nso_service_state

inputs:
- service_state:
default: ''
required: false

results:
- INSYNC: ${service_state is not None and service_state == 'true'}
- OUTOFSYNC: ${service_state is not None and service_state == 'false'}
- EMPTY: ${service_state is not None and service_state != 'true' and service_state != 'false'}
- FAILURE

 

Tags: