OpenWFE backup

2007-05-08
2013-04-25
  • Vasco Silva

    Vasco Silva - 2007-05-08

    Hi,

    i'm going to connect openwfe to another software in .dot (c#), and Postgre. I will create tables to store all the info i need about the active flows. 2 tables, something like this:

    Tasks

    task_id(pk) - which will have the workflowInstanceId
    id_user_who_launched_it - the id of the program's user
    launch_date
    deadline
    visible(Y/N)
    list_notifications - list of program user ids
    task_responsable
    list_emails

    Atributes

    atrib_id(pk)
    task_id(fk)
    atribute_type
    value
    id_user_who_added_it
    add_date
    visible(Y/N)
    permissions_group1

    I will use this tables when items are created, edited, proceeded,visualised etc...
    Of course that the atributes that are needed to the flow, mostly boolean atributes would be on the engine.

    I would like to store the info in participant-map.xml, worklist-configuration.xml, and passwd.xml in a database in order to be easier to manipulate that information. Per example, add or remove grants to a user. Is it possible?

    I will also create a history file for each item, and for each change, write a line on that file, like a log.

    I read this http://www.openwfe.org/manual/ch04s03.html and i looked at the files but what we have here postgresql_xlob.sql isn't enough, and i don't even understand what does the table described is for. The data that would be on that table alone would be worthless in a restore from a backup process. It doesn't even has the location of the item, meaning the current store of the item. Tell me if i'm right.

    To do the backup of the openwfe's state, i would backup my tables and the whole openwfe folder.

    Is my whole project reasonable?

    Thank you for your patience.

     
    • John Mettraux

      John Mettraux - 2007-05-08

      Hi Vasco,

      a long question that calls for a long answer.

      > I would like to store the info in participant-map.xml, worklist-configuration.xml, and passwd.xml in a
      > database in order to be easier to manipulate that information. Per example, add or remove grants to a
      > user. Is it possible?

      Yes, but it's lots of work.

      > I read this http://www.openwfe.org/manual/ch04s03.html and i looked at the files but what we have here
      > postgresql_xlob.sql isn't enough, and i don't even understand what does the table described is for. The
      > data that would be on that table alone would be worthless in a restore from a backup process. It doesn't
      > even has the location of the item, meaning the current store of the item. Tell me if i'm right.

      It's difficult for me to answer that one. The data stored by this xlob system is sufficient for the engine and the worklist. Of course, it's not sufficient for your application, but the initial idea is that you shouldn't interact with the workflow management system via the database but via the engine / worklist.

      Meanwhile, I'm sure you have noticed that the main development effort of OpenWFE switched from the Java version to the Ruby version. I'm chiefly just maintaining OpenWFEja as of now.

      Now this set of questions can be decomposed/refined into smaller questions that might be easier for me to reply to.

      Best regards,

      John

       
    • Vasco Silva

      Vasco Silva - 2007-05-08

      "but the initial idea is that you shouldn't interact with the workflow management system via the database but via the engine / worklist. "

      ok, that means that in c# ambient if i want to add a new grant to a user i have to go to the passwd.xml and add a line right?

       
    • John Mettraux

      John Mettraux - 2007-05-08

      Hi,

      > ok, that means that in c# ambient if i want to add a new grant to a user i have to go to the passwd.xml and add a line right?

      Not necessarily : lots of people have one or two 'system users' and map them via a field in the workitem to their real (C# / ldap / other application) user.

      See also :
      http://jmettraux.wordpress.com/2006/07/04/a-variation-on-users-and-participants/

      Best regards,

      John

       
    • Vasco Silva

      Vasco Silva - 2007-05-14

      Hi again,

      about putting a postgre database behind openwfe:

      i should create the set of tables, but the only tables i see are the xldocument in postgresql_xlob.sql and the owfehistory in postgresql_history.sql.

      You say that this xlob system is sufficient for the engine and the worklist, that means that i can store all the information related to users, workflow-definitions and workflow instances? Those 2 tables aren't enough, where are the rest?

      To do the backup of openwfe, it is always necessary to backup the openwfe folder right? Because even if i store all the information in database how do i restore the engine to the previous state(with the workflow instances in the stores)?

       
    • John Mettraux

      John Mettraux - 2007-05-14

      Hi,

      > You say that this xlob system is sufficient for the engine and the worklist,
      > that means that i can store all the information related to users, workflow-definitions
      > and workflow instances? Those 2 tables aren't enough, where are the rest?

      users : IIRC, this is done via sql_passwd or something like that.
      workflow-definitions : there is nothing for storing them into the database, they are just XML documents.
      workflow instances : xlob takes care of them.

      If you don't use a database, you only have to backup the OpenWFE folder.

      In order to restore an OpenWFE system which is not using a database, you simply have to put its folder back live. If you were using a database, you'd have to make sure to restore the folder and the database back in sync.

      Best regards,

      John

       
    • Vasco Silva

      Vasco Silva - 2007-05-16

      Hi,

      sorry to insist on this but i have to understand this because i have to make a decision.

      This table

      create table owfehistory
      (
          date_ timestamp not null,
          engineid varchar(255) not null,
          wfdname varchar(255) not null,
          wfdrevision varchar(255) not null,
          wfdid bigint not null,
          expression varchar(255) not null,
          eventcode char(7) not null,
          participantname varchar(255),
          message varchar(255) not null,

          primary key (date_, engineid, wfdid, expression)
      );

      create index wfdname_index on owfehistory (wfdname);
      create index wfdid_index on owfehistory (wfdid);
      create index eventcode_index on owfehistory (eventcode);

      in postgresql_history.sql

      and this one

      create table xldocument
      (

          prefix varchar(30) not null,

          engineId varchar(40) not null,
          initialEngineId varchar(40) not null,
          wfdUrl varchar(255) not null,
          wfdName varchar(50) not null,
          wfdRevision varchar(40) not null,
          wfInstanceId varchar(40) not null,
          expressionName varchar(40) not null,
          expressionId varchar(50) not null,

          xldoc text not null,

          primary key (prefix, engineId, initialEngineId, wfdName, wfdRevision, wfInstanceId, expressionId)

      --    index wfid_index (wfInstanceId),
      --    index exid_index (expressionId)
      );

      create index wfid_index on xldocument (wfInstanceId);
      create index exid_index on xldocument (expressionId);

      grant insert, update, select, delete on xldocument to xlob;

      in postgresql_xlob.sql

      are the only ones for postgre in openwfe-1.7.3pre0\sql\

      None of them stores the attributes of the instances.

      So, if it is always necessary to backup the openwfe folder what's the point of using a database?

      Is it because of performance?

       
      • John Mettraux

        John Mettraux - 2007-05-16

        Hi,

        > None of them stores the attributes of the instances.

        This statement is wrong. The full workitem or expressions are stores in XML in the xldoc column, so the attributes or whatever are stored.

        > So, if it is always necessary to backup the openwfe folder what's the point of using a database?

        I implemented that this way years ago because I was stupid and I hadn't enough energy/intelligence/instinct to tell to the people interested in this feature implementation at this time that it is bullshit to try to save hierarchical data in a relational repository.

        > Is it because of performance?

        A database is usually less performant than a filesystem (though sometimes, some database vendors make you install a special filesystem format a your harddrive to overcome that).

        Best regards,

        John

         

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks