index > Windows Workflow Foundation > Check For Existing WorkflowRuntime In Current AppDomain And More

Check For Existing WorkflowRuntime In Current AppDomain And More

Hi,

Is there a way to check whether WorkflowRuntime instance exists in the appdomain?

And if it is, is there a way to get reference to the instance?

In some terms, I'd like to see the WorkflowRuntime as a service provided by hosting application (whatever it is). So, a component that starts a workflow is not the one that enables its execution ( = creates a host for workflows).

Thanks,

Mark

Mark Goldstein

As far as I know the only way to test if there is a WorkflowRuntime in your AppDomain is to try to create an instance. You will receive an InvalidOperationException if there is already one in the AppDomain.

And the only way I know of to get a reference to the existing instance is for your host application to keep one in a well known place. For example, the ASP.NET samples keep a reference to the WorkflowRuntime instance in the WorkflowWebRequestContext system type.

You can grab the ASP.NET sample at www.windowsworkflow.net.

Cheers,
Paul




Workflow Product Manager. This posting is provided "AS IS" with no warranties, and confers no rights
Paul Andrew

Paul,

I'm very curious regarding your vision of workflows integration into business layers of enterprise systems.

What actually would be a host for WorkflowRuntime? I expected that your team should provide more convenient way to control the lifetime of WorkflowRuntime object.

Ok, it's not that big deal to solve this issue - it looks like everybody who's making few steps away of the Samples will have to do it.

The model with 1 WorkflowRuntime object per appdomain is clear and great when you execute workflows from console application or winforms application.

But when workflows should be launched right behind the service interfaces layer it becomes complicated. At least, it looks that way to me.

Can you elaborate regarding some design considerations that you think should be taken while developing/integrating workflows into business logic layer?

Thanks,

Mark

Mark Goldstein
reply 3

You can use google to search for other answers

 

More Articles

• Validation of Declarative Rule Condition fails in Designer Hostin...
• CreateWorkflow with xml reader is giving validation exception
• Beta 2.2. Upgrade issue
• idle state
• Persistenced Workflow Instances
• So where are we Indigo (WCF) and Workflow (WWF) integration ?
• Using RuleConditions on Designer Hosted Apps
• Workflow Activities for MSBuild Tasks and embedded designer for V...
• WF Deployment in SharePoint Portal 2007
• BizTalk Sever 2006
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• build failure
• Filtering persisted instances on state a
• Beta2 - CallExternalMethod vs InvokeMeth
• Updating Workflow
• Designer embedded in ASP.NET page
• State machine workflows and transactions
• BPEL-compatible Workflow-Engine with WWF?
• WF StateMachine with forward and back se
• Message "Value cannot be NULL. Para
• Workflow arrows not showing up - what's
• make a simple ASP.Net workflow
• Select Approver - activity
• Problem with Workflows and WebServices
• Workflow xoml file reading using XamlRea
• WF custom persistence once again

Hot Articles

• Raising events to State Machine workflow
• how to disallow free-form entry in prope
• simple performance question
• Would this be a useful technology for th
• Any Utils Available To Sync Activities W
• Missing Condition Error
• Anything new in the July CTP?
• Two questions on hydration/dehydration
• Problem generating default childs on cus
• The method "GetWorkflowDefinition&q
• I have to have Idingo to put the Expense
• Missing WorkFlow Project Templete!!!
• hosting designer, deactivate "Views
• ifElseActivity Condition Expression Refe
• asp.net error continues in the RC versio

Recommend Articles

• Dynamically load policyActivity ruleSet
• How to get the list of Running Instances?
• WorkflowWebRequestContext in Beta 2.2
• Workflow Runtime Webservice Wrapper
• Compact Framework
• ActivityBind and it's ID property
• Creating execution contexts/running clos
• Workflow at presentation layer
• WorkflowDefinition
• Serializable EventArgs
• Painting activity with WPF?
• How to connect Biztalk server and Window
• IfElse CodeCondition with ActivityBind
• Problem with Drag & Drop
• Interrupt State execution in State Machi