3 Replies Latest reply on Apr 12, 2016 4:50 PM by Mark Moody

    Error in Request: There is an error in XML document (1, 1)

    Apprentice

      I am attempting to modify my request workflow so that only the Currently Assigned Analyst can click the process actions. To do this I've created a pre-condition that checks that the Current User is equal to the Assigned Analyst.

       

       

      This worked great for several status points in my workflow, but I have now reached a point where this pre-condition is no longer working and I am getting the error listed in the title ("There is an error in XML document (1, 1)).

       

      I turned on calculation logging to see if that would help me determine my problem, but I don't really know how to decipher the results.

      Calculation
      Lifecycle Condition Calculation Unsuccessful at 2016-04-12 13:18:59.672
      Calculation successful on Class Type [RequestManagement.Request]
      On Object : Key = [f073f57b-aa08-4f91-89a2-25527aaa4e47]  Name = [400030]
      Calculated Value = []
      FAILED
      Object reference not set to an instance of an object.

      Calculation
      Lifecycle Condition Calculation Unsuccessful at 2016-04-12 13:32:00.721
      Calculation successful on Class Type [RequestManagement.Request]
      On Object : Key = [f073f57b-aa08-4f91-89a2-25527aaa4e47]  Name = [400030]
      Calculated Value = []
      FAILED
      Object reference not set to an instance of an object.

      Calculation
      Lifecycle Condition Calculation Unsuccessful at 2016-04-12 13:34:03.174
      Calculation successful on Class Type [RequestManagement.Request]
      On Object : Key = [f073f57b-aa08-4f91-89a2-25527aaa4e47]  Name = [400030]
      Calculated Value = []
      FAILED
      Object reference not set to an instance of an object.

      Calculation
      Lifecycle Condition Calculation Unsuccessful at 2016-04-12 13:34:39.674
      Calculation successful on Class Type [RequestManagement.Request]
      On Object : Key = [f6fe1150-7fdf-4198-a7ae-62d55e59e08c]  Name = [400032]
      Calculated Value = []
      FAILED
      Object reference not set to an instance of an object.

      Calculation
      Lifecycle Condition Calculation Unsuccessful at 2016-04-12 13:34:43.518
      Calculation successful on Class Type [RequestManagement.Request]
      On Object : Key = [35dbd992-0849-4dbe-b96f-1be32c9b6158]  Name = [400031]
      Calculated Value = []
      FAILED
      Object reference not set to an instance of an object.

      Calculation
      Action Value Calculation Successful at 2016-04-12 13:46:05.832
      Calculation successful for Attribute [SendDate] on Class Type [RequestManagement.Reminder]
      On Object : Key = [22dbb069-c627-4ee9-bad5-d5b3708f58a0]  Name = [Update: Request {Id} has received Service Authorization]
      Calculated Value = [4/12/2016 5:46:05 PM]
      INFORMATION

      Calculation
      Action Value Calculation Successful at 2016-04-12 13:46:05.832
      Calculation successful for Attribute [SendDate] on Class Type [RequestManagement.Reminder]
      On Object : Key = [22dbb069-c627-4ee9-bad5-d5b3708f58a0]  Name = [Update: Request {Id} has received Service Authorization]
      Calculated Value = [4/12/2016 5:46:05 PM]
      INFORMATION

      Calculation
      Action Value Calculation Successful at 2016-04-12 13:46:05.847
      Calculation successful for Attribute [SendDate] on Class Type [RequestManagement.Reminder]
      On Object : Key = [5daeabf8-63ca-45a9-a558-247a473ee0e0]  Name = [Update: Request {Id} requires IT Authorization]
      Calculated Value = [4/12/2016 5:46:05 PM]
      INFORMATION

      Calculation
      Action Value Calculation Successful at 2016-04-12 13:46:05.863
      Calculation successful for Attribute [SendDate] on Class Type [RequestManagement.Reminder]
      On Object : Key = [5daeabf8-63ca-45a9-a558-247a473ee0e0]  Name = [Update: Request {Id} requires IT Authorization]
      Calculated Value = [4/12/2016 5:46:05 PM]
      INFORMATION

      Calculation
      Attribute Calculation Successful at 2016-04-12 13:46:06.191
      Calculation successful for Attribute [_CurrentAssignedAnalyst] on Class Type [RequestManagement.Request]
      On Object : Key = [f073f57b-aa08-4f91-89a2-25527aaa4e47]  Name = [400030]
      Calculated Value = []
      INFORMATION

      Calculation
      Attribute Calculation Successful at 2016-04-12 13:46:06.222
      Calculation successful for Attribute [_CurrentAssignedGroup] on Class Type [RequestManagement.Request]
      On Object : Key = [f073f57b-aa08-4f91-89a2-25527aaa4e47]  Name = [400030]
      Calculated Value = [Apps1-PST]
      INFORMATION

      Calculation
      Lifecycle Condition Calculation Unsuccessful at 2016-04-12 13:46:06.363
      Calculation successful on Class Type [RequestManagement.Request]
      On Object : Key = [f073f57b-aa08-4f91-89a2-25527aaa4e47]  Name = [400030]
      Calculated Value = []
      FAILED
      Object reference not set to an instance of an object.

       

      Keeping in mind that all of the successes occurred when I removed the calculation from the process at the status point of failure. What am I missing? Any help would be greatly appreciated.

        • 1. Re: Error in Request: There is an error in XML document (1, 1)
          Mark Moody Apprentice

          You need to change the IF statement to check for nulls.

           

          if Request.CurrentAssignment != null and Request.CurrentAssignment.User != null and Request.GetCurrentUserName().Lower() == Request.CurrentAssignment.User.Name.ToLower():

          • 2. Re: Error in Request: There is an error in XML document (1, 1)
            Apprentice

            Mark,

             

            The null worked. One small correction to the syntax is "if Request.CurrentAssignment != null and Request.CurrentAssignment.User != null and Request.GetCurrentUserName().ToLower() == Request.CurrentAssignment.User.Name.ToLower():"

             

            One more question: At the Fulfilled status point, we have a precondition already in place to make sure that All tasks are at an end state. Because a precondition can't flow to a precondition in this case, do you have any recommendations on how to use this precondition at the fulfilled status point?

             

            • 3. Re: Error in Request: There is an error in XML document (1, 1)
              Mark Moody Apprentice

              You would need to create a condition with code for both checking if the tasks are complete and if the currently logged in analyst is the assigned analyst.  You may want to consider allowing the currently assigned analyst or someone in the assigned group to perform the actions too.  What if the assigned analyst is out?  I usually add code to allow administrators to perform the action as well.  I believe I have examples of these and will post them up once I find them.