New Ranks & Badges For The Community!
Notice something different? The ranks and associated badges have gone "Star Fleet". See what they all mean HERE
Highlighted
Cadet 1st Class
Cadet 1st Class
744 views

Auto Create Incident Task in Incident Workflow

Dear Experts,

As per title, I have a requirement for new Incident tickets that are created in HPSM of a certain category to auto create a corresponding incident task (with generic desription) and be linked to the incident ticket.

I am currently using HP Service Manager 9.40 and I am unsure on how to implement this feature.

Any guidance or documentation that could be helpful in helping me achieve this will be greatly appreciated.

With regards,

Daniel.Chan

0 Likes
6 Replies
Highlighted
Fleet Admiral
Fleet Admiral

Can you tell what exactly records(tables) must be relate ?

SD->IM

IM->IM

0 Likes
Highlighted
Cadet 1st Class
Cadet 1st Class

Hi ALARMus,

 It is from IM(Probsummary) -> IM(ImTask).

 

0 Likes
Highlighted

You can try several ways:
1. Create a ruleset when entering a phase with the your condition in the process designer. Look at the OOB rule for creating a imtask. Use it to create a ruleset that will be executed automatically.
2. Create a trigger (after update) with the your condition, which will call the function that will create the imtask.

0 Likes
Highlighted
Fleet Admiral
Fleet Admiral

We have such implementation.

screlation table have next record for this relation: source.filename=problem, depend.filename=problem

we call the dependent item - outfit or work order (after relation - save in this record sign about it - flag in some boolen field or text in some character field)

0 Likes
Highlighted
Cadet 1st Class
Cadet 1st Class

Hi experts,

Just to update, so I have been trying to create the incident task in the incident management workflow via rulesets javascript.

Here is an example of the current draft script I had:

var $ = lib.c.$;
var file =vars.$L_file;
var imtask= new SCFile("imTask");
imtask.brief_description= "Test Automation";
imtask.description[0]="This is a test for Automation via Javascript";
imtask.initial_impact= "1";
imtask.severity="1";
imtask.priority="1";
imtask.category="Quote";
imtask.id=file.incident_id+"-"+file.last_task_no;
imtask.parent_number=file.number;
imtask.current_phase="Waiting";
var rc=imtask.doInsert();

So when the workflow is run (new incident created) a incident task record is also created, however there are some problems with it, mainly the IMTask ID ends up being null-0 (suspect its because of the $L.file) . The other problem is that the parent number field for Incident Task does not populate with the data, even if it is static data.

Can anyone help me determine what I am doing wrong here?

PS: Just for clarification as well, what does lib.c.$; reference to ? Fairly new to the scripting portion so I am still trying to understand HPSM.

0 Likes
Vice Admiral
Vice Admiral

Regarding one of the suggestions above...have you tried running a ruleset from Incident workflow and try calling the OOB ruleset for creating Incident Task? I could see it as ruleset name: "im.createTask". This ruleset is having 3 rules to execute, 1st is to get the last number of Incident Task, 2nd is to call the process "im.task.create", 3rd is the exit process.

I don't have this on my system - but I would rather try this OOB feature as my baseline. Just my 2 cents.

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.