I am trying to create a custom deployer module which runs AFTER the content (in this case a page) has been committed to the broker database. I know that in UDP there are different pipelines, each representing a different stage in the deployment process (called Verbs in the code). By debugging the code and by looking at the deployer-conf.xml that SDL provides, I found out that there are at least the following Verbs (stages):
- Prepare
- Process
- Content
- PreCommit
- Commit
- Rollback
However, as far as I can tell, ALL these stages take place before the database transaction is committed.
I've tried the following XML configurations:
Verb=Process (added my steps to the steps that were already there)
<Pipeline Id="Tridion-Process-Deploy" Action="Deploy" Verb="Process">
<Steps>
<Step Id="PageDeploy" Factory="com.sdl.delivery.deployer.steps.TridionExecutableStepFactory">
<Module Class="com.tridion.deployer.modules.PageDeploy" Type="PageDeploy"/>
</Step>
<!-- removed other steps for clarity's sake -->
<Step Id="PageDeployFast" Factory="com.sdl.delivery.deployer.steps.TridionExecutableStepFactory">
<Module Type="PageDeploy" Class="com.tridion.storage.extension.deployer.SolrPageDeploy" />
</Step>
</Steps>
</Pipeline>
Verb=Commit (new pipeline created specifically for my module)
<Pipeline Id="Tridion-Commit-Deploy" Action="Deploy" Verb="Commit">
<Steps>
<Step Id="PageDeployFast" Factory="com.sdl.delivery.deployer.steps.TridionExecutableStepFactory">
<Module Type="PageDeploy" Class="com.tridion.storage.extension.deployer.SolrPageDeploy" />
</Step>
</Steps>
</Pipeline>
Verb=PreCommit (also a new pipeline)
<Pipeline Id="Tridion-PreCommit-Deploy" Action="Deploy" Verb="PreCommit">
<Steps>
<Step Id="PageDeployFast" Factory="com.sdl.delivery.deployer.steps.TridionExecutableStepFactory">
<Module Type="PageDeploy" Class="com.tridion.storage.extension.deployer.SolrPageDeploy" />
</Step>
</Steps>
</Pipeline>
In all cases, my module got triggered AFTER the out of the box page deploy module, but unfortunately BEFORE the database transaction had been committed.
I also tried the verb 'PostCommit' but that doesn't seem to exist. My module does not get triggered at all when I use that.
Is there any way to trigger my custom deployer module AFTER the database transaction has been committed?
==== ANSWER ====
Raimond and Andrew both put me on the right track. The key thing to note is that the pipelines are executed in the order in which they occur in the deployer-conf.xml. There is one pipeline which contains the step to perform the database commit, namely Tridion-Commit-TX. To run a module post commit, just insert a pipeline after this one. Be careful though: you must put it BEFORE the Tridion-Cleanup pipeline, else your module cannot be instantiated anymore because the files on which it is based are gone.