DIAPASON 05

Définir une bibliothèque de configuration WEB via ENR-ACT-ENT : WSBIB


        Il est possible de définir les bibliothèques de configuration Web par la fonction DIALOG « ENR-ACT-ENT ».

        Pour cela, l’action interne « WSBIB » permet de créer, modifier, dupliquer et supprimer les bibliothèques de configuration Web.


        Initialisation de la liste WFEntAct telle que :

        Nom

        T

        Désignation

        O

        Commentaire

        Action

        C

        Action à exécuter

        O

        INI, CRE, MOD, DUP ou SUP

        EntTEn

        C

        Entité

        O

        Doit contenir WSBIB

        ActCle

        C

        Clé

        O

        Clé pour lien avec WfEntVar

        EntCl1

        C

        Clé 1 Entité

        O

        Doit être vide pour l’action CRE, sinon doit contenir la référence Bibliothèque

        DupCl1

        C

        Clé 1 Entité à Dupliquer

        F

        Référence Bibliothèque à Dupliquer si Action contient DUP

        Initialisation de la liste WFEntVar (pour CRE ou MOD) :

        att_13_for_293830836.png

        Pour chacun des champs définissant une bibliothèque de configuration Web, il faut créer un WFEntVar tel que :

        Nom

        T

        Désignation

        O

        Commentaire

        ActCle

        C

        Clé

        O

        Clé pour lien avec WfEntAct

        EntVar

        C



        Nom du champ Groupe Utilisateur

        EntVaC

        C

        Valeur Alphanumérique


        Valeur du groupe utilisateur


        Exemple :

        VLO.Action = SCR.EntAct

        COMMENTAIRE : "On renseigne les 4 informations qui permettent de générer la réfernce de la configuration"

        VLO.Marque = VCR.CfWebMar

        VLO.Bib = VCR.CfWebBib

        VLO.Gamme = VCR.CfWebGam

        VLO.Produit = VCR.CfWebPro

        COMMENTAIRE : "On génère la référence de la configuration"

        VLO.Ref = VLO.Marque + CLO."/" + VLO.Bib + CLO."/" + VLO.Gamme + CLO."/" + VLO.Produit

        COMMENTAIRE : "On récupère la désignation"

        VLO.Des = VCR.DesChapitre

        SI VLO.Action = CLO."SUP"

        COMMENTAIRE : "Suppression : on donne la référence configuration dans WfEntAct.EntCl1"

        CREATION Liste WfEntAct :

        PRENDRE WfEntAct Action = VLO.Action

        PRENDRE WfEntAct ActCle = VLO.Ref

        PRENDRE WfEntAct ActRes = CGL.VIDE

        PRENDRE WfEntAct ActErr = CGL.VIDE

        PRENDRE WfEntAct EntTEn = CLO."WSBIB"

        PRENDRE WfEntAct EntCl1 = VLO.Ref

        FIN_BLOC

        VLO.Res = ENR-ACT-ENT( )

        FIN_BLOC

        SINON

        SI VLO.Action = CLO."MOD"

        COMMENTAIRE : "Modification : on donne la référence configuration dans WfEntAct.EntCl1

        et on crée un WfEntVar pour la désignation de la configuration"

        CREATION Liste WfEntAct :

        PRENDRE WfEntAct Action = VLO.Action

        PRENDRE WfEntAct ActCle = VLO.Ref

        PRENDRE WfEntAct ActRes = CGL.VIDE

        PRENDRE WfEntAct ActErr = CGL.VIDE

        PRENDRE WfEntAct EntTEn = CLO."WSBIB"

        PRENDRE WfEntAct EntCl1 = VLO.Ref

        FIN_BLOC

        CREATION Liste WfEntVar :

        PRENDRE WfEntVar EntTEn = CLO."WSBIB"

        PRENDRE WfEntVar ActCle = VLO.Ref

        PRENDRE WfEntVar EntVar = CLO."CfWebBibDes"

        PRENDRE WfEntVar EntVaC = VLO.Des

        FIN_BLOC

        VLO.Res = ENR-ACT-ENT( )

        FIN_BLOC

        SINON

        COMMENTAIRE : "Création : On ne donne pas la référence dans WfEntAct.EntCl1 mais on crée les WfEntVar

        pour la marque, la bibliothèque, la gamme et le code produit pour générer la référence

        configuration et on crée un WfEntVar pour la désignation de la configuration"

        SI VLO.Action = CLO."CRE"

        CREATION Liste WfEntAct :

        PRENDRE WfEntAct Action = VLO.Action

        PRENDRE WfEntAct ActCle = VLO.Ref

        PRENDRE WfEntAct ActRes = CGL.VIDE

        PRENDRE WfEntAct ActErr = CGL.VIDE

        PRENDRE WfEntAct EntTEn = CLO."WSBIB"

        FIN_BLOC

        CREATION Liste WfEntVar :

        PRENDRE WfEntVar EntTEn = CLO."WSBIB"

        PRENDRE WfEntVar ActCle = VLO.Ref

        PRENDRE WfEntVar EntVar = CLO."VarCfWebMar"

        PRENDRE WfEntVar EntVaC = VLO.Marque

        FIN_BLOC

        CREATION Liste WfEntVar :

        PRENDRE WfEntVar EntTEn = CLO."WSBIB"

        PRENDRE WfEntVar ActCle = VLO.Ref

        PRENDRE WfEntVar EntVar = CLO."VarCfWebBib"

        PRENDRE WfEntVar EntVaC = VLO.Bib

        FIN_BLOC

        CREATION Liste WfEntVar :

        PRENDRE WfEntVar EntTEn = CLO."WSBIB"

        PRENDRE WfEntVar ActCle = VLO.Ref

        PRENDRE WfEntVar EntVar = CLO."VarCfWebGam"

        PRENDRE WfEntVar EntVaC = VLO.Gamme

        FIN_BLOC

        CREATION Liste WfEntVar :

        PRENDRE WfEntVar EntTEn = CLO."WSBIB"

        PRENDRE WfEntVar ActCle = VLO.Ref

        PRENDRE WfEntVar EntVar = CLO."VarCfWebPro"

        PRENDRE WfEntVar EntVaC = VLO.Produit

        FIN_BLOC

        CREATION Liste WfEntVar :

        PRENDRE WfEntVar EntTEn = CLO."WSBIB"

        PRENDRE WfEntVar ActCle = VLO.Ref

        PRENDRE WfEntVar EntVar = CLO."CfWebBibDes"

        PRENDRE WfEntVar EntVaC = VLO.Des

        FIN_BLOC

        VLO.Res = ENR-ACT-ENT( )

        FIN_BLOC

        FIN_BLOC

        FIN_BLOC