Project: Compiere Monitor

Oliver
2006-09-05
2013-05-02
  • Oliver

    Oliver - 2006-09-05

    Hey there,

    as some of you already might already know i wrote a master thesis which dealt about Compiere. In particular i aimed for an increased adaptability of Compiere. Adaptability hereby means many different things which together bring more flexibility to the customer. A self-organising and -configuring ERP-system is the desired system of the term adaptability. (defined by a faculty where i work at: www.erp-research.de )

    Within my thesis i used aspectoriented programming to improve this adaptability (ObjectTeams/Java, developed at the Technical University Berlin - where the thesis was written at). In particular my aspects aims for monitoring which are a musthave for further developments in the way of adaptable ERP-Systems. The tool is called Compiere Monitor.

    I implemented several autogenerated-aspects which implements the monitoring-functionality. These are also configurable so in the end you dont need to implement aspects by yourself. But you can. The Compiere Monitor is able to handle any aspects.

    The aspects are stored within the very same database like is setted for Compiere. No setup is needed if you already installed Compiere. Tables etc will get created automatically. (Only Oracle supported yet)

    Ahm i dont want to make it too long now ;) I just wanted to invite you all to take a look. I created a project for this even i dont know how much time i'll have in the future to improve something. And in the end there is nothing to improve if no one is using it ;)

    Well here's the project-site:
    http://sourceforge.net/projects/compieremonitor

    The project contains the full source-code and the ready-to-run files as well.

    With the abilities of AOP you're allowed to add functionalities to Compiere without changing the source-code. This allows you to follow the evolutionsteps of the official compiere-releases even if you individualized your Compiere. The Compiere Monitor helps you to manage all aspects centrally. Every Compiere-Client will get the newest aspects within its start-procedure. No single update of every Client needed.

    Oh ok..i start again to write and write. Yeah there's much to tell but i dont want to make it this long.

    And finally i also uploaded my thesis within the project-site. This will help the most but is in german - so don't hesitate to ask if any question occurs.

    kind regards,
    oliver

     
    • Oliver

      Oliver - 2006-09-05

      Ah maybe its helpfull to describe some usecases..the Compiere Monitor allows you to:

      - monitor the user behaviour within a workflow. Does a user follow the steps of a workflow or does he leave the suggested steps. This supports the adjusting and optimizing of workflows.

      - Defining success-criterias of a workflow-node, i.e. the user must create a new business partner, enter a name and save the new entry within the business partner window of a workflow. According to the taken user-actions, the node will get marked as successfull or failed within the window (green and red border of the WFNode-Icon) and his logging-entry. This allows to analyse the fulfilling of each wfnode and their workflows.

      All these aren't influence the Compiere-behaviour directly. They actually just allow to follow the user-behaviour and react on the collected data like adjusting workflows etc. Further implementations may take actions while the client is running.

      ok...that might give a better idea what its all about.

      oliver

       
      • Trifon (An ADempiere founder)

        Hi Oliver,

        Thank's for shareing your work with compiere community.

        I wanted to ask you if could describe more?

        More uses cases?

        Kind regards,
        Trifon

         
        • DigitalArmour

          DigitalArmour - 2006-09-05

          And just in case you have an English version of yr thesis :-), are you able to share that please?
          Rgds
          Mani

           
          • Oliver

            Oliver - 2006-09-05

            Hey,

            no. Sorry...I just wrote it in german. Any particular question ?

            greets,
            oliver

             
        • Oliver

          Oliver - 2006-09-05

          Hey trifon...

          you read my second reply already ? With the 2 use cases ?!

          And i can describe more for sure - you mean technical stuff ? Will do that later - have to go to bed now ;)

          later,
          oliver

           
          • Trifon (An ADempiere founder)

            Hi Oliver,

            >you read my second reply already ? With the 2 use cases ?!

            Yes.

            I see that you have implemented someting similar to Compiere model. I read Table class and CompiereTable class.

            Can please please describe what is your idea behind this?

            Kind regards,
            Trifon

             
            • Trifon (An ADempiere founder)

              Hi Oliver,

              For me it looks that you have implemented big part of Compiere model GOOD work.

              I'm looking at MCompiereClient class. I suppose that this class represents records in table AD_Client. It should be similar to MClient in Compiere.

              But here i see more code compared to code in Compiere class.

              /**
              * Gets the description of a compiere-client
              * @param clientPKey The PKey of the client
              * @return The description of the client
              * @throws CMExceptionTable If an error occured
              */
              public static String getDescription(int clientPKey) throws CMExceptionTable{
              try {
                  return getDescription(getTable().getRow(clientPKey));
              } catch (CMExceptionTable e) {
                  e.addContextInfo("Unable to get description of Compiere-client <"+clientPKey+">.");
                  throw e;
              }
              }

              Is this class autogenerated or manualy writen?

              Kind regards,
              Trifon

               
              • Oliver

                Oliver - 2006-09-06

                Hey trifon,

                ahm no, i didn't copied anything from Compiere. Just my structure is similar in some way and my naming-style. I guess thats why you expect the original classes. But you shouldn't. I wrote all by myself and by hand. Nothing of these are autogenerated as the methods of the meta-classes can become very complex and goes beyond the plain auto-generated getter-methods of the Compiere M-classes.

                greets,
                oliver

                 
            • Oliver

              Oliver - 2006-09-06

              Morning trifon,

              well yeah thats right. The idea of handling the tables is comparable to the Compiere-models.

              Each table got ONE Table-subclass. This class contains all relevant informations about the represented tables and implements some abstract methods from the table-class. These dealing with the plain storage and access to the tabledata. Other then Compiere im storing all loaded data locally within the memory. So no sql-queries will get executed from table-classes once the datas are loaded and you only use the loaded data.

              Each of these table-classes have ONE meta-class. The namings of the tables are, for easier understanding by all Compiere-developers, similar to compiere too. So the Meta-class is named "M<table>". This class holds all methods that goes above the plain column/row-access.

              Take a look at the graphic of page 116 of my master-thesis. It shows the above context. Maybe also take a look at the other images of that chapter. They will help to understand the implementation of the key-elements of the Compiere Monitor.

              And then you mentioned the classes like CompiereTable. These are another abstract subclasses of Table and are only meant for the destinguish of the different kind of tables. Not that the tables are structurally different - but they are from the point of their usage. Here's the list:

              CompiereTable - all tables which belong to Compiere (i.e. AD_USER...), these are all read-only

              TableAspect - The tables which holds the data of the ObjectTeams/Java-objects

              TableCompiereAspect - The tables for all data which belongs to the Compiere-Aspects. These includes all Compiere-logging-data and the aspect-configurator-settings

              TableConfig - All tables which holds the general data which might get referenced from different other types of tables. These stores things like the visibility-entries of methods (private, protected, public)

              well i hope the datalayer becomes clearer now. Too bad my thesis isn't in english - it describes all more detailed.

              greets,
              oliver

               
    • Oliver

      Oliver - 2006-09-06

      Hey,

      i forgot to give you the site of ObjectTeams. Its: www.objectteams.org

      There you can get an overview of the concepts of this AOP-model of ObjectTeams and its implementation within ObjectTeams/Java. Its a musthave to understand the aspects of the Compiere Monitor. So unless you only want to use the default-aspects you should get an overview over ObjectTeams in order to program aspects by yourself. If not the aspect-configurators of the Compiere Monitor will help you to adjust the logged Compiere-items.

      Oh and if you got questions you also can reach me directly at ICQ: 14413686

      greets,
      oliver

       
      • Trifon (An ADempiere founder)

        Hi Oliver,

        Thank you very much for detailed description.

        Thak's for the ICQ, i added you in my list. I preffer to ask you in the forum questions related to open source projects.

        AS far as i understand from my small research i made last night, you load some of Compiere tables in memory when Compiere Monitor is started. By this way you have information which row/column is changed and you show this information to the user. Is it correct?
        So if someone would like to monitor tables which ado not have Mxxx class will need to write? Or add new column to existing table will have to modify CompiereMonitor Mxxx class, is this correct?

        Kind regards,
        Trifon

         
        • Oliver

          Oliver - 2006-09-06

          Hey trifon,

          ahm no. You get me wrong. The Compiere Monitor doesnt monitor tables. He monitoring useractions and within these he's able to log datachnanges - but not by watching changes within a table. He recognizes userchanges on the graphical datafields like a TextField or JComboBox.

          The Compiere-tables are only neccessary to bring the logged data into a Compiere-context. I.e. every log-entry belongs to a specific CM-log-session. And every of these log-sessions belongs to a specific Compiere-User/Client/Org/Role.

          So in the end the Compiere-Tables are more for context-data. The Compiere Monitor doesnt monitor now edit them.

          greets.
          oliver

           
    • Colin Rooney

      Colin Rooney - 2006-09-06

      very interesting Oliver!
      I will practise my German and try reading your thesis ... after I done some learning on the AOP link you provided! :-)
      I does sound very intriguing though... does the Monitor require any specific version of Compiere or it that irrelevant to it?

      colin

       
      • Oliver

        Oliver - 2006-09-06

        Hey Colin,

        the CM doesn't need any special Compiere-release. I ran it with 2.5.2e.

        There was a problem with 2.5.3a and ObjectTeams. The aspectisation of some classes brang error which are added to the bug-list of OT already. Don't know when they will be fixed. It has something todo with the compilation of these classes. But dont ask me for details.

        But in general you can create aspect for every version. The monitor is unbound to compiere - you also can create aspects for any other class which is part of the loaded jar.

        This leads to another very important detail i missed to tell. In order to use the CM you need to load 2 JARs into the CM. Go to Configuration -> JAR-Archives and import the JARs:
        rt.jar   (from your JRE/lib-folder)
        Compiere.jar  (from your Compiere/lib-folder)

        The CM loads all classes, methods etc from these archives and stores them in the DB as well as in a local cache. This process may take some seconds. Afterwards you're able to create aspects for all loaded items. Take a look at this screenshot:
        http://sourceforge.net/project/screenshots.php?group_id=176557&ssid=41520

        it shows the 2 loaded jars.

        greets,
        oliver

         
    • Oliver

      Oliver - 2006-09-06

      One more addon...

      There are 2 "parts". The main part is the Compiere Monitor-application as itself. Its for managing the aspects and to view the logs etc. Its accessible via the cvs and as runnable version within the files of the project site.

      The other part is for the clientside. These are some files you need to copy into the Compiere-folder. There are 2 new start-scripts:

      RUN_Compiere2_ot
      - to start with ObjectTeams and loading aspects
      RUN_Compiere2_ot_wotb
      - to start with ObjectTeams without reloaded aspects from db

      use these to start Compiere together with the ObjectTeams-Additions. Compiere will take much more longer then without as the classes needs to get aspectized. In future there will be some optimizings for that by the ObjectTeams-group. When you startup with RUN_Compiere2_ot a component called "TeamCreator" will run previously. He loads all aspects from the DB and compiles them. Afterwards they get packaged into OT-Teams.jar which is used as the Team-container during the startup of ObjectTeams & Compiere.

      If this jar was already created before and you don't want to rebuild them, just run:
      RUN_Compiere2_ot_wotb
      The TeamCreator wont start with this script.

      Ok...hope you make it working. If not, just ask.
      oliver

       
    • Oliver

      Oliver - 2006-09-07

      Hey,

      i created a short manual for the Compiere Monitor. I hope this will help the non-german speaking of yours with the first steps within the Compiere Monitor. Its dealing with installing and using the CM and its client-part, which means the Compiere startup together with the CM-aspects.

      I hope its helping but i also know its in a very unfinished state. I just dont have the time to rewrite alle the stuff i mentioned in the master thesis already ;)

      But ask if you got ideas for the manual or questions about something.

      greets,
      oliver

       
    • Oliver

      Oliver - 2006-09-14

      hey,

      short info: i added an english version of the master thesis to the files. It was autogenerated (by Bea Ross & Georgy, students of Enrique Ruibal (Sourcefourge user: ruibal) ) so dont expect too much.

      But it may help the non-german-speaking of you to understand a bit more. Well at least thats what its meant for ;)

      greets,
      oliver

       
    • NRzeqat

      NRzeqat - 2007-03-02

      please i have to get some help to how i can add any Business Partner that i can get it at the project window which mean exactly BPartner(Agent)and what's they means by Business Partner at the project.

       

Log in to post a comment.