Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..
593 views

Process Designer question for Incidents

Jump to solution

I can't seem to wrap my brain around this for some reason.

OOB in the Incident workflow is a ruleset called FCB.im.incident.closure that is on the transition to the Closure phase.

Within that RuleSet is a rule called "Run JavaScript Pre-Validation to check incident task". and it checks via javascript to see if there are any opened Incident tasks. If there are, a message displays and the incident will not close.

We want to instead check for opened tasks when users put the Incident in a Resolved status.  So I copied the javascript and created a new RuleSet and put it on the transition before the Review phase.

It correctly checks and gives appropriate msg if there are any opened tasks.  I also have the script setting the status back to "Work in Progress" and the Phase to "Investigation".  But how can I force it to skip the Review phase and co back to the Investigation phase.  At this point it is actually executing the Review phase and then going back to the Investigation phase.  It does correctly reset the status to Work in Progress but the phase is Recovery and not Investigation

Basically, I want to check and if there are opened tasks, I don't want the Review phase to execute.

Here is the javascript and I attached a screenshot that shows the incident acutally resolves then goes back to the previous phase

returnCode=0;
if(lib.c.$("#incidentService").countActiveTasksOfIncident(record.number)>0) {
    returnCode = 1;
    record.problem_status="Work In Progress";
    record.current_phase="Investigation";
    message=system.functions.scmsg (112, "im", [record.number]);
}

0 Likes
1 Solution

Accepted Solutions
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: Process Designer question for Incidents

Jump to solution

HI @fcbcd

I'am suggesting do the next: 

Instead put your JS validation for Review phase

Put your code JS validation for Investigation phase and set type of rule "on exit"

In this case you can utilise your JS code like bellow: 

if(lib.c.$("#incidentService").countActiveTasksOfIncident(record.number)>0) {
 returnCode = 1;
 message=system.functions.scmsg (112, "im", [record.number]);
}

HTH

 

View solution in original post

2 Replies
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: Process Designer question for Incidents

Jump to solution

HI @fcbcd

I'am suggesting do the next: 

Instead put your JS validation for Review phase

Put your code JS validation for Investigation phase and set type of rule "on exit"

In this case you can utilise your JS code like bellow: 

if(lib.c.$("#incidentService").countActiveTasksOfIncident(record.number)>0) {
 returnCode = 1;
 message=system.functions.scmsg (112, "im", [record.number]);
}

HTH

 

View solution in original post

Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: Process Designer question for Incidents

Jump to solution

Thanks exeptt,                

This worked as I needed. 
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.