index > Windows Workflow Foundation > Having a policy call an external method

Having a policy call an external method

Basically here's what I am trying to accomplish:

I have a state machine workflow, and after certain events are received, I want to be able to evaluate a rule set. In this rule set, I basically want :

if A then CallExternalMethod(...)
if B then CallExternalMethod(...)
if C then CallExternalMethod(...)

I am currently trying to use that in a policy but I can't call external methods from inside the rule set. One other possibility would be to encapsulate all those if statements in a custom activity that just contains a bunch of ifs...but I'm not sure how I would accomplish that... thoughts?



The .NET Addict - http://dotnetaddict.dotnetdevelopersjournal.com
Kevin Hoffman
Is CallExternalMethod() a static method on a referenced type?


Jurgen Willis - Program Manager - Windows Workflow Foundation
Jurgen Willis
Call external method is a stock workflow activity.



The .NET Addict - http://dotnetaddict.dotnetdevelopersjournal.com
Kevin Hoffman

So you want to execute a CallExternalMethod activity as a rule action?

There is not an out-of-the-box mechanism for doing this. However, you could accomplish this via a custom rule action. See this sample on our community site for an example:

http://wf.netfx3.com/files/folders/rules_samples/entry4623.aspx




Jurgen Willis - Program Manager - Windows Workflow Foundation
Jurgen Willis
reply 4

You can use google to search for other answers

 

More Articles

• Application on Client - Workflow on Server
• Double children after deserialize
• Help! a confused trouble about my cumstom activity.
• Custom/Preconfigured StateActivity
• How to persists a state machine workflow
• How can a replicator be used in a XOML only workflow?
• Message "Value cannot be NULL. Parameter name: component&quo...
• how to using different designer for respectivetly purpose?
• in rule condition editor how to input character "["
• A question about custom activity's property in composite case
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• Issues in installing Windows workflow fo
• Difference using WorkflowQueuingService
• This workflow,how can I present it using
• How one can create workflow project?
• With the delay to Vista and the resultin
• create WorkflowQueue
• Problem with CallExternalMethodActivity
• Composite activity design question
• Changing activities Id's
• InvokeWorkflowActivity error
• Persistence Store Changes on Beta 2.2?
• Web Service credentials
• Workflow Host Events not triggered
• How can a "fork" (parallel spl
• Supporting WCF Services through Activities

Hot Articles

• About "Custom Acitivity" prope
• Binding workflow parameters with activit
• Understanding XOML flexibility
• How do WWF-enabled processes synchronize
• Find Dynamically Added Activity
• Starting a WF from a WF
• Installed June CTP and now missing activ
• SqlTrackingQuery requries access to Types
• Change Title in Sequential Workflow
• DependencyProperty design time support
• WCF activities, in a Winform host applic
• Questions about my ASP.NET scenario
• Unable to do Response.Write("")
• WWF Bug(?) : Toolbox Items not showing....
• TrackData and Strings with Single Quotes

Recommend Articles

• hi james ,about your asp.net web apps
• How can a "fork" (parallel spl
• Adding Workflow to WinFX Project
• WorflowCompiler, rules and parameters
• Problem in ASP.NET's Global.asax with Ju
• Modifyable code in Custom Activity
• Custom Workflow Designer wishlist
• Workflow Monitor from asp.net
• web service exposed workflow
• What happens to running workflows when t
• non vs2005 compilation
• Locking WorkflowInstance
• SQLPersitence question
• query regarding displaying errors
• small problem