Инструменты пользователя

Инструменты сайта


limb2:en:document_flow

Organizing document flow

Object's status

Every Limb site_object has its status. In essence it's just a bit mask. At the moment we use status to know if the object is published or not(document, article, poll etc), however we may add some more bit fields in the future.

Status and flexible access policy permits to create complex doc flow systems on Limb easily.

Publish & Unpublish

Let's play around a bit with the Limb document flow. Usually Limb implements pretty straight forward docflow with publish, unpublish actions.

The object that supports publish and unpublish operations has 2 visible to administrator states: and . By clicking publish button or unpublish button you change the state and accesibility of the object.

We believe that there is generally no need to make simple things too complex. To understand Limb docflow principles you have to understand Limb access policy and especially access templates for actions.

In Limb terms, docflow is just about changing object's status and applying access templates. So publishing of the specific article is just setting published status bit and writing new access rights for the object.

For example, site administrator can set the following access template for publish and unpublish actions:

  • access for visitors and admins when object is published.
  • no access for visitors(object becomes invisible and inaccessible) and access for admins when object is unpublished.

Custom docflow

This simple scheme permits implementing a complex chain of responsibilities for some type of objects. For example, a journalist creates an article and click 'check by editor' action. The article becomes accessible for editors for editing and gets some imaginary NEED_EDITOR_APPROVAL_STATUS value(this one actually to be summed with status field using OR).

After that any editor may check the article and click 'check by boss' action. The article becomes accessible for bosses to modify and not any more accessible for journalists and gets NEED_BOSS_APPROVAL_STATUS value(one more bit field). The boss can publish the article now.

Only the boss has full access for article. The article finally gets the SITE_OBJECT_PUBLISHED_STATUS value. To implement such scheme you need to create special article class + controller + actions to change status + templates to display articles for different actions.

Small comments

Limb 2.3+ has simplified version of access policy so we don't know if Limb has ability to support complex docflows or not. The problem here is that we didn't face any case when we need complex docflow to implement.

Обсуждение

Ваш комментарий. Вики-синтаксис разрешён:
  __  __   __   _      __  _____  _   __
 / / / /  / /  | | /| / / / ___/ | | / /
/ /_/ /  / /__ | |/ |/ / / (_ /  | |/ / 
\____/  /____/ |__/|__/  \___/   |___/
 
limb2/en/document_flow.txt · Последние изменения: 2010/11/10 10:02 (внешнее изменение)