Sign in to follow this  

[.net] Annoying Workflow problem

This topic is 3299 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm having a problem with a workflow. I posted a question on the MSDN forums, but I'm yet to get a response, so I thought I'd try here. Here's a link to the post. and here's a quote of the original post (I posted a follow-up with a little more information, but it's not much):
Quote:
I'm working with XOML only workflows, and one of them seems to keep breaking. It's fairly simple, having 3 nested IfElse activities However, for some reason the mere existence of one of my custom activities within the 3rd (most nested) IfElse causes all other branches to throw this exception that says: System.InvalidOperationException: GetRuntimeValue failed since Path 'CommandInfo' evaluated to 'null' value. CommandInfo is one of the arguments passed to the workflow, and it is very much not null when it goes in to the workflow, particularly since it only thinks that it is null if I put anything in the 3rd IfElse. The workflow looks something like this:
if (condition1)
{
   if (condition2)
   {
      if (condition3)
     {
         activity4 // trouble
     }
     else
    {
       activity3
    }
   }
   else
   {
      activity2 // works
   }
}
else
{
   activity1 // works
}





Quote:
Activity1 and activity 2 work until activity's 3 or 4 exist. Once they do, everything throws that exception. I can't even hit breakpoints in any of the activities. I've tried and tried and tried to fix this, but I just don't see what the problem is.I have other workflows that do pretty much the same thing, and they don't have this problem. I've even tried deleting the workflow and re-writing it from scratch, but as soon as I implement the contents of the 3rd condition, using the same activities as in the other IfElse's, I get that exception. I've even tried running it with the condition on the IfElse, and that works fine, so I don't think it has anything to do with the condition, it's only as soon as I put the activity there, and then nothing works. I'll provide more information, or even paste the entire workflow and rules XML, if that will help. This is really aggrivating. Thank you.
I hope someone here can offer a little input, as I'm stumped. Thanks. EDIT: I decided to include the other post as well. It might hold the key to solving the problem:
Quote:
I'll try to provide some more information. All of my workflows derivce from the same base class, which contain a Boolean named Valid and a CommandInfo object named CommandInfo, both of which are passed in via an argument dictionary, and again CommandInfo is NOT null. This object just contains some information that the workflows process. None of the activities that I've mentioned use CommandInfo, but an activity at the top of the workflow and one within the highest IfElse do, and the other activities refer to the objects they create. The conditions look like this: !((MAILActivities.GetPlayerActivity)this.GetActivityByName("GetTargetPlayer")).Player.AreHandsFull() That works perfectly, except when I run into the problem that this thread is about. The full exception, complete with stack trace, can be viewed here: http://rafb.net/p/k3i1GQ60.html If anyone could please provide some insight as to what might be going wrong, how I can debug it, or at least what other pertenant information I can provide to help diagnose the problem, it would be most appreciated. This is causing a severe problem for me. Thank you. EDIT: "None of the activities that I've mentioned use CommandInfo," actually, I was wrong about that. Several of the activities do indeed use CommandInfo, and when I remove them from the third most IfElse, everything works. This is confusing, however, because using CommandInfo in any of the other branches works just fine.

Share this post


Link to post
Share on other sites

This topic is 3299 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this