locked
Having a policy call an external method RRS feed

  • Question

  • 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?
    Wednesday, October 4, 2006 3:42 PM

Answers

All replies

  • Is CallExternalMethod() a static method on a referenced type?
    Wednesday, October 4, 2006 3:45 PM
  • Call external method is a stock workflow activity.
    Wednesday, October 4, 2006 3:48 PM
  • 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 

    Wednesday, October 4, 2006 7:33 PM