Configuring WCM Workflows

Exclusive offer: get 50% off this eBook here
Alfresco 3 Web Content Management

Alfresco 3 Web Content Management — Save 50%

Enterprise Web Content Management made easy and affordable

$35.99    $18.00
by Amita Bhandari | September 2010 | Content Management Open Source

Workflow is an automation of a business process, during which documents are passed from one participant to another for action, according to a set of procedural rules. Every content management system implementation will have workflow requirements. Workflow provides ownership and control on the content and processes. Alfresco web project uses workflows to support any set of changes, either automated or user-driven steps, in a business process before final commit to the Staging Sandbox. WCM Workflows can be configured for each form or for any arbitrary set of non-form assets.

In this article by Amita Bhandari, co-author of the book Alfresco 3 Web Content Management, we will take a look at the following:

  • Associating workflows to web forms
  • Associating workflows to web projects
  • Dynamically changing workflow for each snapshot submission

(For more resources on Afresco 3, see here.)

Workflows can be configured for both web forms and non-generated web content. In order to submit content to the Staging Sandbox, workflows need to be configured. We will discuss shortly how form-based and file-based workflow can be configured, and also how content can be submitted to the Staging box.

Associating workflows to web forms

Workflow for web forms can be configured using the Create Web Form Wizard or the Edit Web Form wizard. Using these approaches, workflows can be configured for all web projects and for a specific web project. Assuming that we have already created a web form, we will use the same web form to drive a workflow. In this example, we have to use the Edit Web Form Wizard. Follow these steps to assign a workflow for the web form:

  1. Ensure that the Alfresco server is up and running.
  2. Go to Company Home Data Dictionary | Web Forms|.
  3. Click on the Edit Web Form action under the training (web form name) space.

  4. Clicking on this will open Edit Web Form Wizard. Click on Next twice to reach the Configure Workflow window.
  5. Select the Yes radio button and click on Next.

  6. Click on Finish.

Associating workflows to web projects

To assign a workflow for a specific project, you can use two approaches. The first approach is by using the Create Web Project Wizard that will be used if you are creating a new web project. The second approach is by using the Edit Web Project Wizard. We will be using the second approach since we have already created the Cignex web project. Follow these steps to associate workflow for a web form:

  1. Ensure that the Alfresco server is up and running.
  2. Go to Company Home Web Projects | Cignex|.
  3. Select Edit Web Project Settings from the action menu.

  4. Click on Next.
  5. On the next screen, click on Next.
  6. In the Step Three window, you will notice the added web forms in the panel as shown in the following screenshot. You can see the Configure Workflow button available for each web form. This button is enabled only for those web forms for which we have configured workflows. Notice the attention icon next to the workflow. This indicates a workflow has been selected but not configured:

  7. On clicking the Configure Workflow button, the Configure Workflow window is opened. This window is used to configure form-based workflows (web form generated content). This is specific for web forms only. Fill out the details as shown in the following screenshot:

  8. Click on OK. Now, if you notice, the attention icon disappears.
  9. Click on Next. You will again see the Configure Workflow window. Click on the Add to List button to add the workflow for the web project. Once the workflow is added in the panel, you can configure file-based workflows (non-web form generated content). They are configured based on filename pattern matching. In Workflow Settings, note the default regex pattern matches .*. This default means that any asset web form generated, and non-web form generated, will go through this review process. Also, you can add the Web Site Submission workflow multiple times in this wizard. For each instance you can configure a different chain of reviewers for different sections of the websites or types of assets by modifying the regex pattern match in Workflow Settings, for example, .css, .html.

    Please note that the Configure Workflow window can be used for both file and non-web form generated assets. But this window is mainly used for non-web form generated assets.

  10. Click on Finish.

Submitting content to the Staging box

Content can be submitted in two ways.

  • The first option is by using the Edit Web Content Wizard or the Create Web Content Wizard. With this option you can submit only form-based content.
  • The second option is by using the Submit Selected or Submit All option provided under Modified Items. With this option you can submit both form-based assets and non-form based assets.

Using the Edit Web Content wizard

We assume that the web content is already created. So we are going to use the Edit Web Content wizard. Log in as Mark Steven, who is the Content Manger of the Cignex project. Follow these steps to directly submit content to the workflow:

  1. Go to Company Home Web Projects | Cignex|.
  2. Select the Browse Website option to browse all files and folders.

  3. Go to the common/inc folder.
  4. Click on the Edit action placed next to the training.html file.
  5. Click on Next.
  6. The Summary window is opened. It has the functionality to directly submit content to the workflow (this functionality is also available in the Create Web Content Wizard).
  7. Select those checkboxes to submit directly. This saves you from initiating a separate submission process.

  8. Click on Finish.
Alfresco 3 Web Content Management Enterprise Web Content Management made easy and affordable
Published: September 2010
eBook Price: $35.99
Book Price: $59.99
See more
Select your format and quantity:

Read more about this book

(For more resources on Afresco 3, see here.)

Using Submit Items Wizard

Follow these steps to submit all or selected modified content to the workflow:

  1. Go to Company Home Web Projects | Cignex|.
  2. The Submit Selected option is provided under Modified Items of My Sandbox. You can use this option in two cases. The first being, if you want to submit some of the items. For this, you can select the checkboxes placed next to the item to submit the selected item. Second, select the top-most checkbox to select all the files for submission.

  3. The Submit All action can also be used if you want to submit all the items listed under Modified Items.

  4. The Submit option is also provided at the right-hand side of the item to submit only that item.

  5. When the Submit Items wizard is opened, you will notice most of the information is filled. If you want you can modify this. You are required to put information about the workflow name and the description that will display the name and description of the corresponding snapshot in staging. Configure the workflow if you want to modify some details. By doing this the default file workflow is overridden for this specific workflow instance. You can also configure the launch and expiration dates. When a launch date is set, approved content changes are maintained in their own separate workflow sandbox until the specified time and date. Prior to that date, the Content Publisher or Reviewers can preview the future state of the website and immediately promote or cancel the pending launch. Specific expiration dates can also be set on a global or asset-by-asset basis. Upon expiration, users are automatically assigned the asset as a task, so that they can make a determination whether the asset should be updated or removed from the site. Put the details as shown in the following screenshot:

  6. Click on OK to start the workflow process. The content will start submitting to the Content Reviewer. Once in a workflow, assets cannot be submitted again until the workflow completes. Files in a current workflow will not have the Submit, Update, and Revert commands available.
  7. Log in as Keenan Hall and Crawford Caton who are the Content Reviewers. Click on the My Alfresco menu link in the toolbar to view your personal dashboard. The My Tasks To Do dashboard lists all your tasks. You can choose to Manage or Reassign the task. Assume you have logged in as Crawford Caton.

    As we have selected Parallel as a review type, both the users will be able to see the task in their My Tasks To Do dashboard. Any one of the users can approve or reject the task. If one of the users rejects the task, it will go back to the user who has initiated the content submission. The user can decide whether to resubmit or cancel the task.

  8. For various business reasons you can reassign the task by clicking on the Reassign button.

  9. Once you click on the Reassign button, you will see the Reassign Task window as shown in the following screenshot. You can search for the users and reassign the task to an appropriate user.

  10. You can manage the task by clicking on the Manage button.

  11. Once you click on the Manage button you will see the Manage Task window as shown in the following screenshot. You can Update, Edit, Preview, and Revert the items. You can see the workflow history, input comments, and see the change of set attached to this task:

  12. On clicking the View Detail icon you will see the following screen, using which you can Edit and Update the content if required. Click on Close to go back to the Manage Task window.

  13. To complete the task, click on the Approve or the Reject button as shown in the previous screenshot.
  14. Now log in as Keenan Hall and continue the same steps we have just seen for Crawford Caton. In this case we are going to reject the training:

  15. Log in as Mark who has submitted this content. Note the task on Mark's task list.

  16. Open the task and you will have two options to select; one is Resubmit For Review and the second is Abort Review. If you click on Abort Review, the content will not be submitted to the Staging box and you have to start the procedure of submitting content from scratch (this means the workflow sandbox is deleted, and in the future when you submit the same content, it will create new workflow with a new Advanced Versioning Manager (AVM) store). If you click on Resubmit For Review, you will find again, task for both the users—Keenan Hall and Crawford Caton (this indicates the same AVM store will be in use).

  17. Now we will seek the approval again. Click on Resubmit For Review and you will find the task in both the users' dashlets. Assume that you have logged in as Keenan Hall.

  18. Open the Manage Task dialog and Approve the task. Also, log in as Crawford Canon and Approve the task.

  19. Now log in as Mark. Note the task on the My Task To Do dashlet only for a fraction of seconds (5 seconds). Refresh it after some time; the content is already submitted to the Staging box.

  20. In your user sandbox, expand the Modified Items list. Each content item remains in the Modified Items list until its submission is complete. Refresh the page after some time. In the Staging Sandbox, expand the Recent Snapshots list to view the snapshot you have created.

A few things to be considered when an item is attached to a workflow:

  • Assets attached to a workflow cannot be submitted to another workflow while the first one is running.
  • If you have to rename, delete, or modify any asset items, then those items are also going to submit.
  • XML and generated renditions are always placed in workflow as a unit. If you submit any XML item, then all the items related to that XML will also be submitted.
  • Each workflow creates "AVM" (it creates a branch till it is closed). Hence, having more and more active instances will degrade the performance. In AVM store, it keeps the entire content of user's sandbox. One should not keep pending workflows for a long time. Whenever a Content Reviewer receives the notification of a successful approval, the task appears in the task list. Close the task as soon as possible. After clicking, the AVM store of that workflow instance will be removed.
  • Any change set associated with a workflow is isolated in its own workflow sandbox. Workflow sandboxes are visible via CIFS, but difficult to use due to autogenerated folder names (GUIDs).
  • Content Contributors can continue to work in their sandbox without breaking the Reviewer's context.
  • Content Reviewers can see an in-context preview of the change set as if it had been applied to the Staging Sandbox.

Dynamically changing workflow for each snapshot submission

Whenever you submit content to the Staging Sandbox, once approved, a snapshot is automatically taken of the Staging to provide an archive of the current version of the site. This snapshot is maintained over time to provide an audit trail and rollback point for previous versions of the site. This gives an advantage of recovering any content at any point of time. It also keeps record of all deleted, renamed, and moved items. Once a snapshot is taken, all committed changes are immediately reflected and available to each user in their own sandbox, enabling all users to consistently check their changes against the latest and greatest version of the website.

Summary

Workflows are an important aspect in Alfresco WCM. Alfresco web project uses workflows to support any set of changes, either automated or user-driven steps, in a business process before final commit to the Staging Sandbox. In this article we have learned the following points:

  • Workflow can be configured for a web form and web project.
  • Whenever content is submitted, a snapshot is automatically taken of staging to provide an archive of the current version of the site.

Further resources on this subject:


Alfresco 3 Web Content Management Enterprise Web Content Management made easy and affordable
Published: September 2010
eBook Price: $35.99
Book Price: $59.99
See more
Select your format and quantity:

About the Author :


Amita Bhandari

Amita Bhandari is a senior consultant at CIGNEX. As a senior developer, she has rolled out numerous Alfresco deployments world-wide. She has extensive experience in implementing Enterprise Web Applications using J2EE technologies such as JSP, Servlets, Spring, Hibernate, Web Services, Web Scripts and MVC Frameworks.

She has worked with clients in media and gaming, healthcare and e-governance. She trained many students in Java and advanced Java technologies. She holds a Masters in Computer Applications from Rajasthan University, India.

Books From Packt

Alfresco 3 Web Services
Alfresco 3 Web Services

Alfresco Developer Guide
Alfresco Developer Guide

Alfresco 3 Enterprise Content Management Implementation
Alfresco 3 Enterprise Content Management Implementation

Drupal 7
Drupal 7

Plone 3 Multimedia
Plone 3 Multimedia

Drupal 6 Panels Cookbook
Drupal 6 Panels Cookbook

Moodle 2.0 First Look
Moodle 2.0 First Look

CMS Made Simple 1.6: Beginner's Guide
CMS Made Simple 1.6: Beginner's Guide

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software