GrailsFlow

'Return' statement in a Node is not working properly

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Won't Fix
  • Affects Version/s: None
  • Fix Version/s: 1.0
  • Component/s: None
  • Labels:
    None
  • Request Controller:
    Albers, Stephan
  • External Supervisor:
    Please select
  • Executing Programmer:
    Please select

Description

Generally the return statement is the last statement in the a node, however there are situations where we need to return earlier in the an action.

This requires to manage some kind of simplified "call stack" or more functions of a "real interpreter".

The problem can be seen in the following example:

nodeTest() { 
        action { 
           AssignTo(var: "resultAction1") { 
             Action1()
          } 
          IF(sourceParameter:"#resultAction1", comparator:"=", targetParameter:"false") { 
            return error() 
          } 
           AssignTo(var: "resultAction2") { 
             Action2()
          } 
 
         IF(sourceParameter:"#resultAction2", comparator:"=", targetParameter:"false") { 
            return error() 
          }  ELSE() { 
            return okay() 
          }
        } 
        on("error").to([ "finishError" ]) 
        on("okay").to([ "finishSuccessfully" ]) 
      }

When i have designed this node i assume that if Action1 will return false than regarding the return error() statement will be called error transition.
But in reality, the "return error()" statement is ignored and the following action Action2 is called.

Activity

Hide
Voitovich, Maria added a comment - 22/Feb/11 8:46 AM

Won't fix due to GFW-235

Show
Voitovich, Maria added a comment - 22/Feb/11 8:46 AM Won't fix due to GFW-235

People

Vote (0)
Watch (0)

Dates

  • Created:
    21/Mar/10 10:51 AM
    Updated:
    22/Feb/11 8:46 AM
    Resolved:
    22/Feb/11 8:46 AM