IT Process Automation

Expand all | Collapse all

Service Desk - Create Request with Properties

  • 1.  Service Desk - Create Request with Properties

    Posted May 24, 2012 05:08 PM
    In the Service Desk Web services there is a "propertyValues" field in the createRequest method so that the caller can send property values that are associated with the Area the ticket is assigned to. How do I create a ticket with property using the "Request Create" operator in the Service Desk Connector?

    I've tried Adding the following to "Input Parameters" (Just shots in the dark)
    propertyValues : ["asdf","asdf"]
    or
    properties : ["asdf","asdf"]
    or
    prop0 : "asdf"
    prop1 : "adsa"

    If this doesn't make sense let me know.


  • 2.  RE: Service Desk - Create Request with Properties

    Broadcom Employee
    Posted Jun 19, 2012 01:46 PM
    The Soap call to Service Desk of "createRequest" is more a function of Service Desk itself than of the ITPAM operator.

    You can read about the "createRequest" web service in the Service Desk Technical Reference Guide that comes with the Service Desk install media. Here is an excerpt from that doc that may help:

    propertyValues is a list of values for each Property object that will be attached to the new Request. The Properties that are attached are determined by the new Request‘s ‗category‘ attribute value. All properties created from the CA Service Desk Manager Web Services interface will have a default value (for more information, see Categories and Properties), which is important because a Request will not save until all of its Properties marked ―required‖ have a value.
    You may override the default by supplying values for any properties that will be attached when the Request is created. You must supply this information before the Request is created, since createRequest() attempts to back-store the object you most recently create. Use getPropertyInfoForCategory() to get a list of properties for a specific Category. This function returns the properties in order of their ‗sequence‘ attribute, which is the expected order of the propertyValues array. For example, if the sequences and symbols of the properties are as follows:
    100 – Hard Drive Size
    200 – CPU
    300 – Memory
    The propertyValues array, depending on the programming language, may appear as follows:
    [“40 GB”, “Pentium 4 1.7 Ghz”, “256”]


  • 3.  RE: Service Desk - Create Request with Properties

    Posted Jun 25, 2012 02:15 PM
    Thanks Andy,

    It was a late night the night I originally posted this, and I think I was a bit tired :)

    I was trying not to use the Service Desk soap calls directly; but rather use the "Request Create" operator from the CA ServiceDesk Module, so that I could create the ticket and add the properties in one shot(without using the soap call).
    The issue I was having was translating the documentation for the soap call into what is would look like in the "Request Create" operator, because request create only has an input parameters section and nothing for Property values.

    After it was all said and done; what I ended up doing was using the createobject soap call to create a cr_prp object associated with the ticket I just created with the Reqest Create operator. This way I can add any property regardless if the category has it associated or not.


  • 4.  RE: Service Desk - Create Request with Properties

    Posted Dec 12, 2012 01:21 PM

    Andy_Thompson wrote:

    The Soap call to Service Desk of "createRequest" is more a function of Service Desk itself than of the ITPAM operator.

    You can read about the "createRequest" web service in the Service Desk Technical Reference Guide that comes with the Service Desk install media. Here is an excerpt from that doc that may help:

    propertyValues is a list of values for each Property object that will be attached to the new Request. The Properties that are attached are determined by the new Request‘s ‗category‘ attribute value. All properties created from the CA Service Desk Manager Web Services interface will have a default value (for more information, see Categories and Properties), which is important because a Request will not save until all of its Properties marked ―required‖ have a value.
    You may override the default by supplying values for any properties that will be attached when the Request is created. You must supply this information before the Request is created, since createRequest() attempts to back-store the object you most recently create. Use getPropertyInfoForCategory() to get a list of properties for a specific Category. This function returns the properties in order of their ‗sequence‘ attribute, which is the expected order of the propertyValues array. For example, if the sequences and symbols of the properties are as follows:
    100 – Hard Drive Size
    200 – CPU
    300 – Memory
    The propertyValues array, depending on the programming language, may appear as follows:
    [“40 GB”, “Pentium 4 1.7 Ghz”, “256”]
    HI guys, fairly new to the forums though I am having some difficulty getting started with WebServices.
    I am having the same issue here, I was even given a template of a request for SoapUI - the only issue is that as mentioned above I need to view all the available properties and I just cant figure it out.
    I am very comfortable with scripting languages, I just never have worked with this is SD. In scripts we usually have samples of code where you can understand what is going on, I have not found one template or good tutorial when it comes to this in SD. Would anyone know of a link, tutorial, sample SoapUI template to get started it with?
    I also cant find "Categories and Properties" anywhere except in that line where it is mentioned in the technical reference guide.
    I really would appreciate your help since I have been stuck for almost two days since I have no idea where to start, I am not asking for a complete solution, I will do my legwork.

    thank you in advance!


  • 5.  RE: Service Desk - Create Request with Properties

    Posted Dec 14, 2012 09:28 AM
    From: Verkler, Brenton
    Sent: Wednesday, December 12, 2012 1:46 PM
    To: mb.11871426.99849557@myca-email.ca.com
    Subject: RE: [PAM - General Discussion] RE: Service Desk - Create Request with Properties

    Good afternoon.

    This may be helpful (This is from soapUI 4.5.1 opening a Request with one required property in Service Desk R12.6):
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://www.ca.com/UnicenterServicePlus/ServiceDesk">
       <soapenv:Header/>
       <soapenv:Body>
          <ser:createRequest>
             <sid>1558738301</sid>
             <creatorHandle>cnt:F65CA47558A73E41BBFF34D0E65F6404</creatorHandle>
             <attrVals>
                <string>description</string>
                <string>Test Description</string>
                <string>category</string>
                <string>pcat:66443334</string>
                <string>log_agent</string>
                <string>cnt:F65CA47558A73E41BBFF34D0E65F6404</string>
                <string>summary</string>
                <string>Test Summary Here</string>
                <string>status</string>
                <string>OP</string>
                <string>customer</string>
                <string>cnt:F65CA47558A73E41BBFF34D0E65F6404</string>
                <string>type</string>
                <string>R</string>
                <string>priority</string>
                <string>0</string>
             </attrVals>
             <propertyValues>
             <!-- The value Yes below is the value of the first (and only) property dropdown -->
                <string>Yes</string>
                </propertyValues>
             <template></template>
             <attributes>
                <string>ref_num</string>
             </attributes>
             <newRequestHandle></newRequestHandle>
             <newRequestNumber></newRequestNumber>
          </ser:createRequest>
       </soapenv:Body>
    </soapenv:Envelope>
    --Thank You,
    Brent


  • 6.  RE: Service Desk - Create Request with Properties

    Posted Dec 14, 2012 11:43 AM

    Brent_Verkler wrote:

    From: Verkler, Brenton
    Sent: Wednesday, December 12, 2012 1:46 PM
    To: mb.11871426.99849557@myca-email.ca.com
    Subject: RE: [PAM - General Discussion] RE: Service Desk - Create Request with Properties

    Good afternoon.

    This may be helpful (This is from soapUI 4.5.1 opening a Request with one required property in Service Desk R12.6):
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://www.ca.com/UnicenterServicePlus/ServiceDesk">
       <soapenv:Header/>
       <soapenv:Body>
          <ser:createRequest>
             <sid>1558738301</sid>
             <creatorHandle>cnt:F65CA47558A73E41BBFF34D0E65F6404</creatorHandle>
             <attrVals>
                <string>description</string>
                <string>Test Description</string>
                <string>category</string>
                <string>pcat:66443334</string>
                <string>log_agent</string>
                <string>cnt:F65CA47558A73E41BBFF34D0E65F6404</string>
                <string>summary</string>
                <string>Test Summary Here</string>
                <string>status</string>
                <string>OP</string>
                <string>customer</string>
                <string>cnt:F65CA47558A73E41BBFF34D0E65F6404</string>
                <string>type</string>
                <string>R</string>
                <string>priority</string>
                <string>0</string>
             </attrVals>
             <propertyValues>
             <!-- The value Yes below is the value of the first (and only) property dropdown -->
                <string>Yes</string>
                </propertyValues>
             <template></template>
             <attributes>
                <string>ref_num</string>
             </attributes>
             <newRequestHandle></newRequestHandle>
             <newRequestNumber></newRequestNumber>
          </ser:createRequest>
       </soapenv:Body>
    </soapenv:Envelope>
    --Thank You,
    Brent
    Brent, first of all thank you for such a quick reply!
    This is very close to the template I received, and while I believe it is a working template - I am a person that likes to understand how things work.
    For example, I know I have to use the login method to get a sid ( Which I tested and it worked ), the only issue is I do not know how to pass that value to the CreateRequest method.
    That is where I am stuck, I have done tons of scripting over the years ( kix, vbs, powershell) so I understand you have to pass values along, I just do not know how to even start in this app - and the most frustrating part it seems fairly simple.
    CA has a lot of data ( technical ref guide, admin gudie, integration guide), they just do not even try to show you how to leverage all the data.

    Perfect example in the above template, I see priority, attributes, customer - These are all things I recognize from the GUI, I just do not know how to actually put it together as the above template.
    Basically, I have no idea how to gather the data and use it. I apologize if this sounds very noobish, I am just slightly frustrated at this point and wanted to point out my lack of knowledge and what my goals are.


  • 7.  Re: Service Desk - Create Request with Properties

    Posted Nov 26, 2018 03:59 PM

    Using SDM 17.1.01 ..  benefited and found this thread to be yet relevant.

    I was able to pass sid form login method to createrequest

    Followings are CreateRequest operator config.



  • 8.  RE: Service Desk - Create Request with Properties

    Posted Jun 28, 2012 04:15 PM
    I'm pretty sure that PAM uses createObject to create the various ticket types. That method does not support Properties. You can use the other ticket creation methods (createIssue, createRequest, createChangeOrder) if you want to set properties during ticket creation. Those are now the recommended methods in either case (though I'm not sure that was the case when the PAM connector was created).


  • 9.  RE: Service Desk - Create Request with Properties

    Posted Jul 12, 2012 12:50 PM
    I had a similar problem until today!
    I wanted create a ticket using Request_Create from SDM_Connector but passing more than one Input Parameters (on my case "Indicent Area" and "Configuration Item"), but of course that i don't know the codes of the parameters, much less end-users, that probably they will use a IRF or a SRF to fill the names of the objects. So was suggested to me to use "Base_Select_ServiceDesk_Elemen" to transform the names in the codes.
    I start describing this step.

    Transform Names on IDs using "Base_Select_ServiceDesk_Elemen":
    I've created two variables on my Dataset: ConfigurationItem and ConfigurationItemHandle
    On my "Base_Select_ServiceDesk_Elemen" I've filled the proprieties like this: ServiceDesk Object Type: "nr" | Where Clause: "name='" + Process.ConfigurationItem + "'" | Select Fields List: "id"
    At last I introduced a post-execution Code to put into my ConfigurationItemHandle variable the code of the ConfigurationItem and it looks like this:

    if (Process.Base_Select_ServiceDesk_Elemen_1.Result != 1 || typeof(Process.Base_Select_ServiceDesk_Elemen_1.SelectDataResponse.UDSObject) == "undefined" || Process.Base_Select_ServiceDesk_Elemen_1.SelectDataResponse.UDSObject.length == 0)
    {
    return
    }
    Process.configurationItemHandle = Process.Base_Select_ServiceDesk_Elemen_1.SelectDataResponse.UDSObject[0].Handle[0].text_

    Every time that you need to add new parameters to your ticket you must use one new "Base_Select_ServiceDesk_Elemen" to translate your object.

    To finish the ticket creation using Request_Create you must add (to ConfigurationItem) on your Input Parameters->Update Fields List a new field called "affected_resource" and on the Corresponding Values List "Process.ConfigurationItemHandle".

    Hope this can help.


  • 10.  RE: Service Desk - Create Request with Properties

    Posted Jul 16, 2012 11:39 PM
    Sergio,

    Thanks for sharing that tip! One small suggestion is that you should use Process[OpName].<variable name> instead of Process.Base_Select_ServiceDesk_Elemen_1.<variable name> when accessing your operator's dataset. This is always the case when you are access an operator dataset from the same operator (in pre-execution, post-execution, input fields, etc). The Process[OpName] notation just goes to the operator's own dataset.

    If you copy and paste your operator (thereby causing the name of the operator to change since two operators cannot have the same name in a single Process), the Process[OpName] notation will continue to work as expected while Process.Base_Select_ServiceDesk_Elemen_1 will be incorrect for the pasted operator.

    Thanks,
    Tom


  • 11.  Re: Service Desk - Create Request with Properties

    Posted Aug 24, 2018 08:26 AM

    I see in the discussion you had several samples about to create the request,...

     

    you may execute this at the command line to get the attributes of cr (the Request)

     

    bop_sinfo -d cr

     

    It will show a list like this

    C:\Users\Administrator>bop_sinfo -d cr

    Factory cr
    Attributes:
    id INTEGER
    producer_id LOCAL STRING(20)
    persistent_id STRING(30)
    new_delay_log LOCAL STRING(0)
    ref_num STRING(30) REQUIRED
    summary STRING(255)
    description STRING(4000)
    status SREL -> crs.code REQUIRED
    active SREL -> bool.enum REQUIRED
    open_date DATE

    .
    .

     

     

    In the activity from Brent, you see

                <string>log_agent</string>             <string>cnt:F65CA47558A73E41BBFF34D0E65F6404</string>

    log_agent is in the list of "bop_sinfo -d cr"