EAI Siebel Adapter – Query Method

EAI Siebel Adapter is very widely used Business Service in Siebel. This business service is indispensable if you are working in Siebel EAI and very useful to do configuration tasks efficiently.

I have already described some novel implementation of using IO and EAI Siebel Adapter BS to improve performance and reduce scripting.

But today we are going to discuss the basic and most used method of this BS which is to Query Method.

Query Method of EAI Siebel Adapter takes a Row Id or a Search Spec as an Input and gives you a Siebel Message as Output. Let’s discuss both Ways.

Query using RowId: You need to provide 2 input arguments to the Method

  • OutputIntObjectName: This should have the value of a valid IO name based on BO and BC for which you want to Query the record
  • PrimaryRowId: This should contain the RowId of the record you want to Query.

Using this method is pretty straight forward but more often than not our query is based on certain condition such as Record should have Status = ‘Cancelled’ and Type = ‘Order’ then you need to provide the SearchSpec in order to query the record.

Query using SearchSpec: Again you need to provide 2 arguments to the Method

  • OutputIntObjectName: Same as Above
  • SearchSpec: A valid Search Spec for your query. Now, important thing to note here is that SearchSpec here is not like SearchSpec you provide in BC, Applet and other object and also not like you provide in eScript. Here SearchSpec has different format

Format of SearchSpec in EAI Siebel Adapter BS:

You need to provide the SearchSpec as IntegrationComponent.FieldName to explain it better lets take and example.

Requirement:
Query Service Request with ‘Status’ = ‘Open’ and Type = ‘Urgent’ and your IC name is Service Request. So, your SearchSpec would be:

[Service Request.Status] = ‘Open’ AND [Service Request.Type] = ‘Urgent’

If you want query where the condition involves a Child BC then you need to provide the name of child IC. For example

Requirement:
Query Service Request with ‘Status’ = ‘Open’ and has Activity of Type = ‘Closed’ where Activity is Child BC of Service Request. Your SearchSpec would be

[Service Request.Status] = ‘Open’ AND [Activity.Type] = ‘Closed’

Soon I will create a Video Tutorial of creating a workflow using both techniques. So, keep watching.

This Post has been viewed : 40,474 Times


26 Responses to EAI Siebel Adapter – Query Method

  1. Hi Neal,
    It is a nice one on EAI Query method…really very usefull…
    can u plz help me on this….
    i am using Searchspec and io as input…
    the value to be evaluated for SearchSpec is coming from an xml file…in the workflow i use the finsquery and get that value from xml….now suppose the value is in property name customer id…then how should i use it as expression in SearchSpec….i tired as follows….
    ‘[ic name.field] = ”’ + [&customer id] + ””=>but this failed to work….
    eagerly waiting for ur reply…thanks a lot….

  2. Hi Neal,
    It is a nice one on EAI Query method…really very usefull…
    can u plz help me on this….
    i am using Searchspec and io as input…
    the value to be evaluated for SearchSpec is coming from an xml file…in the workflow i use the finsquery and get that value from xml….now suppose the value is in property name customer id…then how should i use it as expression in SearchSpec….i tired as follows….
    ‘[ic name.field] = ”’ + [&customer id] + ””=>but this failed to work….
    eagerly waiting for ur reply…thanks a lot….

  3. Search Expression seems to be ok…

    What kind of error you are facing. Just make sure for the below given points

    1. Make sure Customer Id process property is not empty
    2. Make sure you are using right method SearchSpec not PrimaryRowId
    3. Make sure that input argument is of type Expression not Literal or Process Property.

    if it still doesn’t solve then let me know the error and we see further

  4. Search Expression seems to be ok…

    What kind of error you are facing. Just make sure for the below given points

    1. Make sure Customer Id process property is not empty
    2. Make sure you are using right method SearchSpec not PrimaryRowId
    3. Make sure that input argument is of type Expression not Literal or Process Property.

    if it still doesn’t solve then let me know the error and we see further

  5. No, I am afraid you cannot.

    But you can use Id in Search Spec which will be equivelant to PrimaryRowId argument. For example it can be

    [ServiceRequest.Id] = ‘1-98Y67’

  6. No, I am afraid you cannot.

    But you can use Id in Search Spec which will be equivelant to PrimaryRowId argument. For example it can be

    [ServiceRequest.Id] = ‘1-98Y67’

  7. Hi

    Does anyone having Hands-on with the Bus.Service EAI Siebel Adapter, Execute Method?

    Please share the information

    Thanks in Advance

    Babu Rajendra Prasad

  8. Hi

    Does anyone having Hands-on with the Bus.Service EAI Siebel Adapter, Execute Method?

    Please share the information

    Thanks in Advance

    Babu Rajendra Prasad

  9. As you know, fields in the input integration object can be used to control query behaviour. Siebel will use non-null fields in the input intobj for its search.

    I wonder if the SearchSpec parameter can be used in combination with an input intobj (which has some key fields filled)… is it then applied in addition ('AND') to the intobj fields?

    Cheers! Sebastian

  10. HI,

    I have a requirement to have the date-time value included in the search spec.The value is coming through a process property, and my search spec is as follows,
    “[Account.Last Modified] >'” + [&LastLoginTime]+”'”

    But its giving an error as, “The value '1/30/2010 7:12:26 AM' cannot be converted to a date time value.(SBL-DAT-00359)”(SBL-EAI-04376)”

    Any help is greatly appreciated.

    Please help Guys

    thanks

  11. Hi Guys,

    It was actually about the format of the input. It should be like 01/08/2009 12:34:56…even if we missed a digit and input something like 1/08/2009 12:24:56, eventhough the date is same , it will throw an error. And also earlier I had the WF Process property as type ‘Date’ .I changed it to String. And that worked.

    Thanks!!

  12. Hi

    I have Created an IO based on Account and IO Consists and IC as Contact

    When ever i Query with the Siebel Adapter, should retrieve only Primary Contact with the Respective Account

    How can we achieve this with the Searchspec?

    Thanks in Advance

    Prasad

  13. Hi Babu,

    You could expose the primary Contact field in the Account IO. That way you will get the primary contact in the response in the Account IC itself.

    I hope it helps.

    Thanks

  14. Hi,

    I am facing the error – query can not be run if it contains any characters like apostrophe.Actually whenever we are giving some input like name O’BRAIN , EAI Siebel Adapter is failing in query method.What can be done to prevent it.

    thanks
    Deepraj.

  15. Hi Neel,

    I have a requirement where external system is querying for 2 SR Id’s together. Can you please tell me how we should do it. What should be the search spec. Currently it is “[Service Request.Id] = ‘” + [&SRId]+”‘”

    But they are expecting [Service Request.Id] = ‘1-8U8SEX’ OR [Service Request.Id] = ‘1-8U8SEO’

    Please help asap.

    • You have already provided the searchspec. Here is an example how it would look like assuming the other SR id is in a process property with name SRId_1
      “[Service Request.Id] = ‘” + [&SRId]+ “‘ OR [Service Request.Id] = ‘” + [&SRId_1]+ “‘””

      • Hi Neel, thanks for quick response, issue just now resolved. I am giving the search spec as [&SRId] and external system is querying like
        [Service Request.Id] = ‘1-8U8SEX’ OR [Service Request.Id] = ‘1-1IS-248’

        So, its working fine now. Thanks

  16. What if the customer ask me for n accounts rather than two or three, lets say 10 how can be the search ? I can’t figure out how this can be achieved. Creating 10 process properties can be quite dirty.

Leave a Reply

Contribute