Follow sidelabs on Twitter

Documentation:User:FormWorkflow

From SIDE-Labs.org

Contents

Introduction

This chapter is intended as a reference for those working with SIDE to define paperless procedure. It is intended to explain the common steps to define document dematerialization process.

It is assumed at this point that you have downloaded and installed SIDE on your local machine. If not, please refer to the SIDE Installation Guide instructions.

It is also assumed at this point that you have a fair knowledge of Eclipse environment and SIDE. If not, refer to the tutorials onwww.eclipse.organd the IDE Getting Started Guide.

We propose in the next steps to create a sample procedure based on Alfresco and Chiba. So, it is assumed that you have downloaded and installed Alfresco on your local machine. If not, please refer to the SIDE Installation Guide instructions.


MODELIZATION

A paperless procedure is defined as a group of four models in SIDE environment : workflow model, data model, workflow's form model and data's form model. This document explains how to define these and how to create links between each other.


Workflow model

The first artifact to define is the workflow model. It is the core element of the procedure. In this example, we define an holiday request procedure. The first task, corresponding to the start state, is the creation of holiday request by the employee. In this example, the actor "employee" corresponds to an user group called "employee" on Alfresco. Next, the employee can submit its request. The actor "chief", corresponding to an user group called "chief", can ask more informations (with the transition "completeRequest") or submit to acceptance (with the transition "submitToAcceptance"). If a chief has ask more informations, the employee adds more information and re-submit its request. Finally, a chief can accept or reject the request following one of two available transitions : "accept" or "reject".

In the case of paperless procedure, it is mandatory to attach a type (corresponding to the data model) to the workflow. To make it, you can load resource on the view "Outline" and link the process to a type by the association "Content type".


Figure 2.1. Workflow model

10000000000001A30000018EB5B8C7BF.png


Data model

A paperless procedure is already linked to data stored on Alfresco. On each step of the workflow, a user can fill a subset of data. At the end of the workflow, all the document will be filled. In this example, the data model is really simple. It is composed of two classes. An holiday request is composed of the requester's name, the start date and the number of days. Each holiday request is composed of a set of holiday request in the case of a chief ask more informations.


Figure 2.2. Data model

1000000000000183000001234F8540B2.png


Workflow's form model

For each workflow's step, you must define a form. To initialize the workflow's form model, you can click on the contextual menu of workflow model:

SIDE > Initialize form model

On this example, the form model looks like to the illustration 3. An important step is the link between workflow's form model and data's form model. Each workflow's form can be linked to data's form. So, when the user opens the form corresponding to a task, he can fill informations stored by the workflow and informations stored by the document.


Figure 2.3. Workflow's form model

10000000000001B100000116C283664B.png


Data's form model

A form model can be defined for each workflow's step. By example, when the employee creates an holiday request, he can fill his name, the start date and the number of days and that's all. When the chief review the request, these informations are on read-only mode. They can't be changed after the beginning.


Figure 2.4. Data's form model

10000000000001B50000015865D5A628.png


Generation AND DEPLoyment

Platform's preparation

It is assumed that you have already installed Alfresco on your local machine. You must install Chiba before generation and deployment. You can download an improved version of Chiba and install it in the folder "webapps" of tomcat http://www.side-labs.org/SIDE-Labs/2.0/ext/. It is recommended to rename this file with the name "xforms.war".

Application model

Now, we must define an application model referencing all previous models. In the first tab, we add all models : workflow model, data model, workflow's form model and data's form model. In the generation tab, we check :

  • Workflow generator (SIDE Workflow Generator for Alfresco) : it generates all files needed by Alfresco to define a workflow (jPDL file, workflow's Alfresco model...)
  • Data generator (SIDE Content Model Generator for Alfresco) : it generates all files needed by Alfresco to define a data model. In this generator, you must check the option called "Alfresco Common Webscripts". It is a set of webscripts provided by SIDE to interact with Alfresco externally.
  • Form generator (SIDE Chiba Form Generator for Alfresco) : it generates all files needed by Chiba to define forms.

In the deployment tab, you must check the deployer "SIDE xForm Direct Deployer" to integrate all generated forms to Chiba and the deployer "SIDE Alfresco Direct Deployer" to configure correctly Alfresco.


Test

After the generation and the deployment, you can test your paperless procedure with this URL :

http://<HOST>:<PORT>/xforms/demo/