NullReferenceException in ResolveGrammarActivity
Has anyone tried to use the workflow dictionary in a grammar resolver? I know this used to work in ILM 2 RC0, but in FIM 2010 RC1, I'm getting a NullReferenceException. Here's the deal; I can write a parameter to the workflow dictionary, but when I try to use that in a ResolveGrammarActivity, I get the exception. Here's an example of adding myself to the workflow dictionary (WorkflowData): So far, so good. Now I try passing [//WorkflowData/JoeZamora] into the grammar resolver. Here's my debug log: 2010-01-25 17:18:10,477 --6-- DEBUG [Ensynch.FIM.Workflow.Activities.ChangeAttributeActivity] Source Class : System.Workflow.ComponentModel.Activity Source Instance : 7. Remove Joe from Group Members Source Method : RaiseEvent Current user : INFO\svc.fimws Passing these data into the ResolveGrammarActivity: NewGrammarExpression : [//WorkflowData/JoeZamora] NewResolvedExpression : NewWorkflowDictionaryKey : 2010-01-25 17:18:10,535 --6-- ERROR [Ensynch.FIM.Workflow.Activities.ChangeAttributeActivity] Source Class : System.Workflow.ComponentModel.ActivityExecutor`1[T] Source Instance : 7. Remove Joe from Group Members Source Method : HandleFault Current user : INFO\svc.fimws System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.ResourceManagement.WFActivities.Resolver.GetDisplayStringFromGuid(Guid id, String[] expansionAttributes) at Microsoft.ResourceManagement.WFActivities.Resolver.ReplaceGuidWithTemplatedString(Match m) at System.Text.RegularExpressions.RegexReplacement.Replace(MatchEvaluator evaluator, Regex regex, String input, Int32 count, Int32 startat) at System.Text.RegularExpressions.Regex.Replace(String input, MatchEvaluator evaluator) at Microsoft.ResourceManagement.WFActivities.Resolver.GetStringAttributeValue(Object attribute) at Microsoft.ResourceManagement.WFActivities.Resolver.ResolveEvaluatorWithoutAntiXSS(Match m) at Microsoft.ResourceManagement.WFActivities.Resolver.ResolveEvaluatorForBodyWithAntiXSS(Match m) at System.Text.RegularExpressions.RegexReplacement.Replace(MatchEvaluator evaluator, Regex regex, String input, Int32 count, Int32 startat) at System.Text.RegularExpressions.Regex.Replace(String input, MatchEvaluator evaluator) at Microsoft.ResourceManagement.WFActivities.Resolver.ResolveBody(String input) at Microsoft.ResourceManagement.Workflow.Hosting.ResolverEvaluationServiceImpl.ResolveLookupGrammar(Guid requestId, Guid targetId, Guid actorId, Dictionary`2 workflowDictionary, Boolean encodeForHTML, String expression) at Microsoft.ResourceManagement.Workflow.Activities.ResolveGrammarActivity.Execute(ActivityExecutionContext executionContext) at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext) at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(Activity activity, ActivityExecutionContext executionContext) at System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime) at System.Workflow.Runtime.Scheduler.Run() Hmmm, not a very helpful message. I'm pretty sure this is a bug, because ordinarily you try to handle NullReferenceExceptions in code that's exposed to the public.
January 26th, 2010 5:43am

Hi Joe, I am having some (possibly related) problems as well with WorkflowData, as described in this post: New manager approval . Cheers, Paolo Paolo Tedesco - http://cern.ch/idm
Free Windows Admin Tool Kit Click here and download it now
January 26th, 2010 6:02pm

This is similar to issues reported by other customers (e.g. https://connect.microsoft.com/site433/feedback/ViewFeedback.aspx?FeedbackID=523776&wa=wsignin1.0). We haven't been able to reproduce these in-house. It may be because the value of the workflow data is a GUID and the resolver is translating all GUIDs to DisplayNames, but in this case the GUID should be a valid object so I'm at a loss.
January 27th, 2010 9:32pm

Paolo, Indeed, converting references to List<UniqueIdentifier> fixed the problem. Thanks! Joe
Free Windows Admin Tool Kit Click here and download it now
October 29th, 2010 12:46pm

ResolveGrammarActivity is NOT supported http://msdn.microsoft.com/en-us/library/microsoft.resourcemanagement.workflow.activities.resolvegrammaractivity.aspxThe FIM Password Reset Blog http://blogs.technet.com/aho/
November 9th, 2010 12:07am

ResolveGrammarActivity is NOT supported http://msdn.microsoft.com/en-us/library/microsoft.resourcemanagement.workflow.activities.resolvegrammaractivity.aspxThe FIM Password Reset Blog http://blogs.technet.com/aho/
Free Windows Admin Tool Kit Click here and download it now
November 9th, 2010 12:07am

Is it going to be? I'd really like to use it.http://www.wapshere.com/missmiis
November 9th, 2010 2:19am

Sorry, that i don't know you will have to ask PSS for that. (or if you have contact with the WF team)The FIM Password Reset Blog http://blogs.technet.com/aho/
Free Windows Admin Tool Kit Click here and download it now
November 9th, 2010 2:35am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics