Problems with Workflow Rule Set Editor dialog

J

John Bergdahl

Hello,

I have a problem with the rule set editor in some of my markup only
workflows. The problem happens both inside Visual Studio and in my custom
workflow editor application that is based on code from the book "Pro WF...
3.5" by Bruce Bukovics.

I use Visual Studio 2008 and .NET Framework 3.5 SP1.

In Visual Studio the following happens:
1. I select a policy activity and open the "Select Rule Set" dialog.
2. I select a rule set in the dialog and click Edit. Then the "Select Rule
Set" dialog closes, and nothing else happens.

When I do the same thing in my custom workflow editor application, instead
of the dialog just closing, I get the following exception:

System.NullReferenceException: Object reference not set to an instance of an
object.
at System.Workflow.Activities.Rules.Parser..ctor(RuleValidation validation)
at System.Workflow.Activities.Rules.Design.RuleSetDialog..ctor(Activity
activity, RuleSet ruleSet)
at
System.Workflow.Activities.Rules.Design.RuleSetBrowserDialog.OnEditInternal(Object currentRuleObject, Object& updatedRuleObject)
at System.Workflow.Activities.Rules.Design.BasicBrowserDialog.OnEdit(Object
sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button,
Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr
wparam, IntPtr lparam)

The code behind class is derived from SequentialWorkflowActivity...
class ApprovalSelectionWorkflow : SequentialWorkflowActivity...

The workflow markup...
<?xml version="1.0" encoding="utf-8"?><ns0:ApprovalSelectionWorkflow
PayrollInstance="{p1:Null}" Reason="{p1:Null}"
ApprovalWorkflowName="{p1:Null}" x:Name="ApprovalSelector"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/workflow"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:p1="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ns0="clr-namespace:personec.XRS.PrePayroll.Manager.Workflow;Assembly=Personec.XRS.PrePayroll.Manager,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<PolicyActivity x:Name="approvalPolicy">
<PolicyActivity.RuleSetReference>
<RuleSetReference RuleSetName="Rule Set1" />
</PolicyActivity.RuleSetReference>
</PolicyActivity>
</ns0:ApprovalSelectionWorkflow>

It works great for markup only workflows based on a class in assembly X, but
it doesn't work at all for worklows based on another class in assembly Y. All
required assemblies are in the correct path as far as I can see. Also,
executing the workflows seem to be no problem, just using the rule set
editor.

Help would be greatly appreciated.

Thank you in advance.
John Bergdahl

Crossposted on
http://social.msdn.microsoft.com/Fo...n/thread/f185bc76-1756-4a64-a7b0-e5403beedf6e
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top