<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>scompt.com &#187; gsoc</title>
	<atom:link href="http://scompt.com/blog/archives/tag/gsoc/feed/" rel="self" type="application/rss+xml" />
	<link>http://scompt.com</link>
	<description>The website of Edward Dale</description>
	<lastBuildDate>Sun, 04 Sep 2011 15:54:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>WordPress GSoC 2009 Idea: Workflow</title>
		<link>http://scompt.com/blog/archives/2009/03/29/wordpress-gsoc-2009-idea-workflow</link>
		<comments>http://scompt.com/blog/archives/2009/03/29/wordpress-gsoc-2009-idea-workflow#comments</comments>
		<pubDate>Mon, 30 Mar 2009 02:38:18 +0000</pubDate>
		<dc:creator>Edward Dale</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[gsoc]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://scompt.com/?p=273</guid>
		<description><![CDATA[Birds are chirping, trees are blooming, and each day is a little longer. This can mean only one thing: Google Summer of Code is upon us. This year, I&#8217;m proposing to add a publishing workflow to WordPress. Introduction Some of these ideas are taken from a page I started on the WordPress Codex to mull [...]]]></description>
			<content:encoded><![CDATA[<p>Birds are chirping, trees are blooming, and each day is a little longer.  This can mean only one thing: <a href="http://code.google.com/soc/">Google Summer of Code</a> is upon us.  This year, I&#8217;m proposing to add a publishing workflow to <a href="http://wordpress.org/">WordPress</a>.</p>
<p><span id="more-273"></span></p>
<h2>Introduction</h2>
<p>Some of these ideas are taken from a <a href="http://codex.wordpress.org/User:Scompt/Workflow_With_WordPress">page</a> I started on the WordPress Codex to mull over workflow ideas.</p>
<p>WordPress is built to cater to the single user running a personal blog up to the global company running an entire website. In the big cases such as the latter, some controls and processes need to be in place to restrict what users can do and to assure that certain events take place in the correct order. Collectively, I&#8217;ll call these controls and processes a workflow and they&#8217;re the heart of the project I&#8217;d like to do for Google Summer of Code.</p>
<p>Wikipedia defines a workflow as:</p>
<blockquote><p>A workflow is a reliably repeatable pattern of activity enabled by a systematic organization of resources, defined roles and mass, energy and information flows, into a work process that can be documented and learned. </p></blockquote>
<p>This definition can be trimmed and refined a bit to better suit its application to WordPress, yielding:</p>
<blockquote><p>A workflow is a reliably repeatable pattern of activity enabled by a systematic organization of resources, defined roles, and information flows, into a work process that can be documented and learned. </p></blockquote>
<h2>Use Cases</h2>
<ul>
<li><strong>category editors</strong> &#8211; to be published in a category, a post/page must be approved by an editor for that category</li>
<li> <strong>writer->editor->designer</strong> &#8211; the writer writes text, which is edited by the editor, and then made pretty by the designer</li>
<li><strong>the big boss</strong> &#8211; everything that gets published must get the ok of the boss</li>
</ul>
<h2>System Design</h2>
<p>I envision the workflow system being implemented as a plugin.  I don&#8217;t think the number of people needing workflow controls justify putting it in the core.  I do, however, think there is a critical mass of sites that would benefit from the plugin.</p>
<p>My initial thinking about the plugin leads to three main components: design, notification, and moderation.</p>
<h3>Design</h3>
<p>Under &#8216;design&#8217;, I categorize the definition of the workflow.  This would be a &#8216;Settings&#8217; page and would utilize some kind of GUI to create a funnel-like representation of the workflow.  Posts/pages enter the system at the wide end of the funnel, go through a number of workflow stages, and emerge <em>published</em> at the other end.    Designing the workflow would consist of creating vertices and edges in this tree.  Vertices are moderation checkpoints that must be passed in order to move towards the root (publication).  Edges are the path that documents travel along.</p>
<p>Another facet of the workflow design is assigning users to the vertices.  A user at a vertex is the gatekeeper (moderator) of that stage, allowing documents to pass unscathed, modifying them, and/or sending them back to the previous stage.  Here, I picture a drag/drop interface to assign users to vertices.  Multiple users can occupy a vertex, as can one user occupy multiple vertices.</p>
<h3>Notification</h3>
<p>Notification is simply the idea that a user be notified when a document reaches his/her stage.  This would naturally occur when a document has passed from the previous stage, but also when a document has been turned back from the next stage.  Some options would be useful here to prevent a user from getting swamped with notification emails.  For example, only notify a user once between logins or at most once per day.</p>
<h3>Moderation</h3>
<p>This is really the heart of the plugin.  In order to pass through a stage, a moderator for that stage has to approve a document.  The moderator can optionally modify the document before approving it.  Once approved, a document either moves to the next stage or is published.  A rejected document is sent back to the previous stage.  Comments can be attached to the document to provide a justification for the decision.</p>
<h2>Implementation</h2>
<p>The design component will be implemented as a settings page that allows the user to graphically design the workflow.  When saved, the workflow will be captured as a tree structure and written to the options table.</p>
<p>Each stage of the workflow will have a shortname (think post slug).  This short name will be used to call an action when a post {enters, exits, &#8230;} that stage.  For example, the action &#8216;workflow_editor_entered&#8217; would be called with the post/page id when an author submits a document to the editor stage.  Default action handlers would be included that would email the users in that stage.  This is the notification component.  These default action handlers could be disabled if a user wanted to just notice the waiting posts, or a different action handler that twittered or SMSed a user.</p>
<p>Forcing posts to go through the workflow would be largely accomplished with the current capabilities system.  Many of the capabilities are meta-capabilities and are also sent through a <em>user_has_cap</em> filter before being processed.  The plugin would add a handler to this filter that looked up in the workflow to see if that action was allowed.  For example, in the case of an author X working on post 100 in the editing stage, the filter would receive the values (X, 100, editing).  The plugin would determine if the user is able to pass posts through that stage.</p>
<p>There are a couple open questions about the implementation.  If a published document is edited, where does it enter the workflow pipeline?  Is the published version un-published?  How does the revision control introduced in WP 2.6 play factor in?</p>
<h2>Existing Functionality</h2>
<p>WordPress introduced the concept of a &#8216;pending review&#8217; state in version 2.3.  This was a big step towards providing a workflow system, but it doesn&#8217;t go far enough.  Indeed, it only covers the last use case above.  In that case, the &#8216;big boss&#8217; would need to be the only user with permission to publish.  All other users would be able to create posts/pages and submit them for review.  This only provides the <strong>moderation</strong> component of the design.  There&#8217;s no built-in mechanism to <strong>notify</strong> the boss that a post is waiting for review.  The only way to <strong>design</strong> the workflow is to designate the boss as having the publishing capability.  There&#8217;s no further way to design such a trivial workflow.</p>
<p>The pending state doesn&#8217;t provide a workflow, but it makes it much easier to implement a full workflow system.  Basically, the entire workflow exists inside of the pending state.  When the original author thinks that a document is ready to be published, it is submitted for review, at which point it enters the workflow system and is given the pending state.  The editors at that first level of the workflow are notified that a document is waiting for them.  An editor makes any necessary changes and passes the document through to the next stage in the workflow.  It is still in the pending state at this point.  Until the document reaches the root of the workflow and is green-lighted to be published, it&#8217;s in the pending state.</p>
<p>When Mark Jaquith posted about the <a href="http://markjaquith.wordpress.com/2007/06/16/new-wordpress-feature-pending-review/">new pending state</a> in June 2006, he wrote that &#8220;There are obviously a lot more &#8216;editorial process&#8217; types of features that we could implement&#8221;.  In addition, the comments on that post requested many of the features that this GSoC project would provide.</p>
<h2>Previous Work</h2>
<p>I&#8217;ve previously implemented a much simpler 1-stage workflow in a plugin called <a href="http://wordpress.org/extend/plugins/zensor">Zensor</a>.  It hasn&#8217;t been updated in quite a while due to external time constraints.  This work was done for a high school in Germany where all changes to the website needed to be approved by the headmaster.</p>
<h2>Public Comment</h2>
<p>I <a href="http://comox.textdrive.com/pipermail/wp-hackers/2009-March/025470.html">solicited comments</a> for this idea on the wp-hackers mailing list, but didn&#8217;t receive too much feedback.  Maybe more comments will appear below.</p>
<h2>Updates</h2>
<p><strong>4/10/2009</strong>: I added the Existing Functionality section and expanded on the Implementation details in response to comments from Jane Wells on the <a href="http://socghop.appspot.com/student_proposal/show/google/gsoc2009/scompt/t123838296093">GSoC site</a>.</p>
<blockquote><p>
I don&#8217;t think this has enough information. There is a review process built into WP core already&#8230; what actual functions are you proposing to built, how will they differ from current functions, and how will you approach it technically? Those are the questions that the application needs to answer.
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://scompt.com/blog/archives/2009/03/29/wordpress-gsoc-2009-idea-workflow/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

