Executing one workflow from another synchronously

The InvokeWorkflow activity which comes with Workflow Foundation (.NET 3.0) executes a workflow asynchronously. So, if you are calling a workflow from ASP.NET which in turn calls another workflow, the second workflow is going to be terminated prematurely instead of executing completely. The reason is, ManualWorkflowSchedulerService will execute the first workflow synchronously and then finish the workflow execution and close down. If you used InvokeWorkflow activity in order to run another workflow from the first workflow, it will start on another thread and it will not get enough time to execute completely before the parent workflow ends.

Here you see only one activity in the second workflow gets the chance to execute. The remaining two activities do not get called at all.

Luckily I found an implementation of synchronous workflow execution at:

http://www.masteringbiztalk.com/blogs/jon/PermaLink,guid,7be9fb53-0ddf-4633-b358-01c3e9999088.aspx

It's an activity which takes the workflow as input and executes it synchronously. The implementation is very interesting to see. Please see the original blog post for details.

Published Wednesday, December 27, 2006 3:38 PM by omar
Filed under:

Comments

# re: Executing one workflow from another synchronously

Wednesday, December 27, 2006 11:08 AM by samiha esha

thanks for a useful piece of article :)

# Synchronously execute and get return parameters from Workflow

Wednesday, April 11, 2007 1:01 PM by Omar AL Zabir, Many Variety of Posts (MVP)

In my DropThings project, I have used Workflows to develop the business layer that run synchronously

# re: Executing one workflow from another synchronously

Sunday, May 27, 2007 6:39 PM by kalimurzino@rambler.ru

4500 Waldeck Street

# re: Executing one workflow from another synchronously

Monday, July 30, 2007 12:39 AM by Leighms

Hi! Visit:  

# re: Executing one workflow from another synchronously

Monday, July 30, 2007 12:39 AM by Leighms

Hi! Visit:  

# re: Executing one workflow from another synchronously

Wednesday, August 01, 2007 5:11 PM by Vilyamaf

Hello! great idea of color of this siyte!

# re: Executing one workflow from another synchronously

Saturday, September 15, 2007 6:00 AM by Chaed

<a href=forex-broker.bravehost.com/index.html>Forex Broker</a>

# re: Executing one workflow from another synchronously

Saturday, September 15, 2007 6:00 AM by Chaed

<a href=forex-broker.bravehost.com/index.html>Forex Broker</a>

# re: Executing one workflow from another synchronously

Saturday, October 20, 2007 6:47 PM by Zilbermangs

<a href=  ></a>

# re: Executing one workflow from another synchronously

Saturday, October 20, 2007 6:47 PM by Zilbermanhy

<a href=  ></a>

# re: Executing one workflow from another synchronously

Saturday, October 20, 2007 6:47 PM by Zilbermanhy

<a href=  ></a>

# re: Executing one workflow from another synchronously

Saturday, October 20, 2007 6:48 PM by Zilbermanhy

<a href=  ></a>

# re: Executing one workflow from another synchronously

Saturday, October 20, 2007 6:48 PM by Zilbermanmz

<a href=  ></a>

# re: Executing one workflow from another synchronously

Saturday, October 20, 2007 6:48 PM by Zilbermanmz

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, October 21, 2007 5:17 PM by Zilbermaneb

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, October 21, 2007 5:17 PM by Zilbermaneb

<a href=  ></a>

# Synchronously execute and get return parameters from Workflow

Sunday, October 21, 2007 10:01 PM by Omar AL Zabir

In my DropThings project, I have used Workflows to develop the business layer that run synchronously

# re: Executing one workflow from another synchronously

Wednesday, October 24, 2007 7:11 AM by Zilbermanaj

<a href=  ></a>

# re: Executing one workflow from another synchronously

Wednesday, October 24, 2007 7:11 AM by Zilbermanaj

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 04, 2007 1:00 AM by Zilbermangg

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 04, 2007 1:01 AM by Zilbermanpl

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 04, 2007 1:01 AM by Zilbermanmk

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 04, 2007 1:01 AM by Zilbermanmk

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 04, 2007 4:47 PM by Zilbermanjp

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 04, 2007 4:47 PM by Zilbermanjp

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 04, 2007 4:47 PM by Zilbermanjp

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 04, 2007 4:47 PM by Zilbermanrs

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 04, 2007 4:47 PM by Zilbermanrs

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 04, 2007 4:48 PM by Zilbermanrs

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 04, 2007 4:48 PM by Zilbermanrs

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 04, 2007 4:48 PM by Zilbermanrs

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 04, 2007 4:48 PM by Zilbermandt

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 04, 2007 4:48 PM by Zilbermandt

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 04, 2007 4:48 PM by Zilbermandt

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 04, 2007 4:48 PM by Zilbermandt

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 04, 2007 4:48 PM by Zilbermandt

<a href=  ></a>

# re: Executing one workflow from another synchronously

Saturday, November 10, 2007 11:55 AM by Zilbermanzt

<a href=  ></a>

# re: Executing one workflow from another synchronously

Saturday, November 10, 2007 11:55 AM by Zilbermanzt

<a href=  ></a>

# re: Executing one workflow from another synchronously

Saturday, November 10, 2007 11:55 AM by Zilbermanzt

<a href=  ></a>

# re: Executing one workflow from another synchronously

Saturday, November 10, 2007 11:55 AM by Zilbermanzt

<a href=  ></a>

# re: Executing one workflow from another synchronously

Saturday, November 10, 2007 11:55 AM by Zilbermanph

<a href=  ></a>

# re: Executing one workflow from another synchronously

Saturday, November 10, 2007 11:55 AM by Zilbermanph

<a href=  ></a>

# re: Executing one workflow from another synchronously

Saturday, November 10, 2007 11:55 AM by Zilbermanph

<a href=  ></a>

# re: Executing one workflow from another synchronously

Saturday, November 10, 2007 11:56 AM by Zilbermanno

<a href=  ></a>

# re: Executing one workflow from another synchronously

Saturday, November 10, 2007 11:56 AM by Zilbermanno

<a href=  ></a>

# re: Executing one workflow from another synchronously

Saturday, November 10, 2007 11:56 AM by Zilbermanno

<a href=  ></a>

# re: Executing one workflow from another synchronously

Saturday, November 10, 2007 11:56 AM by Zilbermanno

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 11, 2007 5:41 AM by Zilbermanxa

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 11, 2007 5:41 AM by Zilbermanxa

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 11, 2007 5:41 AM by Zilbermanxa

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 11, 2007 5:42 AM by Zilbermanlu

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 11, 2007 5:42 AM by Zilbermanxa

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 11, 2007 5:42 AM by Zilbermanlu

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 11, 2007 5:42 AM by Zilbermanlu

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 11, 2007 5:42 AM by Zilbermanlu

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 11, 2007 5:42 AM by Zilbermanlu

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 11, 2007 5:42 AM by Zilbermanhp

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 11, 2007 5:42 AM by Zilbermanhp

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 11, 2007 5:43 AM by Zilbermanhp

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 11, 2007 5:43 AM by Zilbermanhp

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 11, 2007 5:43 AM by Zilbermanhp

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 11, 2007 10:12 PM by Zilbermanzd

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 11, 2007 10:12 PM by Zilbermanzd

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 11, 2007 10:12 PM by Zilbermanzd

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 11, 2007 10:12 PM by Zilbermanzd

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 11, 2007 10:12 PM by Zilbermanqv

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 11, 2007 10:12 PM by Zilbermanqv

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 11, 2007 10:13 PM by Zilbermanqv

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 11, 2007 10:13 PM by Zilbermanqv

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 11, 2007 10:13 PM by Zilbermanlj

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 11, 2007 10:13 PM by Zilbermanlj

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 11, 2007 10:13 PM by Zilbermanlj

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 11, 2007 10:13 PM by Zilbermanlj

<a href=  ></a>

# re: Executing one workflow from another synchronously

Sunday, November 11, 2007 10:13 PM by Zilbermanlj

<a href=  ></a>

# re: Executing one workflow from another synchronously

Monday, November 12, 2007 3:41 PM by Zilbermanyn

<a href=  ></a>

# re: Executing one workflow from another synchronously

Monday, November 12, 2007 3:41 PM by Zilbermanyn

<a href=  ></a>

# re: Executing one workflow from another synchronously

Monday, November 12, 2007 3:41 PM by Zilbermanyn

<a href=  ></a>

# re: Executing one workflow from another synchronously

Monday, November 12, 2007 3:41 PM by Zilbermanyn

<a href=  ></a>

# re: Executing one workflow from another synchronously

Monday, November 12, 2007 3:41 PM by Zilbermanyn

<a href=  ></a>

# re: Executing one workflow from another synchronously

Monday, November 12, 2007 3:41 PM by Zilbermanwv

<a href=  ></a>

# re: Executing one workflow from another synchronously

Monday, November 12, 2007 3:41 PM by Zilbermanwv

<a href=  ></a>

# re: Executing one workflow from another synchronously

Monday, November 12, 2007 3:41 PM by Zilbermanwv

<a href=  ></a>

# re: Executing one workflow from another synchronously

Monday, November 12, 2007 3:42 PM by Zilbermanwv

<a href=  ></a>

# re: Executing one workflow from another synchronously

Monday, November 12, 2007 3:42 PM by Zilbermanwv

<a href=  ></a>

# re: Executing one workflow from another synchronously

Monday, November 12, 2007 3:42 PM by Zilbermanig

<a href=  ></a>

# re: Executing one workflow from another synchronously

Monday, November 12, 2007 3:42 PM by Zilbermanig

<a href=  ></a>

# re: Executing one workflow from another synchronously

Monday, November 12, 2007 3:42 PM by Zilbermanig

<a href=  ></a>

# re: Executing one workflow from another synchronously

Monday, November 12, 2007 3:42 PM by Zilbermanig

<a href=  ></a>

# re: Executing one workflow from another synchronously

Monday, November 12, 2007 3:42 PM by Zilbermanig

<a href=  ></a>

# re: Executing one workflow from another synchronously

Wednesday, November 14, 2007 5:13 AM by Zilbermandw

<a href=  ></a>

# re: Executing one workflow from another synchronously

Wednesday, November 14, 2007 9:44 PM by Zilbermanru

<a href=  ></a>

# re: Executing one workflow from another synchronously

Wednesday, November 14, 2007 9:44 PM by Zilbermanru

<a href=  ></a>

# re: Executing one workflow from another synchronously

Wednesday, November 14, 2007 9:44 PM by Zilbermanru

<a href=  ></a>

# re: Executing one workflow from another synchronously

Wednesday, November 14, 2007 9:44 PM by Zilbermangb

<a href=  ></a>

# re: Executing one workflow from another synchronously

Wednesday, November 14, 2007 9:44 PM by Zilbermantj

<a href=  ></a>

# re: Executing one workflow from another synchronously

Wednesday, November 14, 2007 11:41 PM by Alexbbm

<a href=  ></a>

# re: Executing one workflow from another synchronously

Wednesday, November 14, 2007 11:41 PM by Alexoat

<a href=  ></a>

# re: Executing one workflow from another synchronously

Thursday, November 15, 2007 2:50 PM by Zilbermanrc

<a href=  ></a>

# re: Executing one workflow from another synchronously

Thursday, November 15, 2007 2:50 PM by Zilbermanrc

<a href=  ></a>

# re: Executing one workflow from another synchronously

Thursday, November 15, 2007 2:50 PM by Zilbermanrc

<a href=  ></a>

# re: Executing one workflow from another synchronously

Thursday, November 15, 2007 2:50 PM by Zilbermanrc

<a href=  ></a>

# re: Executing one workflow from another synchronously

Thursday, November 15, 2007 2:50 PM by Zilbermanrc

<a href=  ></a>

# re: Executing one workflow from another synchronously

Thursday, November 15, 2007 2:50 PM by Zilbermanzg

<a href=  ></a>

# re: Executing one workflow from another synchronously

Thursday, November 15, 2007 2:50 PM by Zilbermanzg

<a href=  ></a>

# re: Executing one workflow from another synchronously

Thursday, November 15, 2007 2:50 PM by Zilbermanzg

<a href=  ></a>

# re: Executing one workflow from another synchronously

Thursday, November 15, 2007 2:50 PM by Zilbermanzg

<a href=  ></a>

# re: Executing one workflow from another synchronously

Thursday, November 15, 2007 2:51 PM by Zilbermanzg

<a href=  ></a>

# re: Executing one workflow from another synchronously

Thursday, November 15, 2007 2:51 PM by Zilbermanio

<a href=  ></a>

# re: Executing one workflow from another synchronously

Thursday, November 15, 2007 2:51 PM by Zilbermanio

<a href=  ></a>

# re: Executing one workflow from another synchronously

Thursday, November 15, 2007 2:51 PM by Zilbermanio

<a href=  ></a>

# re: Executing one workflow from another synchronously

Thursday, November 15, 2007 2:51 PM by Zilbermanio

<a href=  ></a>

# re: Executing one workflow from another synchronously

Thursday, January 10, 2008 9:27 AM by feechka-vp

<a href= http://index1.yritum.com >federal long shoreman act</a>

# re: Executing one workflow from another synchronously

Thursday, January 10, 2008 4:43 PM by feechka-ri

<a href= http://gener4.com >golden valley cabin rentals</a>

# re: Executing one workflow from another synchronously

Monday, September 29, 2008 7:58 PM by Craig

That does seem to be a problem with WF.  It is a shame that you can not determine at run time which you would like to process first.

Leave a Comment

(required) 
(required) 
(optional)
(required)