6 Replies Latest reply on Sep 20, 2011 11:39 AM by SBW

    Using user object as value type in child tickets from another module

    ProServices
      Im hoping this can be done but inside Service Desk, I'm going over our New Hire process. The user will initially kick off a new Activity process, which will kick off several service request processes automatically based off the information they choose on the window. This is version 7.4
      What Im doing right now is someone is entering the employees information on a window like first name, last name, etc...
      I take that info and use Process Automation manager to create an Active Directory account, and I use an Automatic action to create a LANDesk user account.
      What I want to do is use that same info to populate the request that Im creating automatically after creating the LANDesk user account.
      My question is the process is within Activity in the HR module, and Im creating Request in the Request management module.  Request and Activity are linked, but I cant see to populate the User object on Request using a value type pointing back to the Activity and the user created there.  It just pretty much wont let me choose the object of user type that I've dragged and dropped onto Activity.

       

      I've tried creating a new business object called Child Activity Request User on Activity and dropped User on that, but even the User object on that cannot be used as a Value type on the subsequent requests.

        • 1. Re: Using user object as value type in child tickets from another module
          ProServices

          Ok, so far I have tried multiple options with no luck. Keep in mind that there is a relationship between Activity and Request, and when I create a request from Activity, Im trying to populate the "Requested For:" User object populate with the information from the User created on Activity.  The point is to make the User associated with the Services that are requested when creating a New Hire.

           

          So I've put a collection of User on Request and tried to apply a Filter I created that Filters user by Activity which did not work because I am not able to apply a filter when I select that collection and the attributes aren't available.

           

          I also am unable to apply a Business Copy rule because I do not believe copying one user Object to another is possible between modules(HR and Request Mgmt).

           

          I have tried a calculation with the value type, but the only attributes available to me are the attributes and objects on the process.

           

          So now I have dragged User onto Request, and renamed it Created Activity user and Im using a calculation that points to the object which is the created user on Activity and made the dependencies point to Creation date on Request in an effort to get this to populate.  Can anyone shed some light on whether this is possible or not?

          • 2. Re: Using user object as value type in child tickets from another module
            ProServices

            So now, Im trying to do this with an End User object on Activity.  What I've done is not made a collection but a one-to-one relationship between both End User and Activity.  

            • 3. Re: Using user object as value type in child tickets from another module
              aparker Employee

              Hi,

               

              I've been meaning to get to put something up against your post as I think this should be a straightforward design to implement. It would be good to get some screen shots around the design, but as a first observation, I have these thoughts...

               

              First, did you create the relationship between Activity and Request or are you using the built in Add Create Detach functionality?

               

              Second, as a general rule when wanting to use value types and relationships between objects and especially Group and User objects, always (and I do mean always) create the list and relationships using the base User and Group object and not the sub-classes associated with them. Value types in particular really don't appreciate trying to link between different sub-classes.

               

              Please let us have more info and let me know about my comments. As I said, this shouldn't be too difficult and I'm concerned that you may be getting yourself tied in a few knots you don't need to be!

               

              Andy

              1 of 1 people found this helpful
              • 4. Re: Using user object as value type in child tickets from another module
                ProServices

                In the first screenshot I've showed the process, in the second you can see the options I have for setting a value type in the "Requested For" field on the automatic action to create a request.  I can drill down into the relationship of Activity on Request, but selecting the object I used to create the "Create LANDesk user" is not an option.  There is also a collection of user on Request and I cannot choose that and apply a filter based on User filtered by Activity...

                 

                The relationship between Activity and Request is one that I created. The object I used to create the LANDesk user account action is Created LANDesk User which is actually End User dragged on to Activity.

                 

                Im going to try dropping User on to Activity quickly and creating an action to create the LANDesk account from that and see if I can then use that object as a value type instead.

                 

                Is it possible to use a value type on a related object though?  I thought it was possible to do since if I create a problem from Incident, I can use the Raise User object on Incident to populate who the Problem was created by, but is Raise User a top level object like you mentioned and not a sub class type?

                 

                edit:  I should've specified that the Requested For option is on a Create Request action created off a request object.

                • 5. Re: Using user object as value type in child tickets from another module
                  ProServices

                  I tried to use the Manager object off of Activity because that was base User and I received an error when the automatic action kicked off.

                   

                   

                  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.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.DataObjectContext.TriggerOneToManyRelatedLifecycle(DataObject dataObject, IAttributeType attType)
                  at Touchpaper.Framework.Data.DataObjectContext.TriggerRelatedLifecycles(DataObject dataObject)
                  at Touchpaper.Framework.Data.DataObjectContext.ProcessLifecycleAction(DataObject dataObject, IBusinessFunction function, Object param1, Object param2, Boolean isAutomatic, Boolean validateOnly)
                  at Touchpaper.Framework.Data.DataObjectContext.ProcessBusinessFunction(FunctionInvocation functionInvocation, Boolean isAutomatic, Boolean validateOnly)
                  at Touchpaper.Framework.Data.DataObjectContext.ProcessBusinessFunctions()
                  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.ControllerActionInvoker.<>c__DisplayClassd.b__a()
                  at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
                  at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
                  at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
                  at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
                  at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
                  at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)

                  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()

                   

                  • 6. Re: Using user object as value type in child tickets from another module
                    ProServices

                    Hey Andy,

                     

                    I wanted to follow up and say thank you for that second piece of information you suggested because that has proven to be invaluable in terms of processes I did later on. 

                     

                    I was unfortunately unable to get what I wanted out of this process though so it had to be split into two separate processes.  I spoke with support and unfortunately there is no way to create an End User account within the system through an automatic action and then reference that person in other automatic actions later on in the process.  A user object must be added to a window and selected in some way by a user to reference that person later in other automatic actions later on.