Announcement Announcement Module
Collapse
No announcement yet.
What the concept behind SWF? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • What the concept behind SWF?

    Hello,

    I truly need to know if I could address these scenarios with SWF and if not, which framework should I use?

    Scenario 1:
    a.
    1. User1 access empty payment form.
    2. User1 registers the information in the form.
    3. The system set the payment form status as Confirmed
    (User1 cannot modify the form anymore within the Confirmed status. He could do so with the Rejected status)

    b.
    1. User2 receives the payment form Confirmed.
    2. User2 Approved payment form.

    c.
    1. User3 receives the payment form Approved.
    2. User3 executes the payment form to pay the debt.
    3. The system set the payment form status as Executed,
    which means that the flow has been finished.


    Scenario 2:
    a.
    1. User1 access empty payment form.
    2. User1 registers the information in the form.
    3. The system set the payment form status as Confirmed
    (User1 cannot modify the form anymore within the Confirmed status. He could do so with the Rejected status)

    b.
    1. User2 receives the payment form Confirmed.
    2. User2 Rejected payment form.

    c.
    1. User1 receives the payment form with status Rejected
    2. User1 correct the payment form
    3. The system set the payment form status as Confirmed

    d.
    1. User2 receives the payment form Confirmed.
    2. User2 Approved payment form.

    e.
    1. User3 receives the payment form Approved.
    2. User3 executes the payment form to pay the debt.
    3. The system set the payment form status as Executed,
    which means that the flow has been finished.

    As you can see, I have different rules accessing different flows situations. I presume that using Acegi + CAS + SWF I could implement those scenarios, or not? Could you elaborate a bit more in the SWF context, using my required scenarios?

    Thanks in advance.
    Last edited by DistillingSpring; May 18th, 2007, 04:09 AM.

  • #2
    Today's deadline

    Hello, I have to prepare a document about it today. If you do have any thoughts, please, post it here.

    Comment


    • #3
      It looks like you could use SWF. The flows wouldn't be that large, so you could just use Spring MVC (AbstractWizardFormController). But I think you are really just talking about 1 maybe 2 flows and a controller.

      The first flow (Entry & Confirm) allows the payment info to be entered. Good use for a flow.

      The second step, seems a bit simple for an entire flow. But maybe I am missing something. It could just be a simple controller to Approve the payment info.

      The third step (Execute) doesn't sound to large either.

      So maybe just 1 flow, and a couple of controllers. It really depends how much each user has to do at a step.

      The thing with SWF is you can't really jump into the middle of a flow. It is possible, but then it gets to be a lot of decision making in your XML. I think that gets kinda messy. And the nice part of breaking it up. If one of your steps ever changes. You can work on it independent of the other steps.

      I think that is the nice thing about SWF and Spring MVC. You don't have to only use one or the other. Use SWF where it makes sense. I have seen some stuff on a couple projects, where they didn't want to introduce SWF (lack of knowledge about the tool), so we did everything in Wizard controllers. Wow...those were a mess. So we moved to using SWF, and it was so much simpler. But then everything after that, they wanted to use SWF, when really a Wizard controller would have really worked better in some situations.

      Comment


      • #4
        Maybe my flow is a bit large because It depends more who has the rule to do the things than how much information each one is handling with.
        Thank you so much for your reply.

        Comment

        Working...
        X