Hello. I am experimenting with a form of versioning for workflows. I have made a container called Archive under Configuration->Polices-Workflow. The point of this container is to store copies of workflows right before a change is done to them. As a safety feature, I am trying to figure out a policy that will automatically disable the workflow copies as they are moved to the archive folder. I created a policy object and I am enforcing the policy object on the archive container. Inside the policy object I have a script policy. This is the script that I am running:
function onPostMove($Request)
{
# Get all workflow objects in the target container and disable them
Get-QADObject -SearchRoot 'CN=Archive,CN=Workflow,CN=Policies,CN=Configuration' `
-Type 'edsWorkflowDefinition' |
Set-QADObject -ObjectAttributes @{edsaWorkflowIsDisabled=TRUE}
}
The script is not disabling workflows when I put them in the archive container. I turned on debug logging for the script and I'm not seeing any obvious errors.
Can someone please help me figure out why the archived workflows aren't getting disabled?
Thanks!