LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only

DoWhile and DoWhile Conditional only run once then stop

  • 1.  DoWhile and DoWhile Conditional only run once then stop

    Employee
    Posted 05-18-2017 09:39

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: stevem

    If I insert a DoWhile into my graph using the example in the help.
    if (firstExec) then condition = true

    #Increment count by 1
    emit 'count' + 1 as count

    # check if the condition is matched
    condition = condition and (20 > 'count')

    # After all records are processed, check if the condition is still true.
    if (lastInGroup and condition) then {

    # If the condition is still true,
    # set returnCode 101 to reschedule the node
    # and continue iteration.
    setSuccessReturnCode(101)
    }

    and connect the outtoloop pin to the inFromLoop pin, it runs 20 iterations then stops. When I clear the node and rerun it only runs 1 iteration and stops showing the count to be 21.
    Why can't I rerun the node. I am testing a sub graph and can only run it once then I have to delete the node, and rebuild it to run. What am I doing wrong?

    It doesn't matter if I use a doWhile or doWhileConditional.