Struts2 and multiple active wizards / workflows -


I am currently working on a Struts2 application which integrates a wizard / workflow to create the desired result. To make it more clear, there is a business object that changes on three separate pages (mostly with AJAX calls). Currently I am using a ModelDriven operation (which is expanded by all the works working with the same business object), together with the Scope Interceptor. Although it works fine if the user is managing data for only one business object at a time, the user opens the wizard for different objects in multiple tabs (and we all do this when we want to speed things up Everything will be messy, mostly due to the fact that I have only one business object session stored in it.

I have read some articles about the conversation scope interceptor () and about using the scope plug-in (). However, there are problems in both ways:

  • Conversation scope does not end in interceptor conversations, nor does it integrate properly with Stratus 2;
  • There are not proper documents in the scope plug and the final build was done in 2007 (and in fact some ideas written by Mark Maincard include when it defines its conversation scope interceptor, though it is the same Does not use code).

    Spring's webflow plug-ins seem to be very complex to use at this time. I am currently looking for some work which can be implemented in a few hours, although I have no problem if you can give some suggestion that works as needed, even if it requires more time. Yes, even then I still want to spend on this.

    So, experienced Struts2 developers, what do you suggest? How should I implement this?

    Okay this is not a completely baked idea. But seeing anything as someone else has made available, here is how I will start.

    1) See if you can move the entire flow in the same page. I'm a big believer in fewer pages, a better approach, it does not reduce the complexity of the app, but the user generally finds the interface much easier. One of the easiest ways to get to know about this is by using a json plugin and making a lot of AJAX calls for your JS services

    2) If you should have transition between pages (or just think) That this is to implement a lot of client-side work # 1) then I'll see s: The token tag will use the first page to close a flow, which will make each invitation a unique value. You will have to store a map in your session of model object, looking at the session, you must provide a model with a model.

    There are some challenges with # 2, how many domain objects can you retain from the session? A) Well it does not matter, if the session is set to say six hours, then you can make sure that they will be cleaned overnight. B) provides a self-management interface that can receive in the session / set / list object. It may be that what you thought of earlier, but give it to a worker a certain sum and then turn off and work on the other. If there is some meaningful name in the unit of work (an invoice number or whatever) it can be quite useful.

    There will be some more sophistication to move the model object out of the session and in the service layer. At that point when you insert, you will set an integration time. You will need a manager to keep each type of model object and every manager will have a daemon thread that will periodically scan the map of the domain objects and clear the expired people.

    You can understand a more complex system by kicking the flow with a token and then using another token on each page. Respectively "flowId" and "currentPageId", then you can graph the permissible transition

    At this time, you feel very good at the spring web flow.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -