Auto Create Incident Task in Incident Workflow
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.
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.
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)
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";
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.
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.