We're testing ability to add Custom Workflows

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

We're testing ability to add Custom Workflows

Post by calguy1000 »

I just thought I'd try to get some user feedback on this.

We've tentatively added (into svn) some new methods into the module api.  to allow a) listing all of the user defined tags, and b) calling a user defined tag by name.

The idea with this, is that each module could create code such that on a certain event, a user defined tag is called, which would allow you to create a workflow.

For example, when a file is uploaded to the Uploads module, you could associate a plugin with that event that creates a news article. 

or, when a comment is added via the comments module (hook yet to be written), write your own custom email message to be sent to an admin/

or whatever series of events you wanted to happen.  All you would need is an understanding of php, and some understanding of the module api, and the api of the modules you wanted to work with (if any).

i.e.: if a user tag was created called "create_news_on_upload" that did something like (syntax not exact, we still have some things to do):

Code: Select all

$news = $gCms->getModuleInstance(*News");
$news->AddArticle( $params['upload_category'], "The user ".$params['upload_author']." has uploaded ".$params['upload_name']." you can get it here ".$params['upload_link'] );
And this user tag was associated with the "onupload" event in the Uploads module, a new news article, could be added each time a user uploaded a file.  This is just an example, the possibilities are endless.

What do you think?
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am
Location: Deatsville, AL

Re: We're testing ability to add Custom Workflows

Post by Elijah Lofgren »

This sounds VERY cool. I like it!  ;D
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: We're testing ability to add Custom Workflows

Post by calguy1000 »

there's nothing limiting this to modules either, technically speaking, once this idea is proven, it could be added to the core, so that, for example, you could write a user tag, and associate it appropriately, such that every time a new page was added (for example) to the content, a special administrator was sent an email.

or you could implement your own version control methodology, backups, etc, etc, etc.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: We're testing ability to add Custom Workflows

Post by Russ »

Yes I like it!

Russ
lemkepf
Forum Members
Forum Members
Posts: 163
Joined: Tue Oct 18, 2005 8:30 pm

Re: We're testing ability to add Custom Workflows

Post by lemkepf »

Yea, i like that, escpecially the being able to utalize the core events. "This user just added a page, send me an e-mail so i can check it out". Score. :)
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: We're testing ability to add Custom Workflows

Post by calguy1000 »

Well, it's been tested.  The uploads module now has an event that gets called when a new file is uploaded, it creates some parameters, and calls a user specified, user defined tag.  The user defined tag I wrote, would create a news article about the new upload.

As well,  I tested writing a user defined tag that called an action in a module.  This action, could theoretically generate another event.

This means that everybody using cms with a bit of php knowledge, can create their own custom workflows.  All it needs is for the module developers to send the events and allow you to specify the user tag to be called.

We've also been discussing some tentative additions for the 0.14 series that will centralize the event handling stuff on one page, so that administrators can see what events are available to be "trapped", and can then associate (or de-associate) user tags there.  We'll also probably be adding some more api functions to "Register" events, unregister them, and Send them.  The send would then lookup which tag should be called, if any, and call it with the module supplied parameters.

I think that this workflow stuff is going to put CMS over the top for it's ease of use, and customizability.

Any questions, comments, or suggestions?
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: We're testing ability to add Custom Workflows

Post by Russ »

I'm really looking forward to this. I think the important thing to remember is that we make it optional. It maybe complicated for less experienced users, but they don't have to do it. Workflow is complex and individual, that will not change, we can however provide some good building blocks for people to use if they want. Documentation may well be more important :-)

Remember the 80/20 rule. CMS should do the 80 not the 20 - but could provide the hooks for others to build the 20 if they need.

Russ
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

Re: We're testing ability to add Custom Workflows

Post by Ted »

Russ wrote: Remember the 80/20 rule. CMS should do the 80 not the 20 - but could provide the hooks for others to build the 20 if they need.
Wow.  I've said almost the exact same thing in the past.  I like the way you think.  :)

And, yes, I agree with this.  I love the idea of having places where people can expand on the system once they "get it".  It really makes people plesantly surprised after they've been poking around for awhile.  Something like this is a prime example.
Post Reply

Return to “Developers Discussion”