3 Replies Latest reply on Feb 15, 2018 12:32 PM by tpratt

    Process Calculation (Automatic Action) does NOT get last item in Notes Colection

    tpratt Apprentice

      I've entered this detail with support as well - but perhaps the community can help. I demonstrate what is occurring in the screen captures below; the very brief introduction is that our calculations are able to find ALL of the Notes for an Incident; with the exception of the Latest note added.


      The Process involved is quite simple - we are adding a Note to an Incident (via email) and want to capture the body of that email as feedback from the user. For the purpose of showing what is occurring, I have the calculation display the Time it Runs, and the Creation Date of each note in the collection (rather than guess if logic is somewho flawed in finding the right note - the calculation for debugging purposes simply tries to show every note that exists in the collection).


      So - the process involved:


      I can follow in the History ribbon that these actions run (see screen shots) - the Note is added and we can see the "Add Request Feedback" action runs - so the decision was able to process the new note:


      FYI: I know that the process is able to see the new Note - because the very first time thru (the 1st note) - we see that the process was able to determine the subject of the Note. This is a bit of a key clue to me - it demonstrates that "parts of LDSD" are able to see the data from the add note - it is used correctly by the decision!


      So - to see - I create the Incident new: In the following screen shot I see in the History that the "Ad Note" and then the "Add Request Feedback" actions were processed. And I see that there is only a single Note in the collection.

      Since my Calculation Displays the current Time and Incident number - and then the Creation Date/Time of every Note - I would expect to see my note there. In this next screen shot - I show the Feedback collection and there is NO evidence of a note existing:



      If I go into the Process designer - and run the calculation in Test mode - I will now see the latest note (i.e. by the time I do this the transaction involved has of course completed - and all notes are seen by the calculation. Notice in the screen shot below - the screen display shows the Note created at 11:39:02 (while the same calculation run from "within the transaction" did not find this note.


      More visual proof of what is happening? See the email I will send to add a 2nd set of feedback - in that email I can predict the Date/Time that will be produced by the calculation when I do run it. (humor now - I was too dumb to ad 5 hours for my manual time zone adjustment - so I predicted the hour incorrectly anyway!).


      Remember my humor - but when I look at the Incident now I will see a new note - but the Feedback Collection now has only the 1st note! We see below - there is a 2nd note added ... but the calculation result seen in the feedback finds only 1.


      See - the 2nd feedback had the predicted value for the only note.



      Lastly - I will once again manually run the calculation from Process designer - and it will return BOTH notes.



      So - if somehow LANDesk never saw the latest note I might be les confused - but it is very clear that within the process the latest note is available for that processing (specifically the Decision based on the note subject). But - something in the Transaction flow/commit is not allowing the calculation to see the latest item in the collection.


      Has anyone run into this? Is there a fix or workaround?



        • 1. Re: Process Calculation (Automatic Action) does NOT get last item in Notes Colection
          Julian Wigman ITSMMVPGroup

          This topic is all about timing and process execution order which Ivanti were meant to be looking at this year in 2018.x but I have just been informed that idea has now been dropped on the grounds of it being “Too Risky” at this time (for them).


          Whilst I can see maybe that the collection may not be updated yet for sue we know (.latest()) works.  Maybe you could set an object via this and add this to the list?  Did you try looping around the collection too to build up the list to sort instead on “bunging” it all in there in one go?  Just some ideas I’m throwing onto the table.



          MarXtar Ltd

          • 2. Re: Process Calculation (Automatic Action) does NOT get last item in Notes Colection
            tpratt Apprentice

            Thanks for the immediate thoughts. I can't remember specifically why - but I think I had issues some time back with .latest() - so for this purpose I planned to just sort the list and gram the most current. I ONLY need the latest - the reason my calculation is showing all the members is just to help me debug as I was a little "batty" initially and needed to prove to myself (and others) that I was not simply missing the note I needed!.


            I'll go back and look at using the built in method and see if I can get both "easier and correct" in a single pas. I wil update with the results - thanks much for the insight (Ivanti direction) and suggestion.



            • 3. Re: Process Calculation (Automatic Action) does NOT get last item in Notes Colection
              tpratt Apprentice



              That did the trick (using the .Latest() method vs. stepping thru the collection). I can't recall what I ran into sometime back that had me just decide to manage the full collection - but it does not matter. So - there is some bug (I'll let support know the resolution and the resolver!) related to timing issue; but I have what is required for my current process nees.


              Again - much appreciated!