CA Service Management

Attach an event when not using classic SLA via WebServices 

Jul 19, 2018 07:01 PM

I've been fighting for a week to find the best way to attach an event to a ticket when classic sla is disabled using web services.

 

We tried the of course updating the sla directly in the ticket, but since classic sla is disabled this field has no effect.

Then we tried it directly thru the database but it wouldnt show in the ticket.

We then decided to use the callservermethod to call the new_attached_event_obj but it would not work as some of the attributes it needed required not to have the format string but rather UUID; or object.

So we then decided to create a custom SPL, with all strings, and that custom one to convert the values and call the new_attached_event_obj using send_wait. That did not work but because the validations of the new_attached_event_obj were rejecting some of the parameters as well.

Then I received a recomendation from pier-olivier.tremblay of using the createObject method directly to create an attached event.

So we tried this and it worked as a charm. 

I'm posting how you should create the WS SOAP message and hope it helps you if in need of such solution or a similar one.

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://www.ca.com/UnicenterServicePlus/ServiceDesk">
<soapenv:Header/>
<soapenv:Body>
<ser:createObject>
<sid>1010059848</sid>
<objectType>atev</objectType>
<attrVals>
<string>obj_id</string>
<string>cr:406314</string>
<string>event_tmpl</string>
<string>evt:5870</string>
<string>group_name</string>
<string>SLA</string>
<string>owning_ast</string>
<string>0</string>
<string>timezone</string>
<string>GMT</string>
</attrVals>
<attributes>
</attributes>
<createObjectResult></createObjectResult>
<newHandle></newHandle>
</ser:createObject>
</soapenv:Body>
</soapenv:Envelope>

 

This are the minimal attributes you need to define, except timezone which is optional. All of the attributes as you may see are in pairs, attribute, value.

 

Thanks, and I hope it helps the community.

Statistics
0 Favorited
2 Views
0 Files
0 Shares
0 Downloads

Related Entries and Links

No Related Resource entered.