Cette page ne doit être appliquée que si le script vous demande de passer la migration manuelle code.20241011.ODF.DeleteEducationalBookletProgramItemWorkflowAction
Afin de corriger la vérification des droits lors de la suppression d'archives des catalogues de cours sur les éléments de formation, nous utilisons maintenant la nouvelle action de workflow 2227 . Il est donc nécessaire de vérifier les cycles de vie qui surchargent les cycles de vie "Formation", "Parcours", "Conteneur" et "ELP". Si ces cycles de vie sont surchargés, on les retrouve dans le dossier WEB-INF/param/workflows sous les noms suivants :
container.xml course.xml program.xml subprogram.xml Dans ces fichiers, il faut ajouter l'action 2227 au niveau des common-actions si elle n'est pas présente :
Oups ! La copie dans le presse papier a échouée. Ouvrez le code et copier-le manuellement.<!-- Delete educational booklet document -->
<action id="2227" name="plugin.odf:WORKFLOW_ACTION_PROGRAM_ITEM_EDUCATIONAL_BOOKLET_DELETE">
<restrict-to>
<conditions type="AND">
<condition type="avalon">
<arg name="id">org.ametys.cms.workflow.LockCondition</arg>
</condition>
<condition type="avalon">
<arg name="id">org.ametys.cms.workflow.ValidateContentCondition</arg>
</condition>
<condition type="avalon">
<arg name="id">org.ametys.cms.workflow.ContentCheckRightsCondition</arg>
<arg name="right">ODF_Rights_Educational_Booklet_Delete</arg>
</condition>
</conditions>
</restrict-to>
<pre-functions>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.EditContentFunction</arg>
<arg name="notify">false</arg>
</function>
</pre-functions>
<results>
<result old-status=" " status=" " step="3">
<conditions type="AND">
<condition type="avalon">
<arg name="id">org.ametys.plugins.workflow.component.AmetysObjectCurrentStepCondition</arg>
<arg name="object-key">org.ametys.cms.repository.Content</arg>
<arg name="step">3</arg>
</condition>
</conditions>
<post-functions>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.ValidateContentFunction</arg>
<arg name="major">false</arg>
</function>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.ValidationStepFunction</arg>
</function>
</post-functions>
</result>
<unconditional-result old-status=" " status=" " step="1">
<post-functions>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.SetCurrentStepIdAndNotifyFunction</arg>
</function>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.CreateVersionFunction</arg>
</function>
</post-functions>
</unconditional-result>
</results>
</action> <!-- Delete educational booklet document -->
<action id="2227" name="plugin.odf:WORKFLOW_ACTION_PROGRAM_ITEM_EDUCATIONAL_BOOKLET_DELETE">
<restrict-to>
<conditions type="AND">
<condition type="avalon">
<arg name="id">org.ametys.cms.workflow.LockCondition</arg>
</condition>
<condition type="avalon">
<arg name="id">org.ametys.cms.workflow.ValidateContentCondition</arg>
</condition>
<condition type="avalon">
<arg name="id">org.ametys.cms.workflow.ContentCheckRightsCondition</arg>
<arg name="right">ODF_Rights_Educational_Booklet_Delete</arg>
</condition>
</conditions>
</restrict-to>
<pre-functions>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.EditContentFunction</arg>
<arg name="notify">false</arg>
</function>
</pre-functions>
<results>
<result old-status=" " status=" " step="3">
<conditions type="AND">
<condition type="avalon">
<arg name="id">org.ametys.plugins.workflow.component.AmetysObjectCurrentStepCondition</arg>
<arg name="object-key">org.ametys.cms.repository.Content</arg>
<arg name="step">3</arg>
</condition>
</conditions>
<post-functions>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.ValidateContentFunction</arg>
<arg name="major">false</arg>
</function>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.ValidationStepFunction</arg>
</function>
</post-functions>
</result>
<unconditional-result old-status=" " status=" " step="1">
<post-functions>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.SetCurrentStepIdAndNotifyFunction</arg>
</function>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.CreateVersionFunction</arg>
</function>
</post-functions>
</unconditional-result>
</results>
</action> Voir le code
<!-- Delete educational booklet document -->
<action id="2227" name="plugin.odf:WORKFLOW_ACTION_PROGRAM_ITEM_EDUCATIONAL_BOOKLET_DELETE">
<restrict-to>
<conditions type="AND">
<condition type="avalon">
<arg name="id">org.ametys.cms.workflow.LockCondition</arg>
</condition>
<condition type="avalon">
<arg name="id">org.ametys.cms.workflow.ValidateContentCondition</arg>
</condition>
<condition type="avalon">
<arg name="id">org.ametys.cms.workflow.ContentCheckRightsCondition</arg>
<arg name="right">ODF_Rights_Educational_Booklet_Delete</arg>
</condition>
</conditions>
</restrict-to>
<pre-functions>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.EditContentFunction</arg>
<arg name="notify">false</arg>
</function>
</pre-functions>
<results>
<result old-status=" " status=" " step="3">
<conditions type="AND">
<condition type="avalon">
<arg name="id">org.ametys.plugins.workflow.component.AmetysObjectCurrentStepCondition</arg>
<arg name="object-key">org.ametys.cms.repository.Content</arg>
<arg name="step">3</arg>
</condition>
</conditions>
<post-functions>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.ValidateContentFunction</arg>
<arg name="major">false</arg>
</function>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.ValidationStepFunction</arg>
</function>
</post-functions>
</result>
<unconditional-result old-status=" " status=" " step="1">
<post-functions>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.SetCurrentStepIdAndNotifyFunction</arg>
</function>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.CreateVersionFunction</arg>
</function>
</post-functions>
</unconditional-result>
</results>
</action> Ensuite, il faut ajouter l'appel à l'action 2227 chaque fois que l'action 2222 est présente dans le fichier de cycle de vie :
Oups ! La copie dans le presse papier a échouée. Ouvrez le code et copier-le manuellement.<common-action id="2222" /> <!-- Ligne existante -->
<common-action id="2227" /> <!-- Ligne ajoutée --> <common-action id="2222" /> <!-- Ligne existante -->
<common-action id="2227" /> <!-- Ligne ajoutée -->
<common-action id="2222" /> <!-- Ligne existante -->
<common-action id="2227" /> <!-- Ligne ajoutée -->