Results 1 to 8 of 8

Thread: flowExecutionKey?

  1. #1

    Default flowExecutionKey?

    I remember 1.0 had this variable you could insert once you started your flow and it would essentially be your form action. Does this still exist? I'd like to execute it manually, and have less jsp tags in general. Maybe I should just download the release later today...

    The reason I'd like to use the expression variable is because these days I find myself sticking *a lot* closer to html and unobstrusive Javascript development.but obviously I still need to hook into the framework somehow.

    It'd be helpful to have a 2.0 version of JSP integration in the docs. Oh and congrats on the release!

    Thanks!

  2. #2
    Join Date
    Jan 2005
    Location
    Phoenix, AZ
    Posts
    139

    Default

    It does exist, though now the param name is "execution". So you could have

    execution=${flowExecutionKey}

    You can also use

    ${flowExecutionUrl}

    which will give you both the servlet path to the flow (since with SWF 2.0 you would generally have a unique servlet path for each flow) and also the execution=${flowExecutionUrl} part. You still have to add the event yourself manually. Here is an example:

    <a href="${flowExecutionUrl}&_eventId=cancelCheckout" >[cancel checkout]</a>

    Hope that helps.
    Willie Wheeler
    Author, Spring in Practice (Manning Publications)
    Spring stuff: Tutorials | Blog

  3. #3
    Join Date
    Mar 2008
    Posts
    170

    Default

    ${flowExecutionUrl} is working (shows the correct flowExecutionKey) but the ${flowExecutionKey} does not show up any value!?

    Working example usage:
    Code:
    <h:outputLink value="${flowExecutionUrl}&amp;_eventId=myId">flowExecutionUrl usage</h:outputLink>
    Not working usage:
    Code:
    <h:outputLink value="my-flow?execution=${flowExecutionKey}&amp;_eventId=myId">flowExecutionKey usage</h:outputLink>
    I'm using spring-webflow-2.0.2.CI-488.

    Any suggestions?

    - Peter

  4. #4
    Join Date
    Aug 2004
    Location
    Melbourne, FL
    Posts
    2,794

    Default

    That's right, ${flowExecutionKey} doesn't have a value, it's ${execution} as Willie mentioned by default in 2.0. Why can't you just rely on the ${flowExecutionUrl} form which includes the execution key?

    Keith
    Keith Donald
    Core Spring Development Team

  5. #5
    Join Date
    Mar 2008
    Posts
    170

    Default

    Thanks for the quick reply Keith.

    Quote Originally Posted by Keith Donald View Post
    That's right, ${flowExecutionKey} doesn't have a value, it's ${execution} as Willie mentioned by default in 2.0.
    I have understood that Willie has just mentioned not to use
    _flowExecutionKey=${flowExecutionKey}
    but
    execution=${flowExecutionKey}

    and I have also not read that this value is null (based on his post ).

    Quote Originally Posted by Keith Donald View Post
    Why can't you just rely on the ${flowExecutionUrl} form which includes the execution key?
    I'm just looking what possibilities exist.....

    - Peter

  6. #6
    Join Date
    Aug 2004
    Location
    Melbourne, FL
    Posts
    2,794

    Default

    Peter,

    execution=#{flowExecutionContext.key} should work; in general, though, I'd prefer sticking with the #{flowExecutionUrl} form for simplicity.

    Keith
    Keith Donald
    Core Spring Development Team

  7. #7
    Join Date
    Mar 2008
    Posts
    170

    Default

    Thx for additional clarification.

    - Peter

  8. #8

    Default execution coming empty

    Hi,

    I'm using JSF + SWF(2.0.5) for my app. I'm having a similar problem here too.
    I have an starting page where i have a link that points to my flow.

    Code:
    <h:outputLink value="browsedetails?execution=${flowExecutionUrl}&amp;id=spawn;">Start</h:outputLink>
    However when the link is formed it shows empty value for the execution and hence on clicking on it i get a
    Badly formatted flow execution key '', the expected format is 'The string-encoded flow execution key is required' exception.

    I've tried using execution=#{flowExecutionContext.key} and #{flowExecutionUrl} also.

    Not sure why it doesn't get populated.
    Also I manually changed the execution to some value and it called my java method for <on render>. However the id that i passed as requestParameter.id also came up as empty in my method.

    Code:
    <evaluate expression="Search.getlist(requestParameters.id)" result="flowScope.list" />
    Thanks,
    Nitin

    Update:
    Just found out that if in my page i have a form, and then if i use execution=${flowExecutionContext.key}; i get the value for it. Also i get the id passed to my method.
    I guess that make sense but any way i can do it without a form??
    Last edited by nitinkcv; Feb 12th, 2009 at 08:01 AM. Reason: Update

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •