Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
PolicyActivity Class
Collapse the table of content
Expand the table of content

PolicyActivity Class

Represents a collection of Rule class instances to be run as part of a workflow's execution as a single step/activity.

Namespace: System.Workflow.Activities
Assembly: System.Workflow.Activities (in system.workflow.activities.dll)

public sealed class PolicyActivity : Activity
public final class PolicyActivity extends Activity
public final class PolicyActivity extends Activity
Not applicable.

The following code example demonstrates how to create a new instance of the PolicyActivity class and set its properties. This code example is part of the RuleActionTrackingEventSample SDK sample from the SimplePolicyWorkflow.designer.cs file. For more information, see RuleActionTrackingEvent Sample.

this.CanModifyActivities = true;
System.Workflow.Activities.Rules.RuleSetReference rulesetreference1 = new System.Workflow.Activities.Rules.RuleSetReference();
this.simpleDiscountPolicy = new System.Workflow.Activities.PolicyActivity();
// simpleDiscountPolicy
this.simpleDiscountPolicy.Name = "simpleDiscountPolicy";
rulesetreference1.RuleSetName = "DiscountRuleSet";
this.simpleDiscountPolicy.RuleSetReference = rulesetreference1;
// SimplePolicyWorkflow
this.Name = "SimplePolicyWorkflow";
this.Completed += new System.EventHandler(this.WorkflowCompleted);
this.CanModifyActivities = false;

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

© 2015 Microsoft