You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mike Duffy <md...@yahoo.com> on 2003/07/11 08:28:50 UTC

Struts and Workflow

I think that Struts and the MVC architecture could be used to create
a basic workflow system.

A "WorkflowState" object would represent the state of items in the
workflow (current assignment, current status, and other attributes).

A "WorkflowRights" object would represent a user's right to view or
change workflow items.

A "WorkflowEngine" object would process the "WorkflowState" object
and generate a "WorkflowRights" object.

The "WorkflowRights" object would be a bean that could be used by a
JSP to determine if the text of an item is displayed (if the item "is
viewable"), or a form field is displayed for an item (if the item "is
changeable"), or perhaps the item is neither viewable nor changeable
(the state of the item is simply held by the "WorkflowState" item).

The Struts Action object could determine the ActionForward based on
the processed "WorkflowState".

Things could get messy very quickly if you attempted to create a
framework that would account for every interaction and combination,
and/or provide a generic rules generation system. However, if you
accept that your workflow rules are going to be generated by coding
your "WorkflowEngine", you should be able to create a very effective,
modular system.

Any thoughts?

Mike

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Struts and Workflow

Posted by Mike Duffy <md...@yahoo.com>.
The reason I posted a message on workflow to this group is because
there were a few brief postings on the subject earlier in the week.

Also, as a point of clarification, the "WorkflowRights" object is
needed to keep business logic out of the view.  A display decision is
made based on rights and not a combination of logic decided in the
JSP (if a user is in "X" role AND the status is "Y", etc.).

Mike


--- Mike Duffy <md...@yahoo.com> wrote:
> I think that Struts and the MVC architecture could be used to
> create
> a basic workflow system.
> 
> A "WorkflowState" object would represent the state of items in the
> workflow (current assignment, current status, and other
> attributes).
> 
> A "WorkflowRights" object would represent a user's right to view or
> change workflow items.
> 
> A "WorkflowEngine" object would process the "WorkflowState" object
> and generate a "WorkflowRights" object.
> 
> The "WorkflowRights" object would be a bean that could be used by a
> JSP to determine if the text of an item is displayed (if the item
> "is
> viewable"), or a form field is displayed for an item (if the item
> "is
> changeable"), or perhaps the item is neither viewable nor
> changeable
> (the state of the item is simply held by the "WorkflowState" item).
> 
> The Struts Action object could determine the ActionForward based on
> the processed "WorkflowState".
> 
> Things could get messy very quickly if you attempted to create a
> framework that would account for every interaction and combination,
> and/or provide a generic rules generation system. However, if you
> accept that your workflow rules are going to be generated by coding
> your "WorkflowEngine", you should be able to create a very
> effective,
> modular system.
> 
> Any thoughts?
> 
> Mike
> 
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org