Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# mgaerber 2/27/2006 11:48 PM
Some ideas to make Cuyahoga fit for workflows:

The only information the worfkfow engine (WE) should manage and be able to provide is the state of process execution and who is due do what at a certain point of execution.

1.) The WE needs access to a global repository of users/roles
2.) Generic handlers need to be registered with the WE up front which will be called at gaining a certain state.

The Cuyahoga specific user repository needs to be hidden away from the WE.
--> Interfaces for Users/Roles/Membership

Handlers could be delegating to any kind of IT-System. Actually they will (at the moment) only delegating to Cuyahoga.
--> Defining Cuyahoga handlers

Example 1, Content Approval



So, stepping through the process, this would look something like this:

-The editor clicks the edit button for some content, the process is started
and the flow control transferred to the WE

- The WE calls the "content submission" handler, which on Cuyahoga's side means to provide an edit form or similar

- The editor enters the content and clicks the save button, the handler returns with the result "submitted"

- The WE calls the "content evaluation" handler, which returns with one of two defined results. In Cuyahoga this could mean, adding a task to the publisher's task list, which enables the publisher to access the edit and add the required information.

- At this point, further handlers could be called, for example notifying the actors of the result but essentially the process ends here

Notes:
As the editor could "cancel" his submission, the WE needs to be able to cancel the process, too. This is left out on this diagram.

In case of an error, a generic error handler will be called.

Authorization (e.g. what is allowed to change on the edit form) in this model lies in the responsibility of the respecitve handler (or the IT-System behind it).


# mgaerber 2/28/2006 12:16 AM (edited 2/28/2006 12:23 AM)
For the module part, they could just implement specific interfaces, for example IPublishFlow or similar.

The module then exposes events that notify the core engine of content status changes and offers methods which can get called in return.

The core engine inspects the module for certain interfaces and subscribes to the events when loading the module.

Taken the above example, the click on the edit button of a module could fire a "ContentSubmissionRequest" event which according to the above workflow needs to be handled by providing ways to let the authorized person access an edit form.

Taken the idea of defined "states" of a module, e.g. View, Edit, Help, Print etc, this could as well be handled by the core engine changing the state of the module.

After clicking "save", the "ContentSubmitted" will be fired and the engine finally responds with changing the state of the module to "View" and providing a notification that the content is subject to further approval.

To standardize all of this, following changes would have to be made:

- Define global states of modules, for complex modules this would involve adding extra information, like the currently edited content type etc. so the module knows what exactly to do.

- Define (extend) the notifications, so the core engine can provide the module (user) with information about changes.
(Notification label, as already available, email etc.)

- Add a standardized tasks management, so requests that can not be handled at the moment (approval) get put to the task list and can be
completed at a later time

- Define a set of generic task dispatchers, e.g. "random" when no specific User but a Role is responsible for completing a Task.

- Did I forget anything ? :-)
# big_al 2/28/2006 12:39 PM
Sounds pretty damn good! ;)

I just had a quick thought... how about building a revision / version engine (basic) in to it, so if some content is edited it becomes (for instance) 1.0.1 and if it is approved 1.0.1 becomes the current and displayed content.

This would allow for finite rollback to version 1 at any given time.

What do you think?

Al
# sandaru1 2/28/2006 10:45 PM
Hi Guys,

This is my first post. I am really interested in using Cuyahoga. I have also suggested my company to use it.

About the WE, are you planning on having a fixed work flow like mgaerber has mentioned. Shouldn't the work flow be customisable. For example, what if there is another user/role called a reviewer who reviews the changes done by the author and adds comments, whichc the publisher uses to accept or reject the changes.

The idea about versioning is also good.

Sandaruwan
# mgaerber 3/4/2006 12:45 AM
big_alI just had a quick thought... how about building a revision / version engine (basic) in to it, so if some content is edited it becomes (for instance) 1.0.1 and if it is approved 1.0.1 becomes the current and displayed content.

This is very important, too. NHibernate already has built in versioning capabilities but I don't know if they'll suffice
# martijnb 3/4/2006 6:39 AM
mgaerberThis is very important, too. NHibernate already has built in versioning capabilities but I don't know if they'll suffice

No, that won't be enough. NHibernate's versioning system is designed to handle optimistic locking. There are no built-in features to keep existing versions, so we have to come up with a solution for that.
# mgaerber 3/5/2006 2:16 AM (edited 3/5/2006 2:38 AM)
sandaru1Shouldn't the work flow be customisable. For example, what if there is another user/role called a reviewer who reviews the changes done by the author and adds comments, whichc the publisher uses to accept or reject the changes.

The proposal I made assumes that there will not be a "real" workflow engine available very soon.

It all depends on how "standardized" the modules will be.
We can define a set of generic events and respective handlers that modules provide/implement.
What these events cause and which handlers will get called then depends on the flow that is defined somewhere else.

So for your example there would just be one additional step in the publishing process, the "review". Sow you'd have to write an "extended publish flow" yourself.
Or maybe this one will be part of a set of predefined flows.

The whole idea is to only change the "flow definitions" to change the modules' workflow.



# mgaerber 3/5/2006 2:37 AM
martijnb
mgaerberThis is very important, too. NHibernate already has built in versioning capabilities but I don't know if they'll suffice

No, that won't be enough. NHibernate's versioning system is designed to handle optimistic locking. There are no built-in features to keep existing versions, so we have to come up with a solution for that.

That's true but maybe we can still use parts of it?

So far I handled versioning with serializing an object (e.g. xml) and writing it to the file system:

Create folder with full type name, then create folder with the object's Id; in this folder put all the versions using the version number as file name.

So, to get all versions of an object I only have to look up a folder like:
Cuyahoga.Modules.Downloads.File/12006/

The advantage is, I do not have to keep any references or actual data in the database for old versions.

The most daunting task with this is to restore versions. I might have changed some relations and deleted objects that the old version once referenced, so I won't be able to save it again to the database....




# martijnb 3/6/2006 9:53 AM
I don't think it's a good idea to store earlier versions on the FS unless this FS is also centralized in some way.
Personally I have nothing against keeping earlier versions in the database.
# big_al 3/6/2006 12:18 PM
I'm with martijn on this one, storing the objects on the FS is not a good idea, easy enough to keep it all centralized in the DB.
# sandaru1 3/6/2006 8:10 PM

Hi,

I also feel that storing old versions of content inside the database is the best way to go. I have done this in a document management system I have developed, wher eall the old versions of a document are stored in a separate table, with a flag to find the latest version.

Sandaruwan
# mgaerber 3/7/2006 9:11 AM
Looks like I am clearly outvoted ;-)

If you keep it in the database (and don't want to double tables) you'd have to add constraints to each query to omit old versions, won't you?

# big_al 3/7/2006 12:57 PM
mgaerberLooks like I am clearly outvoted ;-)

If you keep it in the database (and don't want to double tables) you'd have to add constraints to each query to omit old versions, won't you?

A simple boolean (bit) field for the active content version or a "ContentState" column which links to a table of values, such as

1. Superseded
2. In Review
3. Current

or somthing like that would make life quite easy.
# wernerw 3/19/2006 11:24 PM
Insofar the workflow is concerned I agree it needs to be as generic as possible, perhaps to the level where it can be used outside of the CMS as well. I do realise that this will create the need / requirement for alot more thinking and development, but from a systems point of view if they can are not tightly coupled then it would be an advantage for other types of applications as well.

I am aware of only a few open source workflow engines but no good ones in that are .net based. Perhaps this could be a good opporutnity to start something like this.

I reckon perhaps a phased approach could work, defining interfaces and such that will suit the CMS then at a later stage once that is stable abstract it away from the CMS to provide workflow to other applications as well.

Any thoughts?

Cheers

Werner
# tabryant 3/20/2006 3:13 PM
And as far as versioning goes.....It is really as simple as using "date/times" and showing the last one as the current version.
# mgaerber 3/21/2006 6:15 AM
Some additions:

Concerning Workflow:
I opt for Microsoft Workflow Foundation. Well, it is .NET 2.0 but until Cuyahoga is .NET 2.0 we can provide interfaces that mimic the MWF.

Concerning versioning:
"tabyrant"It is really as simple as using "date/times" and showing the last one as the current version
For simple objects - yes. For complex/compound ones - not quite. If sub-objects change, the parents versions need to be corrected accordingly. We needed to define, if only the root of a compound object gets versioned or sub-objects as well and so forth.

Example:
Product - Prices [1..N]
One Price changes -> what happens?
The Product name changes -> what happens?

# easfaw 3/23/2006 9:55 AM
The workflow topic seems to be getting complex, let me add to the complexity:

I'm not an expert on workflows and have really only worked on in-house workflows (not any engines...), but some things that I have noticed are involved with simple workflows are:
- versioning-either a set number, infinate or simply active/not active
- decision - something is decided, either by defined logic/rules or by a person (for me usually a person)
- notification - a person needs to know that decisions are waiting for them to be made
- and history seems to be useful - but I guess this depends on what kind of versioning exists (if unlimeted versioning then no history needed, if not - some sort of the workflow and the modules history)

From the discussions I'm gathering that the objects we are talking about are Modules.

Here are some additional examples where Modules would make use of workflow services:
- HtmlModule that is aware that it is versioned (similar to the example at the top)
- perhaps a backend for a shopping cart that waits for a decision to give a discount on an order or not
- even when a user registers a registration module can email (notify) and wait for the confirmation

E
mgaerberSome additions:

Concerning Workflow:
I opt for Microsoft Workflow Foundation. Well, it is .NET 2.0 but until Cuyahoga is .NET 2.0 we can provide interfaces that mimic the MWF.

Concerning versioning:
"tabyrant"It is really as simple as using "date/times" and showing the last one as the current version
For simple objects - yes. For complex/compound ones - not quite. If sub-objects change, the parents versions need to be corrected accordingly. We needed to define, if only the root of a compound object gets versioned or sub-objects as well and so forth.

Example:
Product - Prices [1..N]
One Price changes -> what happens?
The Product name changes -> what happens?
# tabryant 3/23/2006 11:46 AM
mgaerberConcerning versioning:
"tabyrant"It is really as simple as using "date/times" and showing the last one as the current version

For simple objects - yes. For complex/compound ones - not quite. If sub-objects change, the parents versions need to be corrected accordingly. We needed to define, if only the root of a compound object gets versioned or sub-objects as well and so forth.

Example:
Product - Prices [1..N]
One Price changes -> what happens?
The Product name changes -> what happens?

I fully understand the issue. I guess my question is whether we need that level of abstraction. Why would I even care to version a price or a product name? If that type of behavior is needed, I would suggest it be defined in the "module" rather than in Cuyahoga.

I think that most people simply want to be able to version articles, and define a workflow for editing/approving/displaying them.







# mgaerber 3/23/2006 11:38 PM
tabyrantI think that most people simply want to be able to version articles, and define a workflow for editing/approving/displaying them.

You are most certainly right about this. I just wanted to widen the perspective to allow to make a decision that is carried by most of the community.
If everybody agrees with a "pragmatic" solution - here we go ;-)

# wernerw 3/24/2006 1:45 AM
I agree, let's keep the workflow simplistic to start with at least, but keep in mind a greater goal. Thus start by making it applicable to the documentation and versioning thereof but try to keep it clean to such an extent that the design allows for it to be abstracted at a later stage and transformed into a proper workflow engine as such.

Any comments?

Werner