Borort

The sky’s the limit…

ArchGenXML /UML and Plone – How To

with 6 comments

ArchGenXML is a code-generator for CMF/Plone applications (Products) based on the Archetypes framework. It parses UML models in XMI-Format (.xmi, .zargo, .zuml), created with applications such as ArgoUML, Poseidon or ObjectDomain.

What is Archetypes?
Framework for developing Plone products
- Automatically creates view and edit pages
- Maintains unique object IDs
- Creates references between objects

Archetypes framework
Field validation
- Standard security setup
- Alternate storage options
- Data transformation capabilities

How to..(in Windows XP)

Before installing AGX, we need to have Plone install (Here my Plone version is 3.1.1).

Step 1: Download ArchGenXML from Plone website (Plone.org). The latest version of Plone requires the latest version of ArchGenXML which is available on SVN (Sub Version Control) repository: https://svn.plone.org/svn/archetypes/ArchGenXML/trunk/

Since i use the latest version of Plone so I need to download SGX from the SVN.

Step 2: Install SVN in order to download the repository. (http://tortoisesvn.net/downloads).

Step 3: Create a folder name “archGenXML” (in order to be easy to work with this i create it in C)

Step 4: Right Click on “archGenXML” folder > Click “SVN Checkout”. Enter the URL of SVN repository “https://svn.plone.org/svn/archetypes/ArchGenXML/trunk/” in URL of reposity field > Click OK. All the repository file and folder will be copied to your archGenXML folder.

Alternatively you can use command: svn co https://svn.plone.org/svn/archetypes/ArchGenXML/trunk/  from the command prompt to checkout the repository.

Step 5: Set up Path to “C:\Program Files\Plone 3\Python” and “C:\Program Files\Plone 3\Python\Scripts“ in PATH environment variable

Step 6: Go to command prompt: C:\archGenXML>python setup.py install

Step 7: Type: C:\>easy_install archgenxml

Step 8: Create a file name: .agx_zope_path (create this file using command prompt) in C:\archGenXML\src\archgenxml. Put one single line: “C:/Program Files/Plone 3/Zope/lib/Python” into the file.

Step 9: Install UML software. Here I use ArgoUML (http://argouml.tigris.org/)

Step 10: Create a simple UML model. 

Example: Make a new UML model and give it a name HelloWorld . Choose the tool for class creation and add a class to the diagram. Give it a name such as “HelloType” and add an attribute HelloText with type String.

Step 11: Save/export your model as an XMI file with the name MyFirstExample.xmi (You may save this file in drive C). Then go to the command line and execute: C:\>archgenxml MyFirstExample.xmi

ArchGenXML will begin code generation. When it completes, you will have a new folder HelloWorld on your file system

Step 12: Move the HelloWorld folder to: C:\Program Files\Plone 3\Data\Products. Restart Zope server and open Plone in a browser and log in as Admin. Choose Site Setup from the personal bar and choose Add-on Products. A new product HelloWorld should now appear in the list of products available for install. Choose it and click install. Go to your personal folder. In the list of addable items you’ll find the new product as an addable content type. Add a test instance to see if it works.

If you still have any problem please let me know.. ;)

Reference:
http://plone.org/documentation/manual/archgenxml2
http://www.jazkarta.com/presentations/ArchGenXML-UML-talk.pdf

Written by borort

June 1, 2008 at 2:55 pm

Posted in CMS, Plone, Research

6 Responses

Subscribe to comments with RSS.

  1. It is possible to make Plone3 style product with archgenXML ?
    Or just make migration from XXXX to Produc.XXXX

    Saka

    June 24, 2008 at 3:28 pm

  2. I haven’t tested that yet.. so m not so sure about it..

    borort

    June 25, 2008 at 7:39 am

  3. I’m made Plone 3 style products with it. You just need the latest version of AGX

    Andre

    July 15, 2008 at 5:39 pm

  4. Hi,

    After installing the ArchGenXML, the plone sites stopped working…any ideas?

    Thanks,
    Sonu

    sonu

    April 3, 2009 at 2:46 am

  5. I am getting the following error when do the Step 7: Type: C:\>easy_install archgenxml

    C:\>easy_install archgenxml

    error: Setup script exited with error: Python was built with Visual Studio

    extensions must be built with a compiler than can generate compatible bina
    Visual Studio 2003 was not found on this system. If you have Cygwin instal
    you can try compiling with MingW32, by passing “-c mingw32″ to setup.py.

    karthik poobalu

    June 8, 2009 at 6:55 am


Leave a Reply