Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Child Workflow Fails Sporadically

  • 1.  Child Workflow Fails Sporadically

    GOLD CONTRIBUTOR
    Posted Apr 05, 2019 09:00 AM

    Hi all,

    An appointment is created, which triggers a workflow that calls a child workflow. In the child workflow, there is a custom Action that returns a calculated date (if you pass Execution time and specify an input of 2, it will add 2 days and return it as output). This actions works most of the time, but sometimes it fails. I come to believe that CreatedOn datetime input that we are passing to calculate the new date is not available in the context.

    The child workflow was originally asynchronous. See error below:

    We are passing Start Time as an input and adding 2 days. This new date is used in a logic step later.

    I switched it to real-time and received a new error:

    Here's the error log:

    ErrorDetails.txt

    I have two questions:

    • Any idea as to how approach the sporadic results of custom action in the child workflow triggered from a parent workflow that is triggered on create of an appointment record?
    • What is happening when I switch the child workflow to real-time?


    Thank you

    Best,
    Tony



    ------------------------------
    Tony Mykhaylovsky
    ------------------------------
    Conference-CRMUG_200x200


  • 2.  RE: Child Workflow Fails Sporadically

    MICROSOFT MVP
    Posted Apr 05, 2019 12:09 PM
    Tony,
    First thing - I'm glad that you back to field :)
    According to log you have "Child - Merch.Design Reminders" workflow that is get cancelled. Check it - specifically step that terminates the workflow and why it does it. It'll give you an answer what is happening.
    Good luck.

    ------------------------------
    Andrew Butenko
    ------------------------------

    Conference-CRMUG_200x200


  • 3.  RE: Child Workflow Fails Sporadically

    GOLD CONTRIBUTOR
    Posted Apr 08, 2019 12:37 PM
    Related to the answer from Andrew, in the log it looks like you have a final step to stop the workflow with a status of 'Cancelled' inside the workflow "Child - Merch/Design Reminders". Can you try setting it to 'Success'? I've seen issues using the Cancelled status, where CRM views it as an error.

    Hope this helps!

    ------------------------------
    Aaron Hirshfield
    Sr. CRM Developer
    Foundation Medicine
    Cambridge MA
    ------------------------------

    Conference-CRMUG_200x200


If you've found this thread useful, dive deeper into User Group community content by role