Matthias:
I think I understand your answer. But, I'm not sure where things would go. If I'm understanding your explanation:


process1:wkfl1 -> process1:wkfl2 -> (violation) process2:wkfl1 landing page(initializer action)

the p2:w1 landing page would be a ForwardNextStateViolationAction
  the FordwardNextStateViolationAction has forwards:
     forward "noNextStateViolation" : goes to display page for p2:w1

but, if there IS a next state violation, here's where I get confused:
"If a nextState violation was encountered it forwards to the path that caused this workflow violation "


Which would lead me back to the p2:w1 landing page ? That confuses me.


Can you explain why this approach is better than just a "i know i want to end all previous processes at this point, without having to link in with other violation actions" ? Or can they co-exist together nicely ?


Thanks for your help.

-- adam




From: Matthias Bauer <[EMAIL PROTECTED]> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]> To: Struts Users Mailing List <[EMAIL PROTECTED]> Subject: Re: workflow extension question Date: Mon, 06 Oct 2003 13:46:56 +0200

Adam,

there is a solution to your requirement. If I get you right, here is what you want to do: You are in a modal dialog. If the user clicks on some link he violates the workflow. The action that violates the workflow should check whether this is a nextState violation. Upon nextState violation you end all relevant workflows and forward to the action that caused the workflow violation.

Here is how you can check whether it is a nextState violation: There is an action contained in the workflow package that can easily be used for this: ForwardNextStateViolationAction. Use this class in the action that handles workflow violations. It chooses the forward "noNextStateViolation", if there was no nextState violation encountered (i. e. it must have been a prevState violation). If a nextState violation was encountered it forwards to the path that caused this workflow violation (this can be an arbitrary action choosen from your menu). Have a look at the action's code: It uses the method WorkflowUtils.getNextStateViolationAction that provides the required information.

Hope this additional info helps.

--- Matthias


Adam L wrote:


Matthias:
   Now to take you up on your offer.    "is something missing?"

What thoughts do you have on a "end all previous workflows" property?
The thought is this:
- my user is working through a process, and gets bored or distracted
- rather than using the provided "cancel" button, they use a nav link
to go elsewhere (ie, a terms and conditions or "what's new page")
- my thought is to let them do this, perhaps they'll jump back
(browser back) to the step they were on and continue their path
- but, if they don't ever come back, and end up starting another
workflow process, they'll be dumped right back to their first workflow.
- being thrown back to a place you wanted to leave would be confusing


So, the answer to this is an "initialization" page for each process
that basically says "cancel out all existing workflows and states, and start
this workflow instead".


Yes, ideally, the user should use the opt-out mechanism provided
to them, but you can't expect that to happen. And, I'm not keen on designing
for a modal experience unless absolutely necessary. One could go through
every possible action and add a "noWorkflowChecks" everywhere, but that
still doesn't resolve the issue of them starting a new process w/o
explicitly terminating an existing one.


To illustrate what I'm seeing:

<!-- the landing page for initializing this process -->
<action
   path="/content/startNewTask"
   forward="/content/displayTaskStartScreen.do">
 <set-property property="authClass"
value="com.foo.workflow.authentication.LoggedInAuthentication" />
<set-property property="endAllExistingWorkflows" value="true">
<------------ new property
 <set-property property="primaryWorkflow" value="wkfAddNewTraitStart"/>
 <set-property property="newState" value="initialized"/>
 <!-- not logged in authentication exception -->
   <forward name="authenticationException" path="/login.jsp" />
</action>


Any thoughts?


-- adam



----- Original Message -----
From: "Matthias Bauer" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, September 15, 2003 1:59 AM
Subject: Re: workflow - Re: integration with other app






Fortunately I am far enough away to avoid your kiss ;-)

Please let me know, if you believe something is missing. I am sure I


can


give you some more hints on how to solve a specific task. The Struts
Workflow Extension is a very powerful, yet low-level framework. Thus,


it


offers very much flexibility but sometimes the right way to achieve a
solution is not as apparent as desired.

Just in case you are interested: We are also offering commercial


support


for this extension and Struts itself.

--- Matthias


Adam Levine wrote:






Matthias:
I could kiss you!   I've been struggling with this issue and have
been going bald over the last week doing a lot of my own engine
work.   I can't wait to try this out and see if it doesn't work for me
as cleanly as it looks.




From: Matthias Bauer <[EMAIL PROTECTED]> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]> To: Struts Users Mailing List <[EMAIL PROTECTED]> Subject: Re: workflow - Re: integration with other app Date: Fri, 12 Sep 2003 08:35:36 +0200

Martin,

the Struts Workflow Extension http://www.livinglogic.de/Struts/
addresses some of the issues you raise. Especially the thing about a
workflow scope. But it is also easily possible to build reusable
action sequences: Consider for instance a confirmation dialog that
demands the user to press a "Yes" and "No" button. You will need this
multiple times within an application, but you normally want to code
the necessary actions only once and reuse them in different contexts
(i. e. with a customized question and return action).

Please let me know, when you have any questions related to the Struts
Workflow Extension.

--- Matthias

Martin Naskovski wrote:





One thing I find particularly cumbersome in Struts is web page
workflow. Currently, if I want to push "Cancel" for instance, or
"Submit" on a certain page, in the Action itself, I have to hard code
where to go next and/or pass any dynamically generated parameters
through the request scope or the query string (if doing a
sendRedirect). I also have to use hidden form fields to tell each
submission button on a form, where to go next, depending on where I
came from (a certain action mapping, e.g.).

Is there a better way to do this, where the flow of the screens can




be




specified statically, or maybe if not statically at least within a
screen workflow module that each action will tell that module where
to go next, depending on what button was pushed on that form?

Does JSF address this perhaps? Or has someone independently made a
Struts pluggable module that can control screen flow? It seems there
almost is a need for some sort of a 'workflow' scope, where when I
start a certain use-case from one of the menus in the application,




the




'workflow scope' is preserved throughout the use-case lifetime, and




if




for some reason this flow is broken by the user, the workflow scope
should be destroyed.

I've been able to immitate a workflow scope with the session scope,
but it isn't as elegant as I want it to be, or rather, as delimited


from the application logic as I'd like it to be... Plus stuff in the


session scope hangs around much longer than as if I had a workflow
scope.

I've been wondering if there's any solutions already to this - it
seems that is the _only_ thing Struts is lacking in.

Thanks.

Martin
--


Thursday, September 11, 2003, 4:31:29 PM, you wrote:


TH> This seems more in scope for some of the ServerSide forums than
Struts.

TH> http://www.theserverside.com/home/index.jsp

TH> Our framework ends where the database begins -:0)

TH> Tiles is sufficient for customizating layout and such.

TH> -Ted.

TH> Gregory Seidman wrote:

TH> <snip/>







My purpose in posting this to the list is to get the benefit of the
membership's collective experience. Is Torque a good choice? Is
creating a
separate database for each user unacceptable from the point of view
of a
website which provides services on a per-user basis? Is Tiles
sufficient
for customizing layout and such? Any suggestions, tales of woe, or
design
critiques are appreciated.

Please do not CC me; I am subscribed to the list.
--Greg






---------------------------------------------------------------------




To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]








---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

_________________________________________________________________
Get a FREE computer virus scan online from McAfee.
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]






--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

_________________________________________________________________
High-speed Internet access as low as $29.95/month (depending on the local service providers in your area). Click here. https://broadband.msn.com



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to