2 Replies Latest reply on Aug 15, 2012 6:40 PM by mmorales

    Can't access a related Change # in an Incident Resolution

    Expert

      I have a fairly simple process segment that uses data from an incident to create a Change Control.  Everything works as intended and the calculations were ugly but worked amazingly well.  The formatting was complex but you could not tell it came from an incident, really looks nice.  However, the really simple part of automatically resolving the incident at the same time has been incredibly difficult.  The resolution does resolve the incident and the process continues along great.  Then my boss decides he wants to see the Change number in the resolution.  So I thought this would be no problem, after making the change work I thought I could do anything.  Well, I was wrong. 

      .process.png

      I took two approaches.  First I tried a standard text approach and imbedded the links to the data like I have done hundreds of times.  After a few failed attempts I tried just listing every possible combo:

       

      This incident has been resolved.  A Change Control has been created.  Further progress and approvals will be tracked on the Change Control.  You will receive an email when the firewall has been updated.
      <br>
      <br>
      {Incident/IncidentChanges/Change/IncidentId}<br>
      {IncidentChanges/Change/IncidentId}<br>
      {Change/IncidentId}<br>
      {IncidentId}<br>
      {Incident/_IncidentChanges/_Change/_IncidentId}<br>
      {IncidentChanges/_Change/_IncidentId}<br>
      {Change/_IncidentId}<br>
      {IncidentId}<br>
      {Incident/IncidentChanges/Change/_IncidentId}<br>
      {IncidentChanges/Change/_IncidentId}<br>
      {Resolution/Incident/IncidentChanges/Change/IncidentId}
      

       

      {IncidentChanges/Change/IncidentId} was the only one that did not show up exactly as you see above meaning it is a valid reference which I expected.  However, the value it showed was blank and not the Change Number.

       

      Then I tried a calculation like I was using in my Create Change:

       

      import System
      static def GetAttributeValue(Change):
           for A in Change.IncidentChanges:
                Value = 'This incident has been resolved.  A Change Control (' + A.Change.IncidentId + ') has been created.  Further progress and approvals'
                Value += ' will be tracked on the Change Control.  You will receive an email when the firewall has been updated.'
           return Value
      

       

      The above returned no value at all.  I had thought that maybe the value was not written to the database yet and therefore the value would be blank since nothing existed yet.  In my process I added a status point between the green boxes and a precondition of always true so it never stopped but thought it would force a save of data.  Again I was wrong, it had no effect at all.  I contacted support and they said it should work.  I seem to be missing something.  Certainly someone must be doing something very similar and knows the secret to make this work.

        • 1. Re: Can't access a related Change # in an Incident Resolution
          dmshimself ITSMMVPGroup

          Carl - I've had this type of issue, or it sounds like it.  I had a sequence of automatic operations in a process and this included an automatic assignment. I wanted to send an email that last assignment.  It always sent an email to the assigment present before the process sequence started.  In the end the only way I could get round this was to let the process get to a natural status where only a manual action was available.  At that point the assignment (and in your case the change) has been committed to the DB.  I then had a scheduled job which kicked the process every 15 mins if it reached that state.  The kicking invoked the manual action.  Any reminders sent then went to the right place.

           

          So I think your thought was right.  Actions in a sequence don't (in my experience) get commited until the process engine reaches an end point.

           

          It would be easy to try out.

          • 2. Re: Can't access a related Change # in an Incident Resolution
            Expert

            Try this as a placeholder:

            {Incident/IncidentChanges/Change/Id}