Java API: Parallel Search limit per CatalogData instance (MDM4J)?

MDM4J (legacy API) Experts,
Have you ever run into a limit on the number of Searches than can be performed in parallel, using the same MDM session (i.e. one CatalogData instance)? 
We've been consistently getting an error at > 60 searches.
The maxConnection parameter in the Login() method doesn't appear to help - set it to 100, and we still top out at 60.
If you've found a way to increase this threshold, I'm very interested in the how-to!
Cheers,
...Dee

Hi Walter,
thanks for the info.
I guess christmas is not the good time to work on serious code
In fact after going thro' the API i was able to figure out the code to write it. Just so that i would be helpful to others i am putting it here..
this link will give you a good understanding of how to get the Qualifiers.
http://help.sap.com/saphelp%5Fmdm550/helpdata/en/46/2b62d0f2b54f07e10000000a114a6b/content.htm
Read the brief explaination at the end after the block diagram, it will help save you lots of time
           RetrieveRecordsByIdCommand recordCommand = new RetrieveRecordsByIdCommand(connection);
           recordCommand.setSession(sessionId);
           recordCommand.addId(recordId);
           recordCommand.execute();
           RecordResultSet rs = recordCommand.getRecords();
           Record rec = rs.getRecord(0);
           QualifiedLookupValue qlv = (QualifiedLookupValue)rec.getFieldValue(field);
           QualifiedLinkValue[] links = qlv.getQualifiedLinks();
hope it helps others.
Cheers
Kiran

Similar Messages

  • Issue with ENEQuery java api and searching terms with accented characters

    Hi,
    we are using ENEQuery to query the mdex engine. When search terms contain accented characters (like á,í etc), even though the terms are decoded (using java.net.URLDecoder), the term gets send to dgraph is encoded. for e.g a search for "sofá", from the dgraph logs "sof%c3%a1" and fetch in 0 results
    ENEQuery query = new ENEQuery();
    final ERecSearchList searches = new ERecSearchList();
    final ERecSearch eRecSearch = new ERecSearch("search interface name", "term");
    searches.add(eRecSearch);
    query.setNavERecSearches(searches);
    Any suggestions?
    Thanks

    Hi,
    Does your indexed data (which you hope to match) contain "sofá" or "sofa" (no diacritic)? If the latter, and in-general, you may benefit from the dgidx flag --diacritic-folding* as described in documentation "Mapping accented characters to unaccented characters".  If you are running the latest version, this is all that should be required to generate a match.
    Best
    Brett

  • Java API: Limiting search to a specific set of records ids?

    Hello.
    I'm trying to find a way to do the following: run a search (a pretty simple search, just check for a specific value in a specific field), but instead of running the search on an entire table I want to limit it to a specific set of record-ids, the point being that I know which record-ids I want to search on (I'm getting them from a listener event) and I'd like to make the search more effective.
    Any ideas?
    Thanks,
    Alon

    Alon,
    Are you on SP6? If so, have you tried the [RetrieveRecordsByIdCommand|http://help.sap.com/javadocs/MDM/SP06/com/sap/mdm/data/commands/RetrieveRecordsByIdCommand.html]?
    Regards,
    Doug

  • Intermedia Java API ?

    Does Intermedia provide a Java API to search for database data or documents from a Java client, something similar to what iFS provide ?
    The only Java API I could find was used for media files (audio, image, video).
    Thanks,
    Franck.

    Sorry, old email address.
    [email protected]

  • How to find bpel instance in 11g based on the index values using Java APIs

    Hi ,
    In SOA10G we had option to find the instances based on the index value using Java APIs like below.
    WhereCondition criteria= new WhereCondition(SQLDefs.CX_index_1 + " = ?");
    criteria.setString(1, "indexValue");
    Locator mLoc = getLocator();
    IInstanceHandle[] foundInstances = mLoc.listInstancesByIndex(criteria);
    Please tell me how to achieve the same functionality in SOA 11G using Java APIs
    Regards,
    Saba

    I have multiple bpel in my composite. I checked in ci_indexes table and it shows the instance number of the bpel process. But the em console is showing only the composite instance number. when I opened composite instance, I could see all the bpel process with instance number in the audit trail. How can I find the the actual composite instance number that I should search for in the em console ???

  • How to search with multiple constraints in the new java API?

    I'm having a problem using the new MDM API to do searches with multiple constraints.  Here are the classes I'm trying to use, and the scenario I'm trying to implement:
    Classes:
    SearchItem: Interface
    SearchGroup: implements SearchItem, empty constructor,
                 addSearchItem (requires SearchDimension and SearchConstraint, or just a SearchItem),
                 setComparisonOperator
    SearchParameter: implements SearchItem, constructor requires SearchDimension and SearchConstraint objects
    Search: extends SearchGroup, constructor requires TableId object
    RetrieveLimitedRecordsCommand: setSearch method requires Search object
    FieldDimension: constructor requires FieldId object or FieldIds[] fieldPath
    TextSearchConstraint: constructor requires string value and int comparisonOperator(enum)
    BooleanSearchConstraint: constructor requires boolean value
    Scenario:
    Okay, so say we have a main table, Products.  We want to search the table for the following:
    field IsActive = true
    field ProductColor = red or blue or green
    So the question is how to build this search with the above classes?  Everything I've tried so far results in the following error:
    Exception in thread "main" java.lang.UnsupportedOperationException: Search group nesting is currently not supported.
         at com.sap.mdm.search.SearchGroup.addSearchItem(Unknown Source)
    I can do just the ProductColor search like this:
    Search mySearch = new Search(<Products TableId>);
    mySearch.setComparisonOperator(Search.OR_OPERATOR);
    FieldDimension myColorFieldDim = new FieldDimension(<ProductColor FieldId>);
    TextSearchConstraint myTextConRed = new TextSearchConstraint("red",TextSearchConstraint.EQUALS);
    TextSearchConstraint myTextConBlue = new TextSearchConstraint("blue",TextSearchConstraint.EQUALS);
    TextSearchConstraint myTextConGreen = new TextSearchConstraint("green",TextSearchConstraint.EQUALS);
    mySearch.addSearchItem(myColorFieldDim,myTextConRed);
    mySearch.addSearchItem(myColorFieldDim,myTextConBlue);
    mySearch.addSearchItem(myColorFieldDim,myTextConGreen);
    the question is how do I add the AND of the BooleanSearchConstraint?
    FieldDimension myActiveFieldDim = new FieldDimension(<IsActive FieldId>);
    BooleanSearchConstraint myBoolCon = new BooleanSearchConstraint(true);
    I can't just add it to mySearch because mySearch is using OR operator, so it would return ALL of the Products records that match IsActive = true.  I tried creating a higher level Search object like this:
    Search topSearch = new Search(<Products TableId>);
    topSearch.setComparisonOperator(Search.AND_OPERATOR);
    topSearch.addSearchItem(mySearch);
    topSearch.addSearchItem(myActiveFieldDim,myBoolCon);
    But when I do this I get the above "Search group nesting is currently not supported" error.  Does that mean this kind of search cannot be done with the new MDM API?

    I'm actually testing a pre-release of SP05 right now, and it still is not functional.  The best that can be done is to use a PickListSearchConstraint to act as an OR within a field.  But PickList is limited to lookup Id values, text attribute values, numeric attribute values and coupled attribute values.  It works for me in some cases where I have lookup Id values, but not in other cases where the users want to search on multiple text values within a single field.

  • Create Named Search with Java API

    Hi,
    is it possible to create or modify a named search with the Java API?
    Best regards,
    Roman

    Hi Olof,
    You can use the below code for searching a value in lookup table:
                   ResultDefinition objResultDefinition = new ResultDefinition(Lookup Table Id);
                   objResultDefinition.addSelectField(Lookup Field ID);
                   StringValue [] objStringValue = new StringValue[1];
                   objStringValue[0] = new StringValue("Value to search");
                   RetrieveRecordsByValueCommand objRetrieveRecordsByValueCommand = new RetrieveRecordsByValueCommand(objConnectionAccessor);
                   objRetrieveRecordsByValueCommand.setSession(strUserSessionID);
                   objRetrieveRecordsByValueCommand.setResultDefinition(objResultDefinition);
                   objRetrieveRecordsByValueCommand.setFieldId(lookup field id);
                   objRetrieveRecordsByValueCommand.setFieldValues(objStringValue);
                   objRetrieveRecordsByValueCommand.execute();
                   RecordResultSet objRecordResultSet = objRetrieveRecordsByValueCommand.getRecords();
    Now using the objRecordResultset in a loop you can get the record id by calling the getRecord(i).getId() method.
    Hope this helps!!
    Cheers,
    Arafat

  • Process Instance : Update Process Variables with Java API

    Hi,
    I need to set a lot of process variables in a java service that is executed in a process but can't find the way to do that.
    Is it possible to modify the value of a variable from a process instance with the JAVA API ?
    I didn't find this type of function (for example with the ProcessManager API).
    Thanks,
    Will

    Could you place your logic in an executeScript service?
    You can use native Java there.
    I have had good luck getting values in and out of process varaibles with the get... set...
    this is a very simple example.
    import com.adobe.workflow.pat.service.*;
    String allowLogging = patExecContext.getProcessDataStringValue("/process_data/@allowLogging");
    patExecContext.setProcessDataStringValue("/process_data/@errorActivity", "Save Doc XML");
    patExecContext.setProcessDataStringValue("/process_data/@errorMessage", "SystemException");
    if (allowLogging.equalsIgnoreCase("true")) {
    System.out.println("@@@@ Save Doc XML @@@@");
    System.out.println("@@@@ SystemException @@@@");
    }; // END allowLogging

  • Named Searches and Java API

    Hi All,
    Does anyone know if its possible to execute Named Searches using the Java API?  If so, how would you set up that call?
    Best Regards,
    Mark

    Hello Mark,
                     SAP does provide with some methods related to Named Searches just have a look at these links
    1. <a href="https://help.sap.com/javadocs/MDM/current/com/sap/mdm/search/SearchDimension.html#NAMED_SEARCH">Named search</a>
    2. <a href="https://help.sap.com/javadocs/MDM/current/com/sap/mdm/security/AccessPermission.html#NAMED_SEARCH_OBJECT">Named Search Object</a>
    3. <a href="https://help.sap.com/javadocs/MDM/current/com/sap/mdm/search/NamedSearchSearchDimension.html#NAMED_SEARCH_SEARCH_DIMENSION">Named Search Search Dimension</a>
    I hope this solves ur problem.
    Regards Dollar Man

  • Using the Java API to address a specific instance

    Hi,
    I've created another operation (onRequest) in the client of an async. process.
    <!-- portType implemented by the Exp2 BPEL process -->
    <portType name="Exp2">
    <operation name="initiate">
    <input message="tns:Exp2RequestMessage"/>
    </operation>
    <operation name="onRequest">
    <input message="tns:Exp2onRequestMessage"/>
    </operation>
    </portType>
    I then use this operation in a recieve activity so that I can stall the flow of the instance, and then call it whenever I whant from a RMI client.
    <receive createInstance="no" name="onRequest" partnerLink="client" portType="tns:Exp2" operation="onRequest" variable="inputRequest"/>
    My problem is that, after the creation of one or more instances of this process, how can I send a post message to a specific instance using the Java API?
    I understand that i should use something like...
    deliveryService.post("Exp2", "onRequest", nm );
    but there's nothing to "say" that this post message is to be delivered to the instance with the ID "xx".
    I also know that I need to use correlation on this but I don't know how.
    I would really apreciate some help on this.
    Thanks...

    This is a very good question: here is a code snippet that shows how you can add a conversation id to the NormalizedMessage that you are sending to the delivery service.
    HashMap properties = new HashMap();
    properties.put("conversationId", "yourUniqueKeyHere");
    // construct the normalized message and send to the
    // delivery service
    NormalizedMessage nm = new NormalizedMessage( );
    nm.setProperties(properties );
    // The rest is the same
    nm.addPart("XXX" , someElement );
    Please note that you will need to use the conversationId property both with the message you use to initiate the BPEL process and the message you use to perform the onRequest call.
    Please note that if at some point you want to perform any of the 2 calls through the SOAP channel, you can embed he conversationId in the WS-Addressing header within the relateTo element.
    I hope this helps.
    Edwin

  • Boolean Search Constraint in new Java API doesn't work for value of false

    I'm developing an application that interfaces with MDM via the new Java API.  We're on MDM version 5.5 SP 4 and have the latest patches installed.  I can do searches fine on the repository, but have run into one problem with the Boolean Search Constraint.  I have a set of records in the main table that have several boolean fields.  I've discovered that when searching these records using a Boolean Search Constraint on any of the fields, I'm always receiving records that match the boolean value of true.  This is even when I specify the Boolean Search Constraint value as false.  Is anybody else seeing this problem?

    It's a bug in MDM 5.5 SP04.  The fix is in MDM 5.5 SP05.

  • Keyword Search using the SOUNDS_LIKE modifier, Java API

    Hello guys:
    Does anyone have a piece of code that shows how can I do a search, using the keyword and the SOUNDS_LIKE mod, like on the Data Manager?
    I've seen the blog "Performing Free Form Searches with MDM Java API" but I'm afraid this doesn't apply (it's about free-form, as the name says)
    Thanks!
    Alejandro

    Hi Alejandro,
    maybe this piece of code helps you a bit. The most important is the static attribute SOUNDS_LIKE of the TextSearchConstraint class.
    Also try to find the MDM Java Example files @ service.sap.com/installMDM . There is a complete introduction on how to search against an MDM repository which is very useful.
              // assumption:
              // you have connected to some repository which contains a field "Material Number"
              // with a session and you have already read the MainTable properties to identify
              // the MainTableID, as well as some fields yo want to read.          
              // set search conditions
              Search search = new Search(<yourMainTableId>);
              String fieldname = "Material Number";
              ResultDefinition rd = new ResultDefinition(<yourMainTableId>);;
              FieldId field = <someFieldFromYourRepository>;
              rd.add(field);
              // add some additional fields you want to select here ...
              FieldSearchDimension searchDimension = new FieldSearchDimension(field);
              TextSearchConstraint searchString =     new TextSearchConstraint(materialNumber, TextSearchConstraint.SOUNDS_LIKE);
              search.addSearchItem(searchDimension, searchString);
              RetrieveLimitedRecordsCommand limitingCommand = new RetrieveLimitedRecordsCommand(<yourConnection>);
              limitingCommand.setSession(<yourSession>);
              limitingCommand.setResultDefinition(rd);
              limitingCommand.setSearch(search);
              limitingCommand.setPageSize(10);
              try {
                   limitingCommand.execute();
                   RecordResultSet rs = limitingCommand.getRecords();
              catch(Exception e){
                   e.printStackTrace();
    If you need more help, let me know
    Best regards,
    Martin

  • MDM java api search on Main table

    Hi All,
    I am developing MDM Web dynpro custom application using MDM java API 2. I am having difficulty while searching on main table by date field. The fields type in MDM as u201CTime Stampu201D how I make my search constraints. Please point me if there is any tutorial or sample code.
    Thanks
    John.

    Hi John,
    Try using the following code snippet.
    TableId tableId = schema.getTable("Products").getId();
    FieldId fieldId = schema.getField("Products", "Update_Date").getId();
    FieldSearchDimension searchDimension = new FieldSearchDimension(fieldId);
    Calendar cal = Calendar.getInstance();
    cal.set(2009, 11, 24);
    DateTimeSearchConstraint dateConstraint = new DateTimeSearchConstraint(cal, DateTimeSearchConstraint.GREATER_THAN);
    Search search = new Search(tableId);
    search.addSearchItem(searchDimension, dateConstraint);
    Here "Products" is the name of the table on which the search is done. "Update_Date" is a field of type Timestamp. I've hard-coded the date currently. You can use the various Date constructors to set the date dynamically.
    Regards,
    Anil Madhavan

  • R12 Restrict Parallel Concurrent Requests Per User to a Limit.

    Hi everyone,
    Is it possible to restrict parallel concurrent requests per user to a limit.
    e.g. UserA sending concurrent requests to submit 15 heavy reports one after another. After 2 minutes he feels free. Now 15 reports running in parallel are heavy enough to take system's performance down. Is there a way to restricting parallal reports by a single user to 5.
    Waitning........
    Regrads,
    M. Farooq Khan.

    Hi,
    Please check the profile optiion
    Concurrent:Active Request Limit
    Thanks,

  • Search for a Multilingual value in MDM using JAVA API

    Good day,
    Could you kindly assist.
    I am trying to search for a field in MDM, from Portal using JAVA API. I do retrieve the value in English, but the problem is when I am trying to retrieve it in other languages. Please see sample code:
         private Search getSearch(MDMConnection mdmconnection,String value, TableId tableid){
              Search search =null;
              FieldSearchDimension fielddimension=null;
              TextSearchConstraint textcontrain=null;
              RepositorySchema reposchema =mdmconnection.reposchema;          
                                               if(value!=null)
                   search= new Search(tableid);
                   fielddimension=new FieldSearchDimension(reposchema.getFieldId("ATTR_VAL_ABBR","TEXT_VALUE"));
                   textcontrain=new TextSearchConstraint(value,TextSearchConstraint.EQUALS);
                   search.addSearchItem(fielddimension,textcontrain);
                   search.setComparisonOperator(Search.AND_OPERATOR);
              return search;
    Thank you in advance.
    Regards,
    Simni

    Hi ,
    Mdm- Multilingual value in MDM using JAVA API:
    you can check the first point as its reagrdign youisue related pdf and soloutions for your question.
    1.  http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0e8aedc-cdfe-2c10-6d90-bea2994455c5?QuickLink=index&overridelayout=true
    2.  http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0e8aedc-cdfe-2c10-6d90-bea2994455c5?QuickLink=index&overridelayout=true
    Hope this information helps you in solving the  issue!!
    Thanks&Regards
    AswinChandraGirmaji

Maybe you are looking for

  • Remote and iTunes 8.1 with AirPort deactivated?!?

    Ok, I just wanted to try if the new iTunes DJ thing works, updated the iPhone remote app and started to "vote" for songs, when I realized that my MacBook was not connected to my WiFi-network... but it still worked! Now I wondered how that was possibl

  • Firefox stops responding when starting

    Basically, Firefox has worked fine for 3 months on this computer, no problems. I haven't installed any new add-ons since I set it up initially. I closed out of my session, went and had lunch, came back and now within 5-10 seconds after starting up Fi

  • Creating a video DVD for PAL TV using video from an NTSC Camcorder

    Hey Guys, I'll be owning an AVCHD NTSC camcorder (Canon HF S10) and need to know whether Final Cut Express includes the functionality of importing the video from the camcorder and exporting it to a DVD for a PAL TV system. Will you share your experie

  • HT1296 Transfer of Calendar from Phone to Computer

    I want to transfer my calendar from my phone as it is the most current to my computer. If I follow this article, will it work. I do NOT want to replace my phone's calendar with the one on my computer as it's outdated.Please advise. Thanks!

  • Cache problems with the browser

    I'm using google chrome browser to debug my flex/flash applications. problem is that a lot of times the browser will not load the newest build! how do I force it to load it? anyone? Peter Wraae Marino