Quantcast
Channel: Ivanti User Community : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 15294

Survey Required Calculation Help

$
0
0

Hi

 

We are using 7.6.1 upgraded from 7.4.  The Full Incident process from an OOTB install was transferred into our 7.6.1 during the upgrade, and at the time we had no requirements for Surveys so those bits were removed from the process.

 

Since then, there has been a u-turn with regards to surveys.  We will now be randomly sending out a survey invite, it's going to be a link to a survey developed in another system.  I've got the reminder setup correctly and it's passing over the incident reference number etc.  it's just the calculation for the decision that is causing me problems.

 

I've read through http://community.landesk.com/support/docs/DOC-26763 and http://community.landesk.com/support/docs/DOC-24969, which seem to make sense, i had a look at an OOTB system I found that our User object was missing the Do Not Survey attribute, so I have created this.

 

For purposes of testing, I have set the frequency to be 1 in 2 incidents will generate the survey:

 

import System

static def GetAttributeValue(Incident):

Frequency = 2

is_divisible = false

if Incident.RaiseUser != null:

  if Incident.RaiseUser._DoNotSurvey == null:

   is_divisible = (Incident.Id % Frequency == 0)

  if Incident.RaiseUser._DoNotSurvey != null:

   if Incident.RaiseUser._DoNotSurvey.ToString() == 'False':

    is_divisible = (Incident.Id % Frequency == 0)

return is_divisible

 

When an Incident reaches this part of the process, it generates this error:

 

There has been an unexpected error. Click Continue to return to the previous page.

There is an error in XML document (1, 1).

 

I altered the calculation, to try and strip out the part about Do No Survey, in at attempt to narrow it down.

 

import System

static def GetAttributeValue(Incident):

Frequency = 2

is_divisible = false

if Incident.RaiseUser != null:

   is_divisible = (Incident.Id % Frequency == 0)

return is_divisible

 

But I still get the same error as above, and the Show Details gives me this:

 

at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)

at Touchpaper.Framework.Data.SDataObjectRef.Parse(String xml)

at Touchpaper.Framework.Data.DataObject.ConvertValueFromString(DataType dataType, String value)

at Touchpaper.Framework.Data.DataObject.CompareConditionValues(DataType dataType, String valueString, Object attributeValue, ICondition condition)

at Touchpaper.Framework.Data.DataObject.EvaluateCalculationCondition(ICondition condition)

at Touchpaper.Framework.Data.DataObject.EvaluateCondition(ICondition condition, Boolean ignoreCalculationCondition)

at Touchpaper.Framework.Data.DataObject.ProcessLifecycleTransitionStep(ITransitionStep step, Object param1, Object param2, Boolean validateOnly, IList`1 automaticActionsList)

at Touchpaper.Framework.Data.DataObject.ProcessLifecycleTransitionStep(ITransitionStep step, Object param1, Object param2, Boolean validateOnly, IList`1 automaticActionsList)

at Touchpaper.Framework.Data.DataObject.ProcessLifecycleTransitionStep(ITransitionStep step, Object param1, Object param2, Boolean validateOnly, IList`1 automaticActionsList)

at Touchpaper.Framework.Data.DataObject.ProcessLifecycleTransitionStep(ITransitionStep step, Object param1, Object param2, Boolean validateOnly, IList`1 automaticActionsList)

at Touchpaper.Framework.Data.DataObject.ProcessLifecycleTransitionStep(ITransitionStep step, Object param1, Object param2, Boolean validateOnly, IList`1 automaticActionsList)

at Touchpaper.Framework.Data.DataObject.ProcessLifecycleTransitionStep(ITransitionStep step, Object param1, Object param2, Boolean validateOnly, IList`1 automaticActionsList)

at Touchpaper.Framework.Data.DataObject.ProcessLifecycleTransition(ITransition transition, Object param1, Object param2, Boolean validateOnly)

at Touchpaper.Framework.Data.DataObject.TriggerLifecycle(DataObject dataObjectRelated)

at Touchpaper.Framework.Data.DataObject.OnInserting(IDataObjectContext context)

at Touchpaper.Framework.Data.DataObjectContext.FireEvents(IList listToUpdate, IList listMutualDependencies, IDictionary`2 objectsProcessedPreviously)

at Touchpaper.Framework.Data.DataObjectContext.SaveChanges()

at Touchpaper.Web.Console.Controllers.ObjectController.SaveInternal(ObjectParameters parameters, Func`3 getObject)

at Touchpaper.Web.Console.Controllers.ObjectController.Apply()

at lambda_method(Closure , ControllerBase , Object[] )

at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)

at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)

at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.b__33()

at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()

at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()

at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()

at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()

at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.b__36(IAsyncResult asyncResult)

at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<>c__DisplayClass2a.b__20()

at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.b__22(IAsyncResult asyncResult)

 

Inner Exception: - Data at the root level is invalid. Line 1, position 1.

at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)

at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()

at System.Xml.XmlTextReaderImpl.ParseDocumentContent()

at System.Xml.XmlReader.MoveToContent()

at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderSDataObjectRef.Read14_dor()

 

My experience of using Calculations goes as far as doing some dynamic window work which went smoothly.  But I'm not experienced enough to make sense of the error message.

 

I'm assuming that i've made a glaring mistake (likely), or that something is missing from our 7.6.1 as we upgraded from 7.4.

 

Can anyone point me in the right direction.

 

Thanks

Pete


Viewing all articles
Browse latest Browse all 15294


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>