Aracılığıyla paylaş


Programming Considerations for Rules

Rules are very extensible and provide a lot of functionality; however, there are some aspects of rules programming that you should take into consideration. They are as follows:

  • Property values of a struct that are updated inside of a rule action are not reflected outside of that rule. This is because the struct values are copied by value and the rule action would modify the copy, not the original value in the struct.

  • When casting a decimal, double, or a float datatype to an int datatype, values are rounded up. This behavior is different from C# behavior where values are truncated instead of rounded. Calling Math.Ceiling or Math.Floor on the value will effectively truncate the value.

  • Using generic types at design-time is not supported unless you define the generic type in a separate project and call it from within your workflow project.

See Also

Concepts

Using RuleSets in Workflows