CA Service Management

 View Only
  • 1.  How to set input parameter for Create Request?

    Posted Sep 01, 2016 07:27 AM

    SDM 14.1.3

    CAPA 4.3

    I want to create Request from PAM. I am getting error for createRequest operator as below. How to set input parameter for setting Group value to Create Request?

    -----------------------

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
    <soapenv:Fault>
    <faultcode>soapenv:Client</faultcode>
    <faultstring>INVALID AHD05462:Group is required to save this RequestAHD05462:Group is required to save this Request</faultstring>
    <faultactor/>
    <detail>
    <ErrorMessage>INVALID AHD05462:Group is required to save this RequestAHD05462:Group is required to save this Request</ErrorMessage>
    <ErrorCode>1</ErrorCode>
    </detail>
    </soapenv:Fault>
    </soapenv:Body>
    </soapenv:Envelope>

    -----------------------------------------

     

     

    group.last_name is not working.

     

    Please help on this to set group correctly

     

    -Saravana



  • 2.  Re: How to set input parameter for Create Request?

    Posted Sep 01, 2016 08:02 AM

    Hi Saravana,

     

    Servicedesk is waiting for an UUID.

     

    So you need to perform a doSelect prior to the request creation

     

    <impl:doSelect xmlns:impl="http://www.ca.com/UnicenterServicePlus/ServiceDesk">
      <sid>sid__</sid>
      <objectType>grp</objectType>
      <whereClause>last_name = 'Production Control'</whereClause>
      <maxRows>1</maxRows>
      <attributes>
         <string>id</string>
      </attributes>
    </impl:doSelect>

     

     

    You can always retrieve the UUID from the database and paste it directly, but i would not recommend it. Doing this will force you to update it manually when promotting your process from DEV to PROD.

     

    Note that plenty of doSelect may be needed before creating a Request.

     

    You need a doSelect for every "relation" field. Ex : Category, Group.

     

    To get your Customer, Assignee or Requested_by, you can use : getHandleForUserid.

     

     

    To perform a doSelect, you can use the Invoke Soap operator. I prefer the default soap operator to the custom operator provided with the SDM connector. Default operators are less restrictive and they force you to fully understand what you do. If you plan to intensively use PAM, i would recommend working with the default operators. Harder at the beginning, but worth the pain.

     

    When you perform a SOAP call with the Invoke Soap operator, do not forget to check : Extract response body to dataset variable.

     

    You will then ben able to perform XPath query, or convert it to a ValueMap to access the values returned by the WS.

     

     

    If you need further help with PAM, you can ask a question in : CA Process Automation 

     

     

    Regards,

     

    Pier.



  • 3.  Re: How to set input parameter for Create Request?

    Posted Sep 01, 2016 09:05 AM

    Hi Pier,

     

    Thanks for your inputs. I added Invoke_SOAP_Method Operator prior to createRequest operator and copied your context on doSelect. It gives below error in blocked state:

     

    --------------------------------
    soapenv:Server.userException
    java.lang.NumberFormatException: For input string: "sid__"

    SW-SDMQA01

    -------------------------

    Please help

    -Saravana



  • 4.  Re: How to set input parameter for Create Request?

    Posted Sep 01, 2016 09:18 AM

    Hi Saravana,

     

    You need to perform a login prior to any webService call.

     

    Operators provided with the SDM connector do a login and a logout for every operation. But with default SOAP operator, you need to specify a sessionID (or sid).

     

    Add another invoke soap operator, choose the login method. add your username and password. It should returns a SID.

     

    You need to parse the returned XML to extract this SID, add it into Process.SDM_SID for example.

     

    Fig.1 : Soap operator, method : login. Call result section. Add a XPath query to easily extract the loginReturn (sid)

     

     

    Fig.2 : This is how you can setup your XPath query

     

    Fig.3 : Soap operator, method : login. Post-Execution code

     

     

     

     

    And change your dynamic variable in your doSelect soap operation.

     

    Fig.4 : Soap operator, method : doSelect. Dynamic parameters section. Modify the sid__ one.

     

    Fig.5 : Soap operator, method : doSelect. Setup the SID dynamic parameter

     

    Note : SDM usernames are case sensitive when you login via WebService.



  • 5.  Re: How to set input parameter for Create Request?

    Posted Sep 01, 2016 09:53 AM

    Hi Pier,

     

    I added one more Invoke_SOAP_Method operator with inline text as:

    ----------------------------

    <impl:login xmlns:impl="http://www.ca.com/UnicenterServicePlus/ServiceDesk">
    <username>skumbal</username>
    <password>Acf062116</password>
    </impl:login>

    -------------------------------

    Again it is blocked in SID Invoke_SOAP_Method with below error:

    -----------------------------
    soapenv:Client

     

    1010

    ------------------------------

     

     

    Please help in detail Pier.. Thanks in advance.

     

    -Saravana



  • 6.  Re: How to set input parameter for Create Request?

    Posted Sep 01, 2016 11:06 AM

    Hi Pier,

     

    Now i have passed that two Invoke_SOAP_Method operator. Now I got failed in createRequest operator with below error:

    --------------------------------

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
    <soapenv:Fault>
    <faultcode>soapenv:Client</faultcode>
    <faultstring>INVALID AHD05462:Group is required to save this RequestAHD05462:Group is required to save this Request</faultstring>
    <faultactor/>
    <detail>
    <ErrorMessage>INVALID AHD05462:Group is required to save this RequestAHD05462:Group is required to save this Request</ErrorMessage>
    <ErrorCode>1</ErrorCode>
    </detail>
    </soapenv:Fault>
    </soapenv:Body>
    </soapenv:Envelope>

    ----------------------------------------------

     

     

    Please tell me what to enter in ServiceDesk Input Parameter.

     

    Thanks,

    -Saravana



  • 7.  Re: How to set input parameter for Create Request?

    Posted Sep 02, 2016 05:07 AM

    Can anybody please help on this?

     

    -Saravana



  • 8.  Re: How to set input parameter for Create Request?

    Posted Sep 04, 2016 09:43 PM

    Hi Saravana,

     

    Mixing the SDM SOAP operators with standard SOAP operators is not necessarily a great idea.  The SDM operator has to log on with a userid and password, whereas the SOAP operators just need a SID.  So your PAM process will create two SDM sessions, where it really only needs one - and you also have to deal with two slightly different methods of passing parameters, slightly different ways of handling the return from the process, and so on.  Also the SDM operator 'createRequest' doesn't seem to take Group as a parameter, which might make this a bit tricky.

     

    So, what I'd suggest you do is use a SOAP Client Call to create your request.  What have you done so far?  Have you looked up the Group identifier OK?  Have you written the Post-execution Javascript to extract it from the SOAP return and save it in a 'Process' variable?  Now you need to create another SOAP call, using the 'createRequest' method.  Use the 'WSDL wizard' to set up the SOAP call.  The output from the WSDL wizard will include an 'attrVals' string, that needs to include whatever fields you need to pass for your new request - in this sort of format:

    <attrVals>

    <string>group</string>

    <string>group__</string>

    <string>summary</string>

    <string>summary__</string>

    </attrVals>

     

    And in the Dynamic Parameters section you will substitute the Group ID that you have already retrieved, and saved as something like 'Process.myGroupID', into the 'group__' macro, and so on.

     

    Let us know how you get on.

    Regards,

    James



  • 9.  Re: How to set input parameter for Create Request?
    Best Answer

    Posted Sep 07, 2016 09:11 AM

    Hi James,

     

    Thanks for your inputs.

     

    Currently i just used createRequest operator and set SD input parameter as "group" and denoted "77A969C0685EEF46B6F7ED460EF76E9D"

     

    Then i ran the process. Now i am able to create a request from PAM to SDM. 

     

    Thanks again,

    -Saravana



  • 10.  Re: How to set input parameter for Create Request?

    Posted Sep 12, 2016 08:11 AM

    Sorry Sarava for not answering, i was on vacation

     

    Glad you got it working.

     

    As per James post, if you want to put SDM operators in the trash and use pure SOAP call, just let us know.

     

    It's not difficult, but you can scratch your head at some points.

     

    Regards,

     

    Pier