Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Realtime workflows and child workflows

Posted on by 605

HI

I was wondering what happens in following situation:
A parent workflow runs in realtime. When this workflow would call a child workflow, the child workflow runs async and in another transaction?

I have noticed that the parent workflow does not wait for the child workflow to be executed and continues with the next steps.

How can you wait for the results of the child workflow?

Grts

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Realtime workflows and child workflows

    Thank you! After changing the child processes to real time, now everything works fine.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Realtime workflows and child workflows

    Hmm, I've got an interesting symptom where I have a real time workflow which calls another RT child workflow, which updates a record, and the step immediately after the return from the child tests and fails to see the update.

    The update is however displayed via the UI, obviously after a delay many orders of magnitude greater than the time it takes to start executing that next step test in the parent workflow....??

    Both workflows have the same record as their context - the child is really just a "subroutine" with some common "code" in it - I'll be re-entering the child steps in the main workflow to avoid the failure this causes.

    Cheers,

    Michael

  • ashlega Profile Picture
    ashlega 34,475 on at
    RE: Realtime workflows and child workflows

    According to MSDN, real-time child workflow should run synchronously:

    msdn.microsoft.com/.../dn481598.aspx

    "All activities in the workflow and any child workflows, except asynchronous workflows, are part of a single transaction. Asynchronous child workflows are queued and execute in a separate transaction."

  • DlwK Profile Picture
    DlwK 605 on at
    RE: Realtime workflows and child workflows

    Hmz it is already a Realtime child workflow. Will have to check again, as yesterday I was calling a child workflow setting an attribute to Yes. In the parent flow I added a condition checking that same attribute and cancelled the workflow with a reason for each value. The reason each time was the value for False.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Realtime workflows and child workflows

    Agree with Mahen. Because the child workflow is async, it will run in background and not in real time. You will have to make the child workflow as real time as well.

  • Verified answer
    Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: Realtime workflows and child workflows

    Make child workflow real time as well.

    Thanks

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