locked
Service Manager 2012 R2 - Workflow Error - Event ID 4513 RRS feed

  • Question

  • Hi,

    We started to suffer a Workflow error in Service Manager 2012 R2 2 weeks ago. We noticed through the failure of some SLOs not being applied on Work Items. The error is the follow:

    Log Name:      Operations Manager

    Source:        HealthService

    Date:          13/03/2014 12:10:00

    Event ID:      4513

    Task Category: Health Service

    Level:         Error

    Keywords:      Classic

    User:          N/A

    Computer:      XXX-XXX-XXX

    Description:

    The callback method DeliverDataToModule failed with exception "'­', hexadecimal value 0x1F, is an invalid character." in the module Microsoft.EnterpriseManagement.SystemCenter.Subscription.WindowsWorkflowWriteAction.

     

    Workflow: WorkItem_SetFirstAssingedTo_RelationhsipAdd_Rule

    Instance: Destino do Fluxo de Trabalho (interno)

    Instance ID: {383E578B-E1C9-2802-0047-815853405778}

    Management Group: CTRPROD

    Full Exception Text:

     System.ArgumentException: '­', hexadecimal value 0x1F, is an invalid character.

       at System.Xml.XmlEncodedRawTextWriter.InvalidXmlChar(Int32 ch, Char* pDst, Boolean entitize)

       at System.Xml.XmlEncodedRawTextWriter.WriteElementTextBlock(Char* pSrc, Char* pSrcEnd)

       at System.Xml.XmlEncodedRawTextWriter.WriteString(String text)

       at System.Xml.XmlWellFormedWriter.WriteValue(String value)

       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeAndVerifyType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, Boolean verifyKnownType, RuntimeTypeHandle declaredTypeHandle, Type declaredType)

       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithXsiType(XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle objectTypeHandle, Type objectType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle, Type declaredType)

       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)

       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerializeReference(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)

       at WriteArrayOfanyTypeToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , CollectionDataContract )

       at System.Runtime.Serialization.CollectionDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context)

       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)

       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerializeReference(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)

       at WriteResultToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , ClassDataContract )

       at System.Runtime.Serialization.ClassDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context)

       at System.Runtime.Serialization.DataContractSerializer.InternalWriteObjectContent(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)

       at System.Runtime.Serialization.DataContractSerializer.InternalWriteObject(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)

       at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)

       at System.Runtime.Serialization.DataContractSerializer.WriteObject(XmlWriter writer, Object graph)

       at Microsoft.EnterpriseManagement.SystemCenter.Subscription.DataItemSubscription.GenerateItemXml(XmlWriter writer)

       at Microsoft.EnterpriseManagement.HealthService.DataItemBase.GenerateItemXmlInternal()

       at Microsoft.EnterpriseManagement.HealthService.DataItemBase.GetItemXml()

       at Microsoft.EnterpriseManagement.HealthService.DataItemBase.QueryItem(XPathExpression xpathQuery)

       at Microsoft.EnterpriseManagement.SystemCenter.Subscription.TokenReplaceWindowsWorkflowTaskParameterValue.TokenResolver(String tokenValue)

       at Microsoft.EnterpriseManagement.SystemCenter.Subscription.TokenResolver.RegexMatchEvaluator(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.EnterpriseManagement.SystemCenter.Subscription.TokenResolver.Resolve(String str)

       at Microsoft.EnterpriseManagement.SystemCenter.Subscription.TokenReplaceWindowsWorkflowTaskParameterValue.GenerateWindowsWorkflowTaskParameterValue(String elementTemplate)

       at Microsoft.EnterpriseManagement.SystemCenter.Subscription.WindowsWorkflowTaskParameterValue.Resolve(TokenReplaceWindowsWorkflowTaskParameterValue resolver)

       at Microsoft.EnterpriseManagement.SystemCenter.Subscription.WindowsWorkflowTaskArrayParameter.Resolve(TokenReplaceWindowsWorkflowTaskParameterValue resolver)

       at Microsoft.EnterpriseManagement.SystemCenter.Subscription.WindowsWorkflowTask.Resolve(DataItemBase[] dataItems)

       at Microsoft.EnterpriseManagement.SystemCenter.Subscription.WindowsWorkflowWriteAction.ProcessDataItems(DataItemBase[] dataItems)

       at Microsoft.EnterpriseManagement.SystemCenter.Subscription.WindowsWorkflowWriteAction.OnNewDataItems(DataItemBase[] dataItems, Boolean isLogicalSet, DataItemAcknowledgementCallback acknowledgedCallback, Object acknowledgedState, DataItemProcessingCompleteCallback completionCallback, Object completionState)

       at Microsoft.EnterpriseManagement.HealthService.Internal.InputPortCallbacks.InputStreamBatchedAcknowledgedCallbackHandler`1.InputPortCallbackImplementation(DataItemBase[] dataItems, Boolean isBatchLogicalSet, DataItemAcknowledgementCallback acknowledgementCallback, DataItemProcessingCompleteCallback completionCallback)

       at Microsoft.EnterpriseManagement.HealthService.Internal.ModuleContainer`1.Microsoft.EnterpriseManagement.HealthService.Internal.IModuleContainer.DeliverDataToModule(UInt32 inputPortNumber, DataItemBase[] dataItems, Boolean isBatchLogicalSet, DataItemAcknowledgementCallback acknowledgementCallback, DataItemProcessingCompleteCallback completionCallback)

       at Microsoft.EnterpriseManagement.HealthService.Internal.ManagedHostHelper.Microsoft.EnterpriseManagement.HealthService.Internal.IManagedHostHelper.DeliverBatchedDataToModule(UInt32 inputPortNumber, Object moduleInputReference, DataItemBase[] dataItems, UInt32 dataItemCount, Boolean isBatchLogicalSet, Object completionReference)

    Event Xml:

    <Event xmlns='http://schemas.microsoft.com/win/2004/08/events/event'><System><Provider Name='HealthService'/><EventID Qualifiers='49152'>4513</EventID><Level>2</Level><Task>1</Task><Keywords>0x80000000000000</Keywords><TimeCreated SystemTime='2014-03-13T15:10:00.000000000Z'/><EventRecordID>4953905</EventRecordID><Channel>Operations Manager</Channel><Computer>CTR-SCSM-MS01.sp.local</Computer><Security/></System><EventData><Data>CTRPROD</Data><Data>WorkItem_SetFirstAssingedTo_RelationhsipAdd_Rule</Data><Data>Destino do Fluxo de Trabalho (interno)</Data><Data>{383E578B-E1C9-2802-0047-815853405778}</Data><Data>DeliverDataToModule</Data><Data>'­', hexadecimal value 0x1F, is an invalid character.</Data><Data>Microsoft.EnterpriseManagement.SystemCenter.Subscription.WindowsWorkflowWriteAction</Data><Data>System.ArgumentException: '­', hexadecimal value 0x1F, is an invalid character.

       at System.Xml.XmlEncodedRawTextWriter.InvalidXmlChar(Int32 ch, Char* pDst, Boolean entitize)

       at System.Xml.XmlEncodedRawTextWriter.WriteElementTextBlock(Char* pSrc, Char* pSrcEnd)

       at System.Xml.XmlEncodedRawTextWriter.WriteString(String text)

       at System.Xml.XmlWellFormedWriter.WriteValue(String value)

       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeAndVerifyType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, Boolean verifyKnownType, RuntimeTypeHandle declaredTypeHandle, Type declaredType)

       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithXsiType(XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle objectTypeHandle, Type objectType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle, Type declaredType)

       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)

       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerializeReference(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)

       at WriteArrayOfanyTypeToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , CollectionDataContract )

       at System.Runtime.Serialization.CollectionDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context)

       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)

       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerializeReference(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)

       at WriteResultToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , ClassDataContract )

       at System.Runtime.Serialization.ClassDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context)

       at System.Runtime.Serialization.DataContractSerializer.InternalWriteObjectContent(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)

       at System.Runtime.Serialization.DataContractSerializer.InternalWriteObject(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)

       at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)

       at System.Runtime.Serialization.DataContractSerializer.WriteObject(XmlWriter writer, Object graph)

       at Microsoft.EnterpriseManagement.SystemCenter.Subscription.DataItemSubscription.GenerateItemXml(XmlWriter writer)

       at Microsoft.EnterpriseManagement.HealthService.DataItemBase.GenerateItemXmlInternal()

       at Microsoft.EnterpriseManagement.HealthService.DataItemBase.GetItemXml()

       at Microsoft.EnterpriseManagement.HealthService.DataItemBase.QueryItem(XPathExpression xpathQuery)

       at Microsoft.EnterpriseManagement.SystemCenter.Subscription.TokenReplaceWindowsWorkflowTaskParameterValue.TokenResolver(String tokenValue)

       at Microsoft.EnterpriseManagement.SystemCenter.Subscription.TokenResolver.RegexMatchEvaluator(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.EnterpriseManagement.SystemCenter.Subscription.TokenResolver.Resolve(String str)

       at Microsoft.EnterpriseManagement.SystemCenter.Subscription.TokenReplaceWindowsWorkflowTaskParameterValue.GenerateWindowsWorkflowTaskParameterValue(String elementTemplate)

       at Microsoft.EnterpriseManagement.SystemCenter.Subscription.WindowsWorkflowTaskParameterValue.Resolve(TokenReplaceWindowsWorkflowTaskParameterValue resolver)

       at Microsoft.EnterpriseManagement.SystemCenter.Subscription.WindowsWorkflowTaskArrayParameter.Resolve(TokenReplaceWindowsWorkflowTaskParameterValue resolver)

       at Microsoft.EnterpriseManagement.SystemCenter.Subscription.WindowsWorkflowTask.Resolve(DataItemBase[] dataItems)

       at Microsoft.EnterpriseManagement.SystemCenter.Subscription.WindowsWorkflowWriteAction.ProcessDataItems(DataItemBase[] dataItems)

       at Microsoft.EnterpriseManagement.SystemCenter.Subscription.WindowsWorkflowWriteAction.OnNewDataItems(DataItemBase[] dataItems, Boolean isLogicalSet, DataItemAcknowledgementCallback acknowledgedCallback, Object acknowledgedState, DataItemProcessingCompleteCallback completionCallback, Object completionState)

       at Microsoft.EnterpriseManagement.HealthService.Internal.InputPortCallbacks.InputStreamBatchedAcknowledgedCallbackHandler`1.InputPortCallbackImplementation(DataItemBase[] dataItems, Boolean isBatchLogicalSet, DataItemAcknowledgementCallback acknowledgementCallback, DataItemProcessingCompleteCallback completionCallback)

       at Microsoft.EnterpriseManagement.HealthService.Internal.ModuleContainer`1.Microsoft.EnterpriseManagement.HealthService.Internal.IModuleContainer.DeliverDataToModule(UInt32 inputPortNumber, DataItemBase[] dataItems, Boolean isBatchLogicalSet, DataItemAcknowledgementCallback acknowledgementCallback, DataItemProcessingCompleteCallback completionCallback)

       at Microsoft.EnterpriseManagement.HealthService.Internal.ManagedHostHelper.Microsoft.EnterpriseManagement.HealthService.Internal.IManagedHostHelper.DeliverBatchedDataToModule(UInt32 inputPortNumber, Object moduleInputReference, DataItemBase[] dataItems, UInt32 dataItemCount, Boolean isBatchLogicalSet, Object completionReference)</Data></EventData></Event>

    Has anybody faced the same problem?

    Thanks

    Thiago

    Thursday, March 13, 2014 7:24 PM

Answers

  • Hotfix for this issue is now available. The next UR for R2 will make it generally available. In the meanwhile, feel free to reach out to your support rep if you'd like to get access to the fix.

    • Proposed as answer by AndersAsp Monday, June 2, 2014 11:50 AM
    • Marked as answer by AndersAsp Wednesday, June 4, 2014 7:32 AM
    Monday, June 2, 2014 5:53 AM

All replies

  • So decyphering your exception text, it looks like the workflow "WorkItem_SetFirstAssingedTo_RelationhsipAdd_Rule" is throwing an exception "hexadecimal value 0x1F, is an invalid character." When attempting to populate the write action parameters. (" at Microsoft.EnterpriseManagement.SystemCenter.Subscription.WindowsWorkflowTaskArrayParameter.Resolve())

    WorkItem_SetFirstAssingedTo_RelationhsipAdd_Rule isn't one of the out-of-the-box workflows, so i assume this is a case of you or your consulting firm writing some custom automation in order to set a custom relationship, and either one of the parameters has a (us) character (ASCII Code 0x1F is "Unit Seperator", which is an archaic field delimiter) in them, and the XML can't handle it, or there actually is a (us) in the MPXML somewhere, probably inserted by a text editor or something. 

    Check the MP XML first; figure out what MP contains that workflow, export it, and edit it with a text editing program that can display non-printing characters (Notepad2-mod is my personal favorite, http://xhmikosr.github.io/notepad2-mod/), and see if you can trim out that character. If it's not in the MPXML, you need to look at the workflow parameters and see if there is a work item property that might have one of these characters in it. 

    Thursday, March 13, 2014 8:02 PM
  • Hi Thomas,

    Thanks for your response. I understood your comments but, the system was running fine for about 3 months. No changes have been applied during this time and suddenly this error pops out.

    I opened a case with MS Support, but they applied a WA which does not resolve our problem, because the error appears after a few days later after the WA procedure.

    The WA is just a watermark reset using this SQL query:

    DECLARE @MaxTransactionId Int, @RuleID uniqueidentifier

    SET @RuleID = '' -- <-- SET THIS TO YOUR RULE ID!!!

    SET @MaxTransactionId = (SELECT MAX(EntityTransactionLogId) FROM EntityTransactionLog) 

    UPDATE CmdbInstanceSubscriptionState

    SET State = @MaxTransactionId

    WHERE RuleId = @RuleID

    The problem with this WA is that all Work Items affected by the problem - workflows not being applied - do not get the information we need to identify all the SLA's. The system just "forget" them and moves on.

    Cheers,

    Thiago

    Monday, March 17, 2014 5:06 PM
  • Hotfix for this issue is now available. The next UR for R2 will make it generally available. In the meanwhile, feel free to reach out to your support rep if you'd like to get access to the fix.

    • Proposed as answer by AndersAsp Monday, June 2, 2014 11:50 AM
    • Marked as answer by AndersAsp Wednesday, June 4, 2014 7:32 AM
    Monday, June 2, 2014 5:53 AM
  • Hi Nangia,

    Which UR fixed the above problem, one of my customer is facing the same issue.

    Regards


    Antoine AL Ibry

    Wednesday, June 17, 2015 12:46 PM
  • Buenas tardes,

    En el momento se realiza un upgrade de la herramienta SCOM CU3 para 2016 y la falla continua, al tratar de monitorear maquinas con S.O Windows Server 2003 R2, la solución informada no aplica

    Thursday, November 2, 2017 8:06 PM