Using beCPG and Alfresco to create advanced PLM applications
Introduction
What’s a PLM and what is it for ?
Wikipédia
“In industry, product lifecycle management (PLM) is the process of managing the entire lifecycle of a product from inception, through engineering design and manufacture, to service and disposal of manufactured products.[1] PLM integrates people, data, processes and business systems and provides a product information backbone for companies and their extended enterprise.”
In other terms PLM will help to manage product during is entire lifecycle from its conception, through design and manufacture, to service and disposal.
PLM often associate:
- Document Management
- BPMN Process
- Project Management
As the primary goal of PLM was industry application, it has been extended to several sectors including :
- Aerospace & Defense
- Automotive
- Consumer Goods
- Education
- Energy
- Financial
- Food & Beverage
- Government
- Healthcare
- High Tech Electronics
- Industrial
- Medical Devices
- Pharmaceutical
Why Alfresco Platform ?
Wikipédia
“Alfresco is a free/libre enterprise content management system for Microsoft Windows and Unix-like operating systems”
Alfresco ECM was a good starting point for creating a PLM platform. It was providing :
- Out-of-box powerful document management
- BPMN Process integration with Activiti
- Modern Web Interface
- Wide user community
- Content repository for storing product metadata
And much more : http://www.alfresco.com
And beCPG ?
beCPG is an Open-Platform providing missing modules to Alfresco for building PLM applications.
It comes with 3 major flavours :
- PLM
- Project Management
- Reporting and BI
One of the first application build on this platform was "beCPG for foods" suite. beCPG for foods is a complete PLM application for Food & Beverage. It’s a ready to use application with specifics modules for those sector, including :
- Product repository
- Formula and recipe management
- Product data sheets generation and reporting
- regulatory management
- Quality management
beCPG also provides a large set of interesting technical tools that can be used standalone for achieving special client requirements. Some of them are:
- Product datalists and configuration
- ORM Framework
- QueryBuilder
- Custom form controls
- Model designer
- Field base permissions
- …
In the rest of this tutorial we will present those modules and components.
beCPG PLM Core features
Model
beCPG PLM Module is the core of the application, it allows to manage products. In beCPG vocabulary, a product is called an "entity". An entity is represented by an Alfresco Model and should inherit from the beCPG super type "entityV2".
Here is our first PLM Model:
As you will see later, it is possible to create this model using the beCPG Model designer. Once you have created and deployed an entity, the beCPG engine will consider it as a PLM Product and manage its Lifecycle.
Let’s see what you can do with a product.
You can create your new entity using the create Menu.
Then you will be redirect to the entity view.
You may notice that entity view is not the same than a standard document view. Entity or product view is more focused on entity metadata and add several custom actions. You also can add custom image to your entity by clicking on the Logo image.
You can see your new entity in the recent beCPG Menu.
As always in PLM, your product is associated with documents and data lists. In right top corner, you have navigation links to this. Entity is showed as a folder under the Alfresco document library, to navigate to its content go to the tree or click on the ”Documents” link. You will then access to a standard Alfresco folder where you can add the technical documentation of your product. It is important to understand that entity and its associated documents and datalists are a whole. When we will talk about versioning, you will see that everything is versioned under the entity.
Here is the documents view:
From this view you can navigate to data lists or go back to entity details.
Let’s now talk about data lists. Data lists is the main part of the PLM entity.
Data list are used to link multiple information to your product. The more common usage of dataList is to represent the composition of the product, but it can has several other usage as task list or related documents lists and so on ...
In our example of nuclear plant, entity is created with a hierarchical datalist in order to represent the different parts of the plant. Each part is also an entity with a datalist for components.
To add the datalist feature to your entity, you should add the aspect bcpg:entityListsAspect as mandatory to your Alfresco entity type. Aspect is like a new feature of your PLM entity. They are widely used under beCPG.
A dataList is represented by an Alfresco Model and should inherit from the beCPG super type "bcpg:entityListItem". To make it hierarchical, we use the aspect “bcpg:depthLevelAspect”.
The model should look like this:
Once the model is deployed, you can add this datalist to your your entity. In fact you cannot add it directly, each entity uses an entityTemplate to define its structure and folders hierarchy. To create this template, create a new entity and add the aspect “Entity template”, go to datalists and add your datalists, then return to your first entity and datalists will be automatically added. You can store your template under “Repository/System/Entity templates” (or via beCPG Admin, System folders).
And start adding new-item (Form creation is explain under “Using the designer to create your PLM Model“).
As you can see, you can easily modelize your data model with beCPG. Once your entity is ready to use, you can benefit of all the beCPG components arounds entity.
- Versioning with branch
- Entity reports view
- Bulk edit of entities
- Import/export of entities
- Remote access to entities
- Change Order with version control
- BI analysis
- Custom datalist views
- Entity formulation
- Version sensitive datalists
Where Used?
Where used is a nice PLM feature that is automatically accessible to your entities. You can use it from the search (Only EE):
Or directly from you entity actions
Where used page allows to add more entities, select the association on which the where used is applied and change the operator when several entities are selected.
For exemple : “Give me all parts that are used in “planPartList” and in Plant 1 OR Plant 2”
You can export “where used” results
Another interesting feature is to add a “Where used datalist”. To do so, you should add to your “plant template” a datalist which names is WUsed_splm_plantPartRef and of type splm:plantPartList using the new list button.
System will automatically generate corresponding Where Used List in your datalists
Using the designer to create your PLM Model
You can create your model from scratch using the designer but it's faster to start from an existing xml file. Create a file with this content and add it under “Repository/Data dictionary/models”. Change the name of your model since it should be unique.
<model xmlns="http://www.alfresco.org/model/dictionary/1.0" name="splm:splmmodel">
<imports>
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
<import uri="http://www.bcpg.fr/model/becpg/1.0" prefix="bcpg" />
</imports>
<namespaces>
<namespace uri="http://www.bcpg.fr/model/plm/sample/1.0" prefix="splm" />
</namespaces>
</model>
Then, go to Menu->beCPG->Model Designer you should see your model
Using the new item button, create your model tree and add your nuclear plant properties and datalists.
Once your model is ready you can publish it. We need now to create associated forms. Go to “Repository/Data dictionary/configurations” and create a new empty xml file. You should see it in the designer form menu.
Drag your type under the form config, designer will automatically create corresponding forms.
To customize the UI you should create several forms with several ids, form of kinds “model-type” are forms without associated nodes and forms of kinds “node-type” are for editing existing nodes. You have the following combinaison :
entity :
model-type
- default (creation form)
- search (search form)
- bulk-edit (list of field in bulk-edit)
node-type
- default (edition form)
datalist :
model-type
- default (creation form)
- filter (filter form)
- datagrid (datagrid column)
node-type
- default (edition form)
We will focus on the plant part datalists. In order to make it multi-level we must add the “bcpg:depthLevelAspect”. We should add in the form the “bcpg:parent” fields to allow to choose parent and the field “bcpg:depthLevel” in the filter form, to filter by model. To choose, a part we will use the becpg autocomplete control. Just drag the control to the plantPartRef fields. Delete all parameters as they are not required in that case.
Publish the forms by clicking the toolbar button.
Using the PLM API
TODO.
Creating your first PLM AMP
TODO.