I have an Async workflow which if triggered when the Case Status changes. The idea is that if the Case Status is "Awaiting Customer" the workflow will wait until 1 day after the value in a Case date field before changing the Case Status back to "Pending".
The date field has no time so the workflow always executes at midnight but the Case Status change step returns an error:
Plugin Trace:
[Microsoft.Xrm.Sdk.Workflow: Microsoft.Xrm.Sdk.Workflow.Activities.SetState]
[SetStateStep9: Update case to outstanding (will start SLA again)]
[Microsoft.Crm.Service.ObjectModel: Microsoft.Crm.Service.ObjectModel.CasePostUpdatePlugin]
[4b723f64-b443-422b-a269-34ad739f19ee: CasePostUpdatePlugin]
Sync workflow 'SLAs - XXX' terminated with error 'An unexpected error occurred.'
[Microsoft.Crm.ObjectModel: Microsoft.Crm.Extensibility.InternalOperationPlugin]
[46f6cf4c-14ae-4f1e-98a1-eae99a37e95c: ExecuteWorkflowWithInputArguments]
Sync workflow 'SLAs - XXX' terminated with error 'An unexpected error occurred.'
Error Message:
Unhandled Exception: Microsoft.Xrm.Sdk.InvalidPluginExecutionException: An unexpected error occurred.
The SLA is fairly simple:
Applicable when: Case Priority = "2" or "3"; Case Type = "Enhancement".
---
The Case Status change is always within the "Active" State and the case is definitely active at execution.
Thoughts so far:
- This is on premise, we work with UK and US users, is the midnight execution somehow a factor - maybe zero hour is a problem, this is UK hosted so we have gone 1hr forward from UTC;
- The workflow kind of triggers itself although it waits for the minimum of 1 day (though an infinite loop might be a factor but can't see how it would be with big timescales);
- How could the SLA be having an issue? Although I can find the hidden workflow, I can't see that there would be an issue with as the Success Criteria is NOT met.
Anyone come across an issue like this?
*This post is locked for comments