Skip to content

support if statement #254

@lixingwang

Description

@lixingwang

I'm submitting a ... (check one with "x")

[] bug report => search github for a similar issue or PR before submitting
[*] enhancement request
[] feature request
[] support request
[] general question

Current behavior (how does the issue manifest):
Today we only support ternary expression for one level if else case, it has the limitation and it does not support nested ternary expression.
Expected behavior:
We should come up with an if statement expression which supports nested if else. such as:

 if true {
  "yes" 
 }else {
   "no"
}

if string.equals("FLOGO", "FLOGO") {
     if string.equals("if", "if") {
             "Hello FLOGO IF expression" 
     } 
}else {
    if string.equals("TIBCO", "TIBCO") {
            "Hello TIBCO"
    }
}

The if statement gives the user more flexibility to achieve more complex use cases

Minimal steps to reproduce the problem (not required if feature enhancement):

What is the motivation / use case for changing the behavior?

Please tell us about your environment (Operating system, docker version, browser & verison if webui, etc):

Flogo version (CLI & contrib/lib. If unknown, leave empty or state unknown): 0.X.X

Additional information you deem important (e.g. issue happens only occasionally):

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions