Hi,
As we know SP 2010 and 2013 workflow behaves differently and have major differences. We have AutoCleanupDays property available for SP 2010 workflow but not for SP 2013 workflow.
We are trying to set the AutoCleanupDays for SP 2013 workflow but do not found any property.
We have tried following code to get the workflow association.
$spurl="<My site URL>"
$web=Get-SPWeb $spurl
$list=$web.Lists["Record Library"];
$wfm=New-object Microsoft.SharePoint.WorkflowServices.WorkflowServicesManager($web)
$sub=$wfm.GetWorkflowSubscriptionService()
$subscriptions=$sub.EnumerateSubscriptionsByList($list.ID)|Where-Object {$_.Name-eq"<My workflow name>"}
$subscriptions.AutoCleanupDays #not found
Any help is appreciated.
Regards,
Prasad Pathak