<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Verdana size=2>Bonjour,</FONT></DIV>
<DIV><FONT face=Verdana size=2>Ayant le besoin de créer des workflows
spécifiques, je me suis intéressé à la méthode 'verifyWorkflow' de
l'installer.</FONT></DIV>
<DIV><FONT face=Verdana size=2>J'ai donc construit un skin qui me retourne les
workflows à installer, mais pour pouvoir définir ces derniers, j'avais besoin
d'accéder aux constantes stockées dans CPSWorkflow/constants.py.</FONT></DIV>
<DIV><FONT face=Verdana size=2>Quoi que je fasse, je n'avais jamais accès à ces
constantes. Je me suis donc inspiré de ce qui était fait dans
CPSCore/permissions.py puisque l'import de constantes de permissions
fonctionnait.</FONT></DIV>
<DIV><FONT face=Verdana size=2>J'ai donc ajouté au fichier constants.py le code
suivant:</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>from AccessControl import
ModuleSecurityInfo<BR>security =
ModuleSecurityInfo('Products.CPSWorkflow.constants')</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana
size=2>security.declarePublic('TRANSITION_ALLOWSUB_CREATE')<BR>TRANSITION_ALLOWSUB_CREATE
=
10<BR>security.declarePublic('TRANSITION_ALLOWSUB_DELETE')<BR>TRANSITION_ALLOWSUB_DELETE
=
11<BR>security.declarePublic('TRANSITION_ALLOWSUB_MOVE')<BR>TRANSITION_ALLOWSUB_MOVE
= 12 # Into this
container.<BR>security.declarePublic('TRANSITION_ALLOWSUB_COPY')<BR>TRANSITION_ALLOWSUB_COPY
= 13 # Same...<BR>.<BR>.<BR>.<BR></FONT></DIV>
<DIV><FONT face=Verdana size=2>Pour chaque constante déclarée, j'ai ajouté une
déclaration de sécurité. Maintenant, mon code fonctionne.</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>Est-ce la bonne solution ?</FONT></DIV>
<DIV><FONT face=Verdana size=2>Si oui, peut-on intégrer cette modification à CPS
?</FONT></DIV>
<DIV><FONT face=Verdana size=2>Si non, quelle est la bonne solution
?</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>Cordialement</FONT></DIV>
<DIV><FONT face=Verdana size=2> </DIV></FONT>
<DIV>
<HR>
<FONT style="FONT-SIZE: 9px; COLOR: #00adce; FONT-FAMILY: Verdana"><FONT
style="FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #0c4da2">Cédric
Marfil</FONT><BR>Concepteur Réalisateur Intégrateur Confirmé<BR><B>Tél.
direct:</B> 03.20.65.34.82<BR><B>Mail:</B> <A
href="mailto:cedric.marfil@capgemini.com">cedric.marfil@capgemini.com</A><BR><BR><FONT
style="FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #0c4da2">Cap</FONT><FONT
style="FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #00adce">gemini</FONT><BR>181
rue Jules Delcenserie<BR>59700 Marcq en Baroeul<BR></FONT></DIV></BODY></HTML>
<table><tr><td bgcolor=#ffffff><font color=#000000>This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.<br>
<br>
</font></td></tr></table>