Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 873561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:57:27+00:00 2026-05-15T10:57:27+00:00

Say, I have this type of webflow: def myFlow = { state1 { }

  • 0

Say, I have this type of webflow:

def myFlow = {
    state1 {
    }
    on("next").to("stateAct")

    stateAct {
        action {
            ... DB stuff ...
        }
    }
    on("success").to("state2")

    state2 {
    }
    on("prev").to("state1")
}

Now, the contents of “stateAct” is common between state1 and state2. Meaning, if I press “next” from state1, I need to pass by stateAct before I can go to state2 (which is the current implementation) and if I press “prev” in state2, I need it to pass by stateAct before it goes to state1. Obviously, in the sample webflow above, it doesn’t do the latter.

So, my question is, is there a way to detect in stateAct who called it (state1 or state2) so that I can redirect accordingly on “success”? Or something similar to that behavior?

Thanks!

-Lee

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T10:57:28+00:00Added an answer on May 15, 2026 at 10:57 am

    Why not store this info in a flow-scoped variable? Something like:

    def myFlow = {
        state1 {
          on("next") {
              flow.originator = 'state1'
          }.to("stateAct")
        }
        stateAct {
            action {
                if (flow.originator == 'state1') do something
                if (flow.originator == 'state2') do something else
            }
        }
        on("success").to("state2")
    
        state2 {
    
          on("prev"){
            flow.originator = 'state2'
          }.to("stateAct")
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Lets say have this immutable record type: public class Record { public Record(int x,
Lets say I have this: public class Result { public bool Success { get;
Say I have this type of structure: Project/Code files : C:\myCode Git Repository :
Lets say we have this JPA-annotated class, with a property of type List. This
Let's say I have this data in a MSSQL table type status a open
Let's say I have this basic string... string a = Entity; And this Type
Say I have this XML: <domain type='qemu' xmlns:qemu='http://libirt.org/schemas/domain/qemu/1.0'> <name>QEmu-fedora-i686</name> <memory>219200</memory> <os> <type arch='i686' machine='pc'>hvm</type>
Let's say I have this : class whatever(object): def __init__(self): pass and this function:
Let's say I have this MySQL table: OK.. see the type field? Type 0
Say i have a data structure like this: type Foo struct { Bar []struct

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.