8 Replies Latest reply on Jul 11, 2017 7:49 AM by TDougl

    Resolving incidents upon tasks completion

    hmannathoko Rookie

      How do i set the system to automatically resolve the incident upon the task completion. The system should check if there are any incompleted tasks first before resolving an incident?

        • 1. Re: Resolving incidents upon tasks completion
          mskinner Rookie

          What I did was create a field on my Task object called "IncidentTaskWorkflow", and then created a Trigger business rule that on update of the IncidentTaskWorkflow field, runs this expression: $(IfAllSiblings("Incident#.Rev3",   "$(Status != 'Closed' && Status != 'Resolved')",   "$(Status == 'Completed' || Status == 'Cancelled' || Status == 'Rejected')",   "$(PromptAndExecuteAction('$(Parent(Incident#.Rev3))', 'Task belongs to an Incident with no other unfinished Tasks. Select [Yes] to set Incident resolved, select [No] to create a new Task, or select [Cancel] to cancel the Task save operation.', 'Resolve Incident', 'New TaskAssignment'))"))

           

           

          This will prompt the user of a Logged/Active Incident to select a Yes/No/Cancel option if all child objects are Completed, Cancelled, or Rejected. If Yes is selected, I have a quick action in the Incident business object called "Resolve Incident" that prompts for the Incident resolution and resolves the Incident. If No is selected, there's a quick action in the Incident business object called "New TaskAssignment" that goes through the process to create a new task.

           

          Hope that helps,

           

          Michael

          1 of 1 people found this helpful
          • 2. Re: Resolving incidents upon tasks completion
            hmannathoko Rookie

            Thanks Michael..Let me try it out, I will revert back to you once i am done!

            1 of 1 people found this helpful
            • 3. Re: Resolving incidents upon tasks completion
              glory.makaringe Rookie

              Hi Herbert,

               

              did you come alright?

              • 4. Re: Resolving incidents upon tasks completion
                liz.rodgers@ky.gov Rookie

                Just a word of caution on this, particularly if you're working in a larger, siloed organization.  My org had similar workflow built in on a previous implementation, and it caused some serious implications with C-Sat on Incident resolution.  Even if you create Tasks for each unit of work, things are highly likely to fall through the cracks between those Tasks.  You might consider building in a Customer feedback mechanism (other than the OOTB surveys) to ensure acceptance on the resolution before simply setting Status = Resolved.

                • 5. Re: Resolving incidents upon tasks completion
                  xili Apprentice

                  Hi Michael,

                   

                  Can you explain what Rev3 is in your expression "$(IfAllSiblings("Incident#.Rev3",   "$(Status != 'Closed'..."? I saw Rev3 and Rev2 are used in different other places, but couldn't find a document about what they are, not mentioned when what should be used, etc. Thank you.

                  • 6. Re: Resolving incidents upon tasks completion
                    xili Apprentice

                    I'd also like to see what the relationship would be between the CIs linked to an incident and the tasks created under the incident. I am not sure if they (CI and Task) are "siblings". I know there is a function called ChildFold(), but if the business rule is at task level, the parent is obviously incident, so the way to calculate the CIs linked is to use the third parameter of the following? The relationship should be between "CI/Task" or "CI/Incident"? Something like $(ChildFold("Incident#", RecId, "CI#.Rev3"...?? I tried that but got some error.

                     

                     ChildFold(parentObjectRef, parentRecId, childRelationshipRef, childExpression, aggregatorFunc, childPredicateExpression)

                    • 7. Re: Resolving incidents upon tasks completion
                      TDougl Apprentice

                      Hi,

                       

                      Rev3 is the Internal Reference Name of the Relationship you want to use. In the above case, the Relationship is IncidentAssocTaskAssignment:

                       

                       

                      More details are documented in the Online Help.

                      • 8. Re: Resolving incidents upon tasks completion
                        TDougl Apprentice

                        Regarding your second comment, you can find out the Relationship used by looking at the Child Panel.

                         

                        - Log in to the tenant with the Administrator role

                        - Go to Configure Application

                        - Go to Business Objects > Incident > Layouts

                        - Pick the appropriate Layout (I took IncidentLayout.ServiceDesk)

                        - Go to Views in this layout > formView

                        - Under Child Panels, you can see the list of tabs you find on the Incident, and the Relationship which is used.

                         

                         

                        In this case, Incident is related to CI via IncidentAssociatesCI and Incident is related to Task via IncidentAssocTaskAssignment. By going back up to Incident > Relationships, you can look at each Relationship and get the Internal Reference Name, which can be used in the expressions (in my OOTB tenant, IncidentAssociatesCI doesn't have an Internal Reference Name, so the correct format would simply be "CI#." ).

                         

                        On Siblings, the online help says:

                             A sibling of the current business object is one that is also related to the parent business object by the relationship specified by the parentRelationship parameter.

                         

                        This means that Tasks would be siblings of each other, and CIs would be siblings of each other, but Tasks are not siblings of CIs.

                         

                        The ChildFold() function is used to count or add up values from child records, e.g. to count the number of Incidents linked to a  Change, or to sum up the cost of all Tasks associated to an Incident.

                         

                        If you want to display on a Task the CIs which are related to the parent Incident, this would be done with a roll-up relationship. Note that Tasks could have different parents (Incident, Problem, Change, ...) and so you may need to take that into account with your design.

                         

                        For Incidents:

                        - Log in to the tenant with the Administrator role

                        - Go to Configure Application

                        - Go to Business Objects > Task.Assignment > Layouts > Choose the layout > formView

                        - Click "Add Child Panel"

                        - Under Display Name, enter 'CI' (or your choice of tab name)

                        - Under Object, click <Not Set>

                        - Select "Use only rollup relationship(s) to grandchild objects" (or "Use both direct and rollup relationships" if you also want to associate CIs to Tasks directly)

                        - By Business Object: click 'not set' and select your target Business Object, in this case, CI.

                        - Click "Add New Rollup Sequence"

                        - Set the Display Name. This will be shown to users as a selectable option and helps explain where this record comes from. I will call mine "Parent Incident CIs".

                        - Click the green plus and start defining the chain back to CI.

                        - Create the chain Task -> Incident -> CI using the relationships we found above

                        - Save the rollup chain and Child Panel

                        - Set List and Form views, and any other Child Panel options as desired, then Save the Layout

                        - Note here I added an optional Hidden Expression:
                        $(ParentLink_Category != "Incident")
                        This will only show this CI tab for Tasks belonging to Incidents.
                        You could repeat the above steps for Change, Problem, etc. using the appropriate Relationships and adjust/remove this Hidden expression if required.

                         

                         

                        Back in the Client UI, after refreshing the browser you'll find Tasks associated with Incidents now have the CI tab:

                         

                         

                        In this final screenshot you can see the dropdown on the toolbar to select which rollup relationships you want to see, and the tool tip is from the first column, which shows where the CI came from.

                         

                        Hope this helps!