Suppression des relations entre utilisateurs et entités Une nouvelle action du cycle de vie est à rajouter dans vos fichiers de cycles de vie "utilisateurs" et "entités". Cette action est appelée lors de la suppression de relations lors qu'on supprime un contenu de l'annuaire.
Il faut donc ajouter l'action commune 200 ci-dessous dans vos fichier de cycle de vie :
WEB-INF/param/workflows/udorgunit.xml (exemple ) WEB-INF/param/workflows/user.xml (exemple ) Ajouter l'action suivante dans la section <common-actions>
Oups ! La copie dans le presse papier a échouée. Ouvrez le code et copier-le manuellement.<!-- Edit references -->
<action id="200" name="plugin.user-directory:WORKFLOW_ACTION_EDIT_REFERENCES">
<restrict-to>
<conditions type="AND">
<condition type="avalon">
<arg name="role">org.ametys.cms.workflow.LockCondition</arg>
</condition>
<condition type="avalon">
<arg name="role">org.ametys.plugins.contentio.synchronize.workflow.ValidateMetadataSynchronizeCondition</arg>
<arg name="validation-step">3</arg>
</condition>
</conditions>
</restrict-to>
<results>
<result old-status=" " status=" " step="1">
<conditions type="AND">
<condition type="avalon">
<arg name="role">org.ametys.cms.workflow.ContentCurrentStepCondition</arg>
<arg name="step">1</arg>
</condition>
</conditions>
<post-functions>
<function type="avalon">
<arg name="role">org.ametys.cms.workflow.SetCurrentStepIdAndNotifyFunction</arg>
</function>
</post-functions>
</result>
<result old-status=" " status=" " step="2">
<conditions type="AND">
<condition type="avalon">
<arg name="role">org.ametys.cms.workflow.ContentCurrentStepCondition</arg>
<arg name="step">2</arg>
</condition>
</conditions>
<post-functions>
<function type="avalon">
<arg name="role">org.ametys.cms.workflow.SetCurrentStepIdAndNotifyFunction</arg>
</function>
</post-functions>
</result>
<result old-status=" " status=" " step="3">
<conditions type="AND">
<condition type="avalon">
<arg name="role">org.ametys.cms.workflow.ContentCurrentStepCondition</arg>
<arg name="step">3</arg>
</condition>
</conditions>
<post-functions>
<function type="avalon">
<arg name="role">org.ametys.plugins.contentio.synchronize.workflow.ValidateSynchronizedContentFunction</arg>
</function>
<function type="avalon">
<arg name="role">org.ametys.cms.workflow.ValidationStepFunction</arg>
</function>
</post-functions>
</result>
<unconditional-result old-status=" " status=" " step="1"/>
</results>
<post-functions>
<function type="avalon">
<arg name="role">org.ametys.cms.workflow.ExtractOutgoingReferencesFunction</arg>
</function>
</post-functions>
</action> <!-- Edit references -->
<action id="200" name="plugin.user-directory:WORKFLOW_ACTION_EDIT_REFERENCES">
<restrict-to>
<conditions type="AND">
<condition type="avalon">
<arg name="role">org.ametys.cms.workflow.LockCondition</arg>
</condition>
<condition type="avalon">
<arg name="role">org.ametys.plugins.contentio.synchronize.workflow.ValidateMetadataSynchronizeCondition</arg>
<arg name="validation-step">3</arg>
</condition>
</conditions>
</restrict-to>
<results>
<result old-status=" " status=" " step="1">
<conditions type="AND">
<condition type="avalon">
<arg name="role">org.ametys.cms.workflow.ContentCurrentStepCondition</arg>
<arg name="step">1</arg>
</condition>
</conditions>
<post-functions>
<function type="avalon">
<arg name="role">org.ametys.cms.workflow.SetCurrentStepIdAndNotifyFunction</arg>
</function>
</post-functions>
</result>
<result old-status=" " status=" " step="2">
<conditions type="AND">
<condition type="avalon">
<arg name="role">org.ametys.cms.workflow.ContentCurrentStepCondition</arg>
<arg name="step">2</arg>
</condition>
</conditions>
<post-functions>
<function type="avalon">
<arg name="role">org.ametys.cms.workflow.SetCurrentStepIdAndNotifyFunction</arg>
</function>
</post-functions>
</result>
<result old-status=" " status=" " step="3">
<conditions type="AND">
<condition type="avalon">
<arg name="role">org.ametys.cms.workflow.ContentCurrentStepCondition</arg>
<arg name="step">3</arg>
</condition>
</conditions>
<post-functions>
<function type="avalon">
<arg name="role">org.ametys.plugins.contentio.synchronize.workflow.ValidateSynchronizedContentFunction</arg>
</function>
<function type="avalon">
<arg name="role">org.ametys.cms.workflow.ValidationStepFunction</arg>
</function>
</post-functions>
</result>
<unconditional-result old-status=" " status=" " step="1"/>
</results>
<post-functions>
<function type="avalon">
<arg name="role">org.ametys.cms.workflow.ExtractOutgoingReferencesFunction</arg>
</function>
</post-functions>
</action> Voir le code
<!-- Edit references -->
<action id="200" name="plugin.user-directory:WORKFLOW_ACTION_EDIT_REFERENCES">
<restrict-to>
<conditions type="AND">
<condition type="avalon">
<arg name="role">org.ametys.cms.workflow.LockCondition</arg>
</condition>
<condition type="avalon">
<arg name="role">org.ametys.plugins.contentio.synchronize.workflow.ValidateMetadataSynchronizeCondition</arg>
<arg name="validation-step">3</arg>
</condition>
</conditions>
</restrict-to>
<results>
<result old-status=" " status=" " step="1">
<conditions type="AND">
<condition type="avalon">
<arg name="role">org.ametys.cms.workflow.ContentCurrentStepCondition</arg>
<arg name="step">1</arg>
</condition>
</conditions>
<post-functions>
<function type="avalon">
<arg name="role">org.ametys.cms.workflow.SetCurrentStepIdAndNotifyFunction</arg>
</function>
</post-functions>
</result>
<result old-status=" " status=" " step="2">
<conditions type="AND">
<condition type="avalon">
<arg name="role">org.ametys.cms.workflow.ContentCurrentStepCondition</arg>
<arg name="step">2</arg>
</condition>
</conditions>
<post-functions>
<function type="avalon">
<arg name="role">org.ametys.cms.workflow.SetCurrentStepIdAndNotifyFunction</arg>
</function>
</post-functions>
</result>
<result old-status=" " status=" " step="3">
<conditions type="AND">
<condition type="avalon">
<arg name="role">org.ametys.cms.workflow.ContentCurrentStepCondition</arg>
<arg name="step">3</arg>
</condition>
</conditions>
<post-functions>
<function type="avalon">
<arg name="role">org.ametys.plugins.contentio.synchronize.workflow.ValidateSynchronizedContentFunction</arg>
</function>
<function type="avalon">
<arg name="role">org.ametys.cms.workflow.ValidationStepFunction</arg>
</function>
</post-functions>
</result>
<unconditional-result old-status=" " status=" " step="1"/>
</results>
<post-functions>
<function type="avalon">
<arg name="role">org.ametys.cms.workflow.ExtractOutgoingReferencesFunction</arg>
</function>
</post-functions>
</action> puis ajoutez sa référence pour chaque état (step) du workflow :
Oups ! La copie dans le presse papier a échouée. Ouvrez le code et copier-le manuellement.<step id="X" name="....">
<actions>
<!-- Edit Action -->
<common-action id="2" />
// ...
<!-- Edit references -->
<common-action id="200" />
<!-- Synchronize Action -->
<common-action id="800" />
<actions>
</step> <step id="X" name="....">
<actions>
<!-- Edit Action -->
<common-action id="2" />
// ...
<!-- Edit references -->
<common-action id="200" />
<!-- Synchronize Action -->
<common-action id="800" />
<actions>
</step> Voir le code
<step id="X" name="....">
<actions>
<!-- Edit Action -->
<common-action id="2" />
// ...
<!-- Edit references -->
<common-action id="200" />
<!-- Synchronize Action -->
<common-action id="800" />
<actions>
</step>