views:

73

answers:

1

I moved some variables into classes in my workflow.

Unfortunately, now the rules fail, I've been trying to set the Type, but keep getting this error.

Activity 'ifRequestComplete' validation failed: Property "Condition" has invalid value. Condition expression is invalid. The type name specified ("Request, ApprovalWorkflow") can not be resolved.

without the 'ns0:CodeTypeReferenceExpression Type=".."/>' I get this error

Activity 'ifRequestComplete' validation failed: Property "Condition" has invalid value. Condition expression is invalid. The field "gReq" on type "ApprovalWorkflow.ApprovalFlow" does not exist or is not accessible.

The Request class is created in the ApprovalWorkflow namespace in the same project as the workflow, also named ApprovalWorkflow.

namespace ApprovalWorkflow
{
    public class Request {...}
}

the .rules file contains this

 <RuleExpressionCondition Name="ifRequestComplete">
  <RuleExpressionCondition.Expression>
   <ns0:CodeBinaryOperatorExpression Operator="ValueEquality" xmlns:ns0="clr-namespace:System.CodeDom;Assembly=System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <ns0:CodeBinaryOperatorExpression.Left>
     <ns0:CodeFieldReferenceExpression FieldName="StatusCode">
      <ns0:CodeFieldReferenceExpression.TargetObject>
       <ns0:CodeFieldReferenceExpression FieldName="gReq">
        <ns0:CodeFieldReferenceExpression.TargetObject>
         <ns0:CodeTypeReferenceExpression Type="Request, ApprovalWorkflow" />
         <ns0:CodeThisReferenceExpression />
        </ns0:CodeFieldReferenceExpression.TargetObject>
       </ns0:CodeFieldReferenceExpression>
      </ns0:CodeFieldReferenceExpression.TargetObject>
     </ns0:CodeFieldReferenceExpression>
    </ns0:CodeBinaryOperatorExpression.Left>
    <ns0:CodeBinaryOperatorExpression.Right>
     <ns0:CodePrimitiveExpression>
      <ns0:CodePrimitiveExpression.Value>
       <ns1:String xmlns:ns1="clr-namespace:System;Assembly=mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">COM</ns1:String>
      </ns0:CodePrimitiveExpression.Value>
     </ns0:CodePrimitiveExpression>
    </ns0:CodeBinaryOperatorExpression.Right>
   </ns0:CodeBinaryOperatorExpression>
  </RuleExpressionCondition.Expression>
 </RuleExpressionCondition>

I've tried several different ways of writing the type "Request", "ApprovalWorkflow.Request", "ApprovalWorkflow.Request, ApprovalWorkflow", nothing seems to work.

Please help.

A: 

I figured it out, when modifying the underlying objects they changed from fields to properties and the resulting .rules file had to change accordingly.

Chad