Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

Real-Time Workflow gives error after weekend

Posted on by 50

I created a real-time workflow on Friday that was working fine.  Very simple one to prevent any changes on a related page to a Work Order after going Closed-Posted or Closed-Canceled.  For ease, I also created a field called Work Order Lock that gets set to Yes via a business rule when the Work Order was set to either of the Closed statuses.  

The workflow is as below.  To summarize: If the Work Order is locked, and a field is changed on the related form, end the process as cancelled with the message:  Cannot change data of a Closed Work Order.

pastedimage1600204739709v1.png

As mentioned, it was working fine on Friday 9/11.  I came back to the task Monday to finish adding the same workflow to a couple other related forms, only to find I am now receiving this business process error:

The real-time workflow named "Work order Service cancel data changes" failed with the error "Cannot change data of a Closed Work Order"

The comments form the Process Session shows:

Sync workflow failed with error message - Unhandled exception:
Exception type: Microsoft.Xrm.Sdk.InvalidPluginExecutionException
Message:

-- End stack trace --

Exception type: System.Activities.Statements.WorkflowTerminatedException
Message: Cannot change data of a Closed Work Order
at System.Activities.WorkflowApplication.Invoke(Activity activity, IDictionary`2 inputs, WorkflowInstanceExtensionManager extensions, TimeSpan timeout)
at System.Activities.WorkflowInvoker.Invoke(Activity workflow, IDictionary`2 inputs, TimeSpan timeout, WorkflowInstanceExtensionManager extensions)
at Microsoft.Crm.Workflow.SynchronousRuntime.SynchronousWorkflowActivityHost.ExecuteWorkflowUsingInvoker(Activity workflow, ICommonWorkflowContext context)
at Microsoft.Crm.Workflow.SynchronousRuntime.SynchronousWorkflowActivityHost.StartWorkflow(WorkflowActivationData activationData, ICommonWorkflowContext context)
-- End stack trace --

, error code - -2147220970

pastedimage1600204874072v2.png

I made no changes over the weekend, but do notice that a few updates were pushed out Saturday.

pastedimage1600204959060v3.png

If I change this to a background workflow, it triggers fine and can  update fields and end with a canceled state.  But, I need to to prevent the data from changing.  Therefore the real-time workflow.

I duplicated the behavior on 3 other entities and 2 other environments.  Additionally, I created new Real-time workflows that were triggered on the same form, not a related form to rule that out.  All environments had the Saturday updates.

Can anyone help figure out what changed and how I can make the needed adjustments to get this working again?

Thank you in advance!   

  • Suggested answer
    RE: Real-Time Workflow gives error after weekend

    Confirmed as a bug.  

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans