Commit b4ccb2ca authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

annualisation workflow (wip)

parent 2cc12f07
Loading
Loading
Loading
Loading
Loading
+11 −7
Original line number Diff line number Diff line
@@ -58,8 +58,9 @@ return [
    ],
    'WORKFLOW_ETAPE'             => [
        'actions' => ['install', 'update', 'workflow-reset'],
        'key'     => 'CODE',
        'key'     => ['CODE', 'ANNEE_ID'],
        'options' => [
            'soft-delete' => false,
            'columns'            => [
                'PERIMETRE_ID' => ['transformer' => 'SELECT id FROM perimetre WHERE code = %s'],
            ],
@@ -310,12 +311,15 @@ return [
    'WORKFLOW_ETAPE_DEPENDANCE'  => [
        'actions' => ['install', 'workflow-reset'],
        'key'     => ['ETAPE_SUIVANTE_ID', 'ETAPE_PRECEDANTE_ID', 'ACTIVE'],
        'options' => ['columns' => [
            'ETAPE_PRECEDANTE_ID' => ['transformer' => 'SELECT id FROM workflow_etape WHERE code = %s'],
            'ETAPE_SUIVANTE_ID'   => ['transformer' => 'SELECT id FROM workflow_etape WHERE code = %s'],
        'options' => [
            'soft-delete' => false,
            'columns' => [
                'ETAPE_PRECEDANTE_ID' => ['transformer' => 'SELECT id FROM workflow_etape WHERE code || \'-\' || annee_id = %s'],
                'ETAPE_SUIVANTE_ID'   => ['transformer' => 'SELECT id FROM workflow_etape WHERE code || \'-\' || annee_id = %s'],
                'TYPE_INTERVENANT_ID' => ['transformer' => 'SELECT id FROM type_intervenant WHERE code = %s'],
                'PERIMETRE_ID'        => ['transformer' => 'SELECT id FROM perimetre WHERE code = %s'],
        ],],
            ],
        ],
    ],

    /* Paramètres par défaut, en fonction des nomenclatures ci-dessus */
+14 −0
Original line number Diff line number Diff line
<?php

//@formatter:off

return [
    'name'    => 'WORKFLOW_ETAPE_ANNEE_FK',
    'unique'  => FALSE,
    'table'   => 'WORKFLOW_ETAPE',
    'columns' => [
        'ANNEE_ID',
    ],
];

//@formatter:on
+14 −0
Original line number Diff line number Diff line
<?php

//@formatter:off

return [
    'name'    => 'WORKFLOW_ETAPE_DEPENDANCE_ANNEE_FK',
    'unique'  => FALSE,
    'table'   => 'WORKFLOW_ETAPE_DEPENDANCE',
    'columns' => [
        'ANNEE_ID',
    ],
];

//@formatter:on
+14 −0
Original line number Diff line number Diff line
<?php

//@formatter:off

return [
    'name'    => 'WORKFLOW_ETAPE_DEPENDANCE_HCFK',
    'unique'  => FALSE,
    'table'   => 'WORKFLOW_ETAPE_DEPENDANCE',
    'columns' => [
        'HISTO_CREATEUR_ID',
    ],
];

//@formatter:on
+14 −0
Original line number Diff line number Diff line
<?php

//@formatter:off

return [
    'name'    => 'WORKFLOW_ETAPE_DEPENDANCE_HDFK',
    'unique'  => FALSE,
    'table'   => 'WORKFLOW_ETAPE_DEPENDANCE',
    'columns' => [
        'HISTO_DESTRUCTEUR_ID',
    ],
];

//@formatter:on
Loading