Friday, February 27, 2015

How to deploy a custom model into Alfresco Enterprise

How to deploy a custom model into Alfresco Enterprise

The below method is very useful during the alfresco development and not suggested for the production.
If you want to use it for the production, use an AMP to deploy package into alfresco war and use the 
dictionaryModelBootstrap bean to load the custom model.

* Upload the student.xml model file into Data Dictionary\Models folder in the Repository folder.

* If you look at the Is Active status, it is false.

* To make the model active, follow the below steps.

* Launch the Alfresco Enterprise Admin Console (http://IP:Port/alfresco/service/enterprise/admin/admin-systemsummary)

* Click Model and Message Console under Consoles option.

* Type the following command and execute it.
activate model student.xml

* Once it is successfully loaded, you can get the following message.
Model activated: student.xml [null]

* To verify the installed model,  type the below command and execute it.
show models

Result should be:

IsLoaded: Y , RepoVersion: 1.0 , RepoName: student.xml , ModelQName: {codingFreaks.student}studentModel , Description: Student Custom Model , Author: Muralidharan Deenathayalan , Published: null , Version: 1.0

/* Strudent model */

<?xml version="1.0" encoding="UTF-8"?>

<!-- Simple Student Customer Model -->

<model name="student:studentModel" xmlns="">
   <description>Student Custom Model</description>
   <author>Muralidharan Deenathayalan</author>

      <import uri=""
         prefix="d" />
      <import uri="" prefix="sys" />
      <import uri="" prefix="cm" />
      <import uri="" prefix="st" />      
      <import uri="" prefix="dl" />

      <namespace uri="codingFreaks.student" prefix="student" />
      <type name="student:studentFolder">
         <title>Student Folder Container</title>
            <property name="student:StudentID">
               <title>Student Id</title>
            <property name="student:firstName">
               <title>First Name</title>
            <property name="student:lastName">
               <title>Last Name</title>
            <property name="student:email">
               <title>Email </title>

No comments:

Post a Comment