
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Trouble with using IncidentManagement() script library
Hi All,
Hope you all are doing great...
Here to trouble you again.
I am using system.library.IncidentManagement.CreateIncidentRequest() method as follows:
function CreateIncident()
{
var IncMgmtSvc = new system.library.IncidentManagement.IncidentManagement();
IncMgmtSvc.user="falcon";
var retrieveReq = new system.library.IncidentManagement.CreateIncidentRequest();
//print("\n the value of retrieveReq" + retrieveReq.Category.getValue());
retrieveReq.Category = "incident";
retrieveReq.Subcategory="failure";
retrieveReq.ProductType ="error message";
retrieveReq.severity = "4 - Low";
retrieveReq.InitialImpact = "3 - Multiple Users";
retrieveReq.AffectedItem = "Microsoft Office 2007";
retrieveReq.Service = "Applications";
retrieveReq.PrimaryAssignmentGroup = "application";
retrieveReq.IncidentDescription = "Sending from JS using IMWS";
retrieveReq.BriefDescription = "Title INC from JS using IMWS";
retrieveReq.AssigneeName ="Incident.Manager";
try
{
var retrieveResp = IncMgmtSvc.invoke(retrieveReq);
i am getting retrieveResp as OBJECT but incident is not created.
i tried retrieve example as given in web service tailoring book its working fine.
Help me on this issue.
Thanks and regards,
abhijit

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Its because call you are making to the Incident Management WSDL is wrong.
Values are not getting set properly into the fields. Though i am surprised that you didnt got the error while calling the web-service.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Mukesh,
Thanks for the reply.
I would appreciate if you would guide me to the right way to invoke CreateIncidentRequest().
Thanks and regards,
Abhijit Khewale

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
You are not assigning the values properly. Values should be assigned with,
retrieveReq.model.instance.Category.setValue("incident");
Similarly set other values as well and call invoke()

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi there,
still no luck.
re,
abhijit

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Are you trying to consuming the IM wsdl of another Service Manager system ? And the field you have mentione in your js call to wsdl are the mandatory one ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Mukesh,
I am trying to consume web service of my own server.
I dont have SM front of me that why not able to share code with you.
One thing i observerd that in number file Incident Management Number is increasing everytime as i am trying to excute script.
thanks and regards,
abhijit khewale

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi
That means incident should have got created on SM end. By any chance did you check whether incidents are getting created?
If not, please check sm.log at that point of time for any errors and post it this thread.
Also please share the code you are trying to call to consume SM webservices.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi all,
Kindly suggest on this...
Thanks and regards,
abhijit


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hello,
we have test function, try it (only plz set all your obligatory parameters):
functionCreateTestInteraction()
{
try
{
var InteractionMgmtService =newsystem.library.ServiceDesk.ServiceDesk();
InteractionMgmtService.user = "falcon";
InteractionMgmtService.location = "http://localhost:13080/SM/1/ws";
var CreateInteractionRequest =newsystem.library.ServiceDesk.CreateInteractionRequest();
CreateInteractionRequest.Interaction.CallbackContact.setValue("disp");
CreateInteractionRequest.Interaction.NotifyBy.setValue("E-mail");
CreateInteractionRequest.Interaction.ConfigurationItem.setValue("Applications");
CreateInteractionRequest.Interaction.Title.setValue("TEST WS");
CreateInteractionRequest.Interaction.InitialImpact.setValue("2");
CreateInteractionRequest.Interaction.Severity.setValue("3");
CreateInteractionRequest.Interaction.Category.setValue("incident");
CreateInteractionRequest.Interaction.Subcategory.setValue("other");
CreateInteractionRequest.Interaction.Description.Description_newInstance().setValue("line 1");
CreateInteractionRequest.Interaction.Description.Description_newInstance().setValue("line 2");
var CreateInteractionResponse =InteractionMgmtService.invoke(CreateInteractionRequest);
if(CreateInteractionResponse.isFault())
{
return(-1);
}
else
{
return(CreateInteractionResponse.Interaction);
}
}
catch(e)
{
print(e);
return(-1);
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi V3,
Thanks for your reply.
I tried your code but gives me error as : CreateInteractionRequest.Interaction has no properties.
I guess somewhere syntax is wrong.
Kinldy send me proper or correct syntax.
Thanks and regards,
Abhijit K

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Kindly help on this issue..
re,
abhijit