Documentation:User:GettingStarted:WorkflowForm
From SIDE-Labs.org
Contents |
workflow form collection
Usually, ECM application requires to use dematerialized forms to add content type description included in a process, as a workflow to approve documents integration for example.
The following paragraphs give for beginners a basic overview of workflow forms collection modeling and generation, and for users more familiar a quick solution for the need at hand. For additional information, refer to the SIDE Form Modeling Guide.
Model Creation
The NewSideProject has already been created with the data model, so continue with it. Right click on your existing 'form' folderOr create your 'form' folder 'File / New / Folder'Folder Name / Click on 'Finish'Let's create a form model: File / New / Other... / SIDE / Side Form Model / Click on Next
Figure 1.1. Form Model
Enter the name of your model, for instance Digitization.workflow, and click on Next. The following window allows to choose the kind of form model you want. This time click on 'Workflow Form Collection': Form Model'Model Object / Choose 'Workflow Form Collection''XML Encoding / Let the 'UTF-8' value'Click on Finish
Figure 1.2. Select Workflow Form Collection Model
The form model has been created under your form folder. Contrary to data and workflow models, here is only one model 'Digitization.workflow.form', looking at a tree, containing all the designed form structure. The 'Digitization.workflow.form' model is automatically opened in the SIDE form modeler. SIDE Modeler Layout
Form and Workflow relationship
Link your current form diagram to your workflow model
First click on 'Workflow Form Collection', and on the Properties pane, set the Name 'Digitization'. Then, Right click on 'Workflow Form Collection Digitization''Choose 'Load ressource...' / Click on 'Browse Workspace''Double click on your 'GTYaMma' project / Select your workflow model 'Digitization.workflowdt'Be careful not to choose 'Digitization.workflowdtdi' which only contains graphical information. Click on 'OK'Your workflow diagram is linked to your form model.
Figure 1.3. Load Resource... on Workflow Model
Synchronize Form model with Workflow diagram
First, 'Click on 'Workflow Form Collection Digitization''Next go on Properties pane'Click on 'Linked process'Choose 'Process Digitization'In a second time, you have to synchronize your workflow form collection with your the workflow model by using 'Synchronize with workflow diagram'. This command allows synchronizing the form elements with the associated workflow models which have been updated. It is useful when an associated workflow model has been updated and the updates must be propagated to the form elements. This command uses a model to model transformation to propagate the updates. Right click on 'Workflow Form Collection Digitization' / Select 'Synchronize with Workflow Diagram'The three main tasks will appear: Digitization_Start, Digitization_ManageMail and Digitization_Approve.
Figure 1.4. Synchronize with Workflow Diagram
Link your Current Form Diagram to your Data Form
To start a workflow from a class form collection, you have to link it to your current workflow form collection. Right click on 'Workflow Form Collection Digitization' Choose 'Load ressource...' / Click on 'Browse Workspace''Double click on your 'GTYaMma' project / Select your data form model 'Digitization.data.form''Click on 'OK'Your data form diagram is linked to your workflow form model.
Figure 1.5. Link Data Form to Workflow Form Collection
Synchronize Current Workflow Form model with Data Form
To instantiate the data form previously bound, you have to synchronize it with your Current form model: Click on each 'FormWorkflow''Go to Properties pane / Click on 'Data Form' / Save your model'Synchronize 'FormWorkflow Digitization_Start with data form 'Document''Synchronize 'FormWorkflow Digitization_ManageMail with data form 'InboxMail''Synchronize 'FormWorkflow Digitization_Approve with data form 'OutboxMail' ''''
Figure 1.6. Synchronize Data Form to Form Workflow
There is also a function called Refresh Outline', which enables to look at the result of the design very quickly.
Right click on 'FormWorkflowDigitizationProcess_Approve' / Choose 'Refresh Outline'
If the window is not automatically opened, click on the 'OutlineHTMLView' located near the Properties Pane.
Figure 1.7. Refresh Outline on Manage Mail
Think to save your model: 'Right click on 'Workflow Form Collection Digitization''Click on 'Validate'When your model is valid, a 'Successfully' window open.
Figure 1.8. Pop Up Successfully
Note that you can design your Workflow Form Collection model by using the 'Presentation' options on the properties pane, but this option is less important than for the data form, because of the simplicity of the Workflow Form Collection which just corresponds to a button.
Activate/Deactivate SIDE Builder
Activate or deactivate the SIDE builder enables to control the dependency between different models. In case of creation, extinction, modification, transfer or another action, the builder traces information, control and indicate dependencies in the 'Problems' pane near the 'Properties' tab. 'Right click on your project 'GTYaMma''Go to SIDE / Click on Activate/Deactivate SIDE builderThe SIDE blue circle icon turns green. A .metadata folder is created. If a problems occurs, a red arrow appears in the Problems pane indicating the resource concerned by the error (for example the .form), the path where to find, and the type of the error, whether this is an SIDE, EMF error. The error occurs only when the models are recorded. This basic workflow form collection model structure three tasks associated to three content types (Document, InboxMail, OutboxMail), each structured in different subcategories of attributes as Digitization and Info grouped around thematic way (time, general information, ).
Application
Creation
Prior to generate the form model, we must create an Application model which will store the description of our application and its components. Right click on models in the Navigation pane and select: New / Other / SIDE / Side Application Model
Figure 1.9. Application model creation
Enter the File name 'Digitization.application' and click on Finish.
The application model 'Digitization.application' is created in your project.
Note that normally, you have ever create a .application model for the generation of your data model. In this case reuse it for the class form collection generation and deployment.
Select this file and
Right click to open the contextual menu'Select the menu item SIDE / Manage Configuration'to start the panel in which you will declare the steps of generation of your application:
Figure 1.10. Application Model Configuration Tab
The application generation configuration is divided in 4 main parts.
Configuration List
The List of configurations allows defining several generation configurations. The first time there is no configuration and you must click on the green circle (with the little white arrow inside) to create the first configuration labeled by default 'New Configuration'. Click on the item representing a white page (with a little pen), to change the name of the configuration: Enter 'Main' in the name of the configuration input view. You may create several configurations all along your project: for instance, after finalizing a functional layer of your application, it is no more necessary to generate and deploy it all the times with the models you are working on.
Configuration 'Models' tab
The 'Models' tab allows to declare the models you want to generate on the targeted frameworks.Click on 'Add Models' and select 'Digitization.dt', 'Digitization.data.form' and 'Digitization.workflow.form' under 'myProject/src/models/data' or 'myProject/src/models/form'. You can add as many models as you need for your application.
Configuration Generation tab
The 'Generation' tab allows selecting the generators you want to use on top of the models you declare in the 'Models' tab : the selected generators produce the artifacts on specific frameworks they are associated to.This pane proposes, in the upper part, common options to set up:
- 'Log path' must be set up to indicate where to store the log of the generations; enter /GTYaMma/build/logs.
- 'Generation path' must be set up to indicate where to store the result of the generations; enter /GTYaMma/build/generated.
- Click on 'Sans Validation' [Skip validation] if you do not want to perform model validation before generation. Model validation is by default automatically performed to avoid generating on incorrect or inconsistent models. But, if you are sure that your models are valid (use 'Validate' to perform a direct validation), select this option.
- Click on 'Documentation generation' if you want to generate the documentation associated to your models. This feature will generate an .odt file that you can find under
GTYaMma / build / logs / Main(name of your configuration) / doc / Digitization-dt.odt
- Click on 'Documentation generation' if you want to generate the documentation associated to your models. This feature will generate an .odt file that you can find under
GTYaMma / build / logs / Main(name of your configuration) / doc / Digitization-dt.odt It proposes, in the lower part, a structured tree where each branch is conforming to the following schema:
- The first level indicates the type of metamodel.
Note that if you select a meta-model but you do not have declared under the models tab at least a model conform to this metamodel, obviously no generation will be performed. - The second level indicates the targeted technology: this is the kind of framework on which a part or all the application must be deployed. For instance, 'Alfresco' is a technology.
- The third level indicates the version of the targeted technology.
- The fourth level indicates the generator to use: it may exist several generators for a metamodel, a framework and a release.
- The fifth level gives the generation options.
Click on the label of each level to have description in the upper right part of the window.
Figure 1.11. Application Generation Configuration Tab
To select a particular generator to apply on your models, first click on the circle checkbox of the metamodel first level, then on the technology second level, then on the version third level and then on the generator. First click on: KSR500 Data / Alfresco / Alfresco 3.x Labs and Enterprise / SIDE Content Model Generator for AlfrescoThen select the options of the generator. Click on (if not automatically tick): Alfresco Share ExtensionSome parameters of the generator must be set up on the right lower table of the window. For instance, for the SIDE Alfresco Content Model Generator it is necessary to set up the Module Version if you want to keep an historic of the generated artifacts. Click on: Save [Enregistrer]to save the generation configuration. Next click on: KSR400 Form / Xforms / Chiba 1.5.x / SIDE Chiba Form Generator for AlfrescoSome parameters of the generator must be set up on the right lower table of the window. Set the 'Webapp adress' with 'http://localhost:8080/xforms'. Click on: Save [Enregistrer]to save the generation configuration.
Configuration Deployer tab
The 'Deployer' tab contains a single tree similar to the generation one but without the first metamodel level. The purpose of the deployer tree is to select installed framework instance to install generated artifacts on them. Let's suppose that you follow the SIDE Installation guide and that you installed Alfresco 3.2 Enterprise. In the deployment tree, you can select: Alfresco / Alfresco 3.x Labs and Enterprise / SIDE Content Model Generator for Alfrescoto indicate that you want to deploy the generated artifacts on this special instance of Alfresco: in this case, all the models which have been generated using generators on the technology 'Alfresco' and the release '3.x' will be deployed on this Alfresco instance through the SIDE Alfresco deployer. SIDE is now compatible with Alfresco 3.2R2.
Figure 1.12. Application Configuration Deployer Tab
It is important to note that deployers are independent of meta-model; for instance, the SIDE Alfresco Deployer will deploy on the same Alfresco instance artifacts generated with a Data model and a Workflow model. Deployers are based on the deployment technique of the targeted framework. The SIDE Alfresco Deployer uses AMP Alfresco Module Package and WAR files to deploy the generated artifacts on Alfresco instance. On selection of a deployer, you usually have to set up some parameters which indicate where is installed the framework instance: for instance, for the 'SIDE Alfresco deployer'. If you previously install Alfresco on your machine, you can set up the Tomcat Installation directory to point on the 'tomcat' directory of Alfresco, for example C:\Alfresco\tomcat You need to stop Alfresco before running the generation & deployment to avoid conflicts during deployment. In the deployment tree, then select: Xforms / Chiba 1.5x / SIDE Chiba X-Forms Direct Deployer / CleanOn selection of a deployer, you usually have to set up some parameters which indicate where is installed the framework instance: for instance, for the 'SIDE Chiba X-Forms Direct Deployer', the 'Webapp context' is 'xforms'. You have to retrieve the webapp Xform and the message.properties file on the update-site http://www.side-labs.org/SIDE-Labs/2.0/ext/'Copy the xforms.war file'Paste it under in Alfresco directory / under Tomcat / webappsThe file will be deployed after SIDE Deployment.
Form structure generation & deployment
At this point we can launch the generation of our 'Digitization.dt' and 'Digitization.data.form' model. Click on 'Launch' Note: you can also launch the generation of one specific application configuration directly by right clicking the application model file and selecting 'Launch Generation':
Figure 1.13. Quick launch of generation
A generation window is opened and displayed the generation steps. At the end of the generation, it indicates if the generation is complete with or without errors: In case, there is error, errors are listed in the window and in the log files (one per generator) under the log paths. In case of no errors, the generation path will contain all the generated artifacts. Moreover, the 'side_report.xml' page has been generated in the logs path and gives information on the generation process. You can load this page directly in a browser:
- 'Stats' gives a consolidated view of the generation for all the generators and deployers and per generator and deployer.
- 'Generators' gives a detailed view of the generated artifacts per generator: you have access through this view to all the generated artifacts.
- 'Deployers' gives a detailed view of the deployed package per deployer: you have access through this view to the package the deployer has deployed on the targeted frameworks. These packages may be deployed on other instances of the framework on other machines.
- 'Documentation' gives access to the generated documentation for all the models declared in the application configuration.
- 'Services' gives entry points to load per generator all the services which have been generated and deployed on the targeted framework instances.
- 'Console' is an exact copy of the logs displayed in the generation console.
Figure 1.14. SIDE : MDA report procedure
In order to check that the new forms have been created, connect to Chibahttp://localhost:8080/xforms Click on Go / form / OutboxMail / click on tab 'info' and 'Digitization'
Figure 1.15. List of Workflow Forms Collection Available
Figure 1.16. Start Workflow Form
Figure 1.17. ManageMail Workflow Form











