Export workflow form data

OpenKM a de nombreuses fonctionnalités interessantes, mais demande un minimum de configuration pour être pleinement exploité.

Moderator: dedisoft

Forum rules
Avant de poser une question, merci de regarder la documentation du wiki ou d'utiliser la fonction recherche du forum. Et rappelez vous que nous n'avons ni boule de cristal ni possibilité de lire dans les pensées, aussi pensez à spécifier quelle version d'OpenKM vous utilisez ainsi que la version du navigateur web et du système d'exploitation. Pour de plus amples informations lisez Comment reporter un bug efficacement (anglais).
Post Reply
kouadio
Senior Boarder
Senior Boarder
Posts: 68
Joined: Wed Jan 09, 2019 9:26 am

Export workflow form data

Post by kouadio »

Hi,

I have a form like this:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE workflow-forms PUBLIC "-//OpenKM//DTD Workflow Forms 2.4//EN"
                                "http://www.openkm.com/dtd/workflow-forms-2.4.dtd">
<workflow-forms>
  <workflow-form task="avis favorable">
    <input label="Date" name="date" data="date" readonly="true" />
    <input label="Direction" name="direction" data="direction" readonly="true" />
    <input label="Quantite" name="quantite" data="quantite" readonly="true" />
    <textarea label="Observation" name="observation" data="observation" readonly="true" />
    <input label="Avis responsable superieur" name="responsable" data="responsable" readonly="true" />
    <input label="Avis controle de gestion" name="cgai" data="cgai" readonly="true" />
    <input label="Avis DAF" name="daf" data="daf" readonly="true" />
    <button name="supprimer" label="supprimer" transition="supprimer"/>
  </workflow-form>
</workflow-forms>
And I would like to find in the database information filled in the different fields of my form.
My goal is to export this data to excel or do a word mail merge with an ODBC connector.
Thank you for everything.

jllort
Moderator
Moderator
Posts: 11132
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Export workflow form data

Post by jllort »

If for you is enough the latest values, you should get the fields and save as metadata ( in a transaction ). If you need full trace of all the stages, then should build your own table and save there.

kouadio
Senior Boarder
Senior Boarder
Posts: 68
Joined: Wed Jan 09, 2019 9:26 am

Re: Export workflow form data

Post by kouadio »

I created metadata fields identical to those of the workflow form. How should I proceed to have the form data automatically embedded in the specified metadata group?

jllort
Moderator
Moderator
Posts: 11132
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Export workflow form data

Post by jllort »

In the trasaction, you have the values into the workflow variables. Then you should get the variables and using OpenKM API set the metadata fields:

URL what should read:
https://docs.openkm.com/kcenter/view/wf ... -node.html ( sample to get a variable -> Object should cast to Input, Select etc... )
https://docs.openkm.com/kcenter/view/ok ... l#addGroup ( first add group )
https://docs.openkm.com/kcenter/view/ok ... tiesSimple ( then save metadata )

Post Reply