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

Parents
  • 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.

  • 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.

Reply
  • 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.

Children
No Data