Voorbeeldconfiguratie van werkstroompurgeertaak voor AEM as a Cloud Service
In dit artikel wordt een voorbeeldconfiguratie uitgelegd voor het instellen van werkstroomleegloop als onderhoudstaak in AEM as a Cloud Service.
Beschrijving
Milieu
Adobe Experience Manager as a Cloud Service (AEMaaCS)
Probleem/symptomen
Dit artikel is een voorbeeldconfiguratie voor het instellen van werkstroomleegloop als onderhoudstaak in AEM as a Cloud Service.
Referentie:
de Gids van het Onderhoud van Adobe Experience Manager
Resolutie
Om een werkschemazuivering als onderhoudstaak op te zetten, volg deze stappen om de noodzakelijke elementen in uw Geweven project te vormen:
Stap1. OSGi-configuratie
Maak een OSGi-configuratiebestand.
Pad: ui.config/src/main/content/jcr_root/apps/>project_name</osgiconfig/config.author/ com.adobe.granite.workflow.purge.Scheduler >project_name<.cfg.json
configuratie van het Voorbeeld :
{
"scheduledpurge.workflowStatus": "COMPLETED",
"scheduledpurge.name": "Workflow Purge",
"scheduledpurge.daysold": 30,
"scheduledpurge.modelIds": [ ] ,
"scheduledpurge.purgePackagePayload":true
}
Met deze configuratie verwijdert u werkstroominstanties die meer dan 30 dagen geleden zijn voltooid.
Stap2. Het onderhoudvenster configureren
-
Maak een wekelijks knooppunt voor het onderhoudsvenster. Pad:
ui.apps/src/main/content/jcr_root/apps/settings/granite/operations/maintenance/granite_weekly/.content.xml
configuratie van het Voorbeeld :<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="sling:Folder" sling:configCollectionInherit="true" sling:configPropertyInherit="true" windowEndTime="15:30" windowSchedule="weekly" windowScheduleWeekdays="[ 5,5] " windowStartTime="14:30"/>
Deze configuratie voert de onderhoudstaak elke Donderdag van 14:30 tot 15:30 (UTC) uit.
-
Maak het taakknooppunt voor het leegmaken van de workflow. Pad:
ui.apps/src/main/content/jcr_root/apps/settings/granite/operations/maintenance/granite_weekly/granite_WorkflowPurgeTask/.content.xml
configuratie van het Voorbeeld :<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" jcr:primaryType="nt:unstructured" sling:resourceType="granite/operations/components/maintenance/task" granite.maintenance.name="WorkflowPurgeTask" granite.task.hint="HINT: Please add workflow models to be deleted to the workflow-purge configuration, which is available under Adobe Granite Workflow Purge Configuration under Web Console Configuration-Manager."/>
-
Vorm een pakketfilter voor knoopinstallatie. Pad:
ui.apps/src/main/content/META-INF/vault/filter.xml
configuratie van het Voorbeeld :<workspaceFilter version="1.0"> ... <!-- Add the below line to existing settings --> <filter root="/apps/settings/granite/operations/maintenance/granite_weekly"/> </workspaceFilter>>
-
Werk het filter
filevault-package-maven-plugin
bij: Pad:ui.apps.structure/pom.xml
configuratie van het Voorbeeld :<plugin> <artifactId>filevault-package-maven-plugin</artifactId> <configuration> <filters> ... <!-- Add the below lines to existing settings --> <filter><root>/apps/settings/granite</root></filter> <filter><root>/apps/settings/granite/operations</root></filter> <filter><root>/apps/settings/granite/operations/maintenance</root></filter> <filter><root>/apps/settings/granite/operations/maintenance/granite_weekly</root></filter> </filters> </configuration> </plugin>
Stap3. Lokale tests
Stel de configuratie samen en installeer deze op de lokale SDK. Controleer het resultaat van de werkstroomopruimtaak.
$ mvn clean install -PautoInstallSinglePackage
Stap 4. Implementatie in cloud
Zodra bevestigd, verbind en duw de configuratie aan de bewaarplaats van de it. Voer de Cloud Manager-pijplijn uit om deze te implementeren in uw AEM as a Cloud Service-omgeving. Zorg ervoor om de configuratie van de lagere milieu's op te stellen.