HPE Software Products: SDK / API Support
Share |

what does the following code do?Open in a New Window

if (record.IsElectronic) {
        if (!record.IsDocumentInClientCache) {
	      record.LoadDocumentIntoClientCache();

Where does the following code load the document to? (where is it supposed to load it?)

 

I thought it loaded it into the client cache of the user's machine, but it appears to load it in the cache on the server where TRIM (HPE Records Manager) and the Workgroup Server are located.

Does this speed up accessing the document to avoid going to the Doc store?

If so, it appears to be slower so far when testing.

Thanks.

 

Need Custom Proterty Datafrom HPRMOpen in a New Window

Hi All,
We are developing a web front-end for showing search results using HPRM8.3.

I am able to retreive records using 'TrimMainObjectSearch'.
Records in our setup have multiple custom properties and I am able to retreive individual custom properties from indivaidual records.

But we want to retreive a list of 'distinct values' of these custom properties from the results without interation and manual looping.

So for example of i get a result like

Record1
-Title-'One'
-CustomProperty-'Value 1'  

Record2
-Title-'Two'
-CustomProperty-'Value 2'  

Record3
-Title-'Three'
-CustomProperty-'Value 1'

Record4
-Title-'Four'
-CustomProperty-'Value 1'

Then we want to retreive a list with value CustomPoperty value : [1 , 2] 

I checked the SDK menthods and was not able to find any sultions.
Is there a way to achieve this withoute manual lopping through each record ?

 

Finding complete Treasurus Term tree attached to a recordOpen in a New Window

Hi All,

Apologies if the question sounds a bit noob but I donn't see to find a solution.


I'm using HP RM 8.3 and trying to extract the complete Treasuras Term tree for a record using .NET SDK
I have used the 'broader' relation to move from leaf to parent of Keywords.


But as many leaf terms have multiple parents its difficult to get the exact parent which was used during attaching the record.

Is there any way to find this ? Or does the record manager does not support such implimentation ?

The following has been my code so far:

public static void GetTreeFromRecord(string uri)

{
     Database hpConnect = new Database();

     hpConnect.WorkgroupServerName = "SVR";
     hpConnect.Id = "DD";
     hpConnect.Connect();

     TrimMainObjectSearch objTrimSearch = new TrimMainObjectSearch(hpConnect, BaseObjectTypes.Record);
     TrimSearchClause objTrimClause = new TrimSearchClause(hpConnect, BaseObjectTypes.Record, SearchClauseIds.Uri);
     objTrimClause.SetCriteriaFromString(uri);
     objTrimSearch.AddFilterClause(objTrimClause);

     // Get Record
     foreach (Record record in objTrimSearch)
     {
          //Get Keywords
          foreach (RecordKeyword item in record.ChildKeywords)
          {
               //Get Parent Tree of Keyword
               TrimMainObjectSearch recKeyword = new TrimMainObjectSearch(hpConnect, BaseObjectTypes.Keyword);
               recKeyword.SetSearchString("broader:" + item.Keyword.Uri.UriAsString);

               string treeString = item.NameString;

               foreach (Keyword ite in recKeyword)
               {
                    GetParent(hpConnect, ite,ref treeString);
               }

               Console.WriteLine(treeString);

          }
     }
}

public static void GetParent(Database db,Keyword kWord, ref string kwTree)
{
     kwTree = kWord.NameString + " < " + kwTree;

     TrimMainObjectSearch recKeyword = new TrimMainObjectSearch(db, BaseObjectTypes.Keyword);
     recKeyword.SetSearchString("broader:" + kWord.Uri.UriAsString);

     if (recKeyword.Count > 0)
     {
          int count = 0;
          foreach (Keyword ite in recKeyword)
          {
               GetParent(db, ite, ref kwTree);
          }
     }

}

 

HPE Content Manager SDK 9.1Open in a New Window

Could anybody please let me know from where can I download the HPE Content Manager SDK 9.1 ?

Thanks

 

Options when using TrimMainObjectSearchOpen in a New Window

I was wondering if anyone could explain the properties that can be set on TrimMainObjectSearch and what they mean. I am looking at best practices for what may be useful to use:

TrimMainObjectSearch.UseSQLViews
TrimMainObjectSearch.UseDirectIDOLQuery
TrimMainObjectSearch.QueryInfoMessage
TrimMainObjectSearch.PagingMode

Thanks.

 

 

Download a document using WebServices APIOpen in a New Window

Does anyone who how to download a record (RecordType: document) using (REST) Web Services API? I look into the provided HP Content Manager Web services but couldn't see any available service.

Thanks in advance.

 

Retrieving customize value of Record Class using GetProperty methodOpen in a New Window

Hi,

We are using HPRM SDK in that we have BaseObjectTypes.Record and there are some custom properties created by the team which are not provided by HPRM. I want to access them I dont know ho to get the value of custom properties of BaseObjectTypes.Record.

Thanks,

Ashwin

 

 

How to attach document to a record using HP Content Manager WebServicesOpen in a New Window

I'm using REST Web Services provided by HPCM for integration.  I have 2 questions:

(1) How to send credentials (using web service) to log in HP Content Manager? 

(2) I successfully created records (RecordType: folder) by calling POST /Record.  However I couldn't find the correct web service that I can call to attach a document to that record. 

Please advise. Your help is appreciated.

 

Service API documentationOpen in a New Window

Is HPE RM8 service api documentation publicly available?

I'm developing a web app that must be integrated with an RM8 installation that I currently don't have acces to, so I need some API reference to write API calls. I could not find reference anywhere in the public access, and installation documentation for HPE CM implies that it's only avaliable after install from API itself.

The problem is though, that free trial version of HPE CM that I downloaded does not allow for Service API extension to be installed (the checkbox is disabled in installation wizard and the 'Service API' label is written in red.

How can I obtain an API reference in this situation?

Thanks in advance for any help.

 

Web Server Work Path scope for file system contention in 9.1?Open in a New Window

Hello,

We are in the process of upgrade from 8.3 to 9.1. We are hosting the SDK in a web service and so part of our initialisation is to call TrimApplication.SetAsWebservice(workPath). One thing we noticed under 8.3 is that under a heavy load of concurrent web service calls, we logged many file locking errors from the SDK trying to access files in that directory. We implemented a fix which was to generate a sub-folder for each request which is then deleted when the web service instance is disposed.

Under 9.3 however we have observed that the initialisation of the SDK and the value of TrimApplicaiton.WebServerWorkPath is retained across requests. That is, where we prviously initialsed and set a work path at the beginning of each request, we now only need to do it for the first request after an app pool start and all subsequent requests will use those settings.

My only conern though is that this will cause the file locking issues to occur again when under load as we will no longer be able to generate a directory per-request. Is this accurate or is this no longer a concern since 8.3?

 

Unable to check in record using Web Service APIOpen in a New Window

Hello, We have been running into an issue when checking in a record using the Web Service API.

The records create in TRIM, but then we try to check in a document, it fails. It appears to be coming back with 10 results found when it should only be finding one.

The tmp file is created in c:\Windows\Temp but the process stops there. Ive checked permissions. Ive set the Transfer path in the Web.config to c:\Windows\Temp... still no luck.

Can anyone tell me what it is finding 10 of? When we point to our old environment, it find 1 result. but our new environment, it finds 10... very confusing

Its saying we need to specify a record to check in. When we point the exact same code to our old 6.25 environment, it works. When we point to our 7.3, we get the following

<?xml version = "1.0" encoding = "UTF-8"?>
<outputMessage>
 <ExecuteResponse xmlns = "http://www.towersoft.com/schema/webservice/trim2/" xmlns:SOAP-ENV = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa = "http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd = "http://www.w3.org/2001/XMLSchema" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance">
  <ExecuteResult>
   <SearchResult>
    <FoundCount>10</FoundCount>
   </SearchResult>

   <ErrorResult>
    <ErrorNumber>1000227</ErrorNumber>
    <Message>You need to specify a record to checkin (TRIM Connectivity Toolkit unique id = 1000227)</Message>
    <SubstitutionParameters>
     <string>(empty)</string>
     <string>(empty)</string>
     <string>(empty)</string>
     <string>(empty)</string>
    </SubstitutionParameters>
   </ErrorResult>
   <EndResponse/>
   <TrimVersion>7.3.0.5193</TrimVersion>
   <WebServiceVersion>7.3.0.5193</WebServiceVersion>
  </ExecuteResult>
 </ExecuteResponse>
</outputMessage>

 

 

Our 6.25 environment comparison

<?xml version = "1.0" encoding = "UTF-8"?>
<outputMessage>
 <ExecuteResponse xmlns = "http://www.towersoft.com/schema/webservice/trim2/" xmlns:SOAP-ENV = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa = "http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd = "http://www.w3.org/2001/XMLSchema" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance">
  <ExecuteResult>
   <SearchResult>
    <FoundCount>1</FoundCount>
   </SearchResult>
   <SuccessResult/>

   <EndResponse/>
   <TrimVersion>6.2.5.1406</TrimVersion>
   <WebServiceVersion>6.2.0.0</WebServiceVersion>
  </ExecuteResult>
 </ExecuteResponse>
</outputMessage>
 

 

 

TrimException: Error communicating with HPE Records Manager Workgroup ServerOpen in a New Window

We have a web application using the .NET SDK that interfaces with TRIM (v8.3) to query records, add records, etc.

We are getting the following error:

TrimException: Error communicating with HPE Records Manager Workgroup Server on 'Server name'. [RCF: Failed to receive pingbacks from server. Expected pingback interval (ms): 15000.]

Users will access the website using their Windows account which will then be used to authenticate with TRIM. Their login is then used as the db.TrustedUser when making calls to TRIM.

Please note that we do not get this error all the time, just once in a while. But things do seem to run slow at times when users access the website.

We were wondering what permissions need to be set on folders, etc. as well (i.e. WorkServerWorkPath)

Also, we are wondering if anyone has experience using a custom website to interface with TRIM who can comment on any latency issues, performance with TRIM, etc.

What can we configure in TRIM to ensure better performance using a web application?

How many concurrent users can query information from TRIM using the website?

Things runs fine and then other times it takes a long time to query records from TRIM from the website. We built the website using the .NET SDK using ASP.NET MVC 4. 

 

View actual SQL for ServiceAPI calls from .Net code ???Open in a New Window

I am calling the Service API from .Net running RM8.3.

I am seeing unexpected results if a user defined field (Additional field) is part of the search string and the additional field does not exit in RM8.  I understand that we should use Additional fields that exist in RM8, but we ran across this when the sending applicaiton used a different spelling than what was in RM8.  The Desktop client throws an error say that the additional field does not exist.  In the Service API the results are different if you use a record type filter or not.

Below I have capture queries with the total records found:

The first test was with Client ID and date range without a record type filter, the correct results was returned.
recordsRequest.q: LetterCreatedDate:20170303 to 20170324 AND ClientID:xxxxxxx
recordsRequest.Filter:
response.TotalResults: 2

The 2nd test was with Client ID and date range with a record type filter, the correct results was returned.
recordsRequest.q: LetterCreatedDate:20170303 to 20170324 AND ClientID:xxxxxxx
recordsRequest.Filter: type:541
response.TotalResults: 2

The 3rd test was with Invalid Client ID search name and date range with a record type filter.  All of the records of that record type was returned.
recordsRequest.q: LetterCreatedDate:20170303 to 20170324 AND ClientID2:xxxxxxx

recordsRequest.Filter: type:541
response.TotalResults: 6751

The 4th test was with Invalid Client ID search name and date range without a record type filter.  No records were returned.
recordsRequest.q: LetterCreatedDate:20170303 to 20170324 AND ClientID2:xxxxxxx
recordsRequest.Filter:
response.TotalResults: 0

The 5th test was with date range with a record type filter.  Correct Results returned.
recordsRequest.q: LetterCreatedDate:20170303 to 20170324

recordsRequest.Filter: type:541
response.TotalResults: 12

The 6th test was all with record type filter.  Correct Results returned.
recordsRequest.q: all

recordsRequest.Filter: type:541
response.TotalResults: 6751

Test 3 and Test 6 returned the same results.   I would expect test 3 to return no records since an invalid search field was passed into the API.  I would like to be able to capture the SQL that is sent to the database to determine why we are seeing the same results between Test 3 and Test 6.   Is there a way to capture the native SQL? 

Thanks,
MikeB

 

How can I pass the user credentials to the Trim server?Open in a New Window

Hi,

We have got HPE Content manager 9.0 and need to write code in Javascript and C# to communicate via the Web API.

I coudn't find any sample code about sending the user credentials with the web request. Could you please help me?

Thanks

SN6

 

 

Using Service API to retrieve properties from TrimOpen in a New Window

Hi guys,

I am using Service api to communicate with HPTRIM and collecting information or metadata related to particular record. I have successfully obtained the metadatas but having problem with few properties. I have no access to trim environment other than the service api and cannot verify the data within the trim.

I need to extract the date for "DateDue" from trim but for every document I have tested it is always empty but the trim guy says he has updated the value. I am in confusion why this is happening. I have two images here, first  showing the result of the query and second showing parameter for my query. result.JPGparameters.JPG

I am trying to understand the scenario and trying to find anything I am doing wrong or other party doing it wrong. so any kind of assistance is welcome and appreciated. And, if I can get my hands to proper documentation related to ServiceAPI with details could be helpful for future as well, as I am relying on hit and trial to get this done

 

 

Upgrade to Records Manager 8.3Open in a New Window

We are upgrading to Records Manager 8.3.

The RM install only includes the 32 bit dll for  hp.hptrim.sdk.dll  (8.3.0.9321). How can I obtain/download the 64 bit version..

 

 

Strange but not unexpected behaviour CM9 client and HP TRIM 7.3.5 Workgroup serverOpen in a New Window

Hello all,

I'd like to start a thread about general strangeness that WILL HAPPEN TO YOU if you are forced into a situation where a HPE CM9 client/sdk is installed and pointed at a HP TRIM 7.x workgroup server. This is possible but not recommended and hopefully this thread will document why.

Here is the first dose of wierd/not wierd:

With a 32 bit TRIMSDK 9.0.0.279 against a HP TRIM 7.3.5 workgroup server.

The administrator can't delete records they created because the workgroup server and HP TRIM 7.3.5 database doesn't track the permission "delete previous revisions of record". This happens even though there are no previous versions to delete. The error message is "Access denied. You need to have the Remove previous revisions permission to execute this task."

Work around:

To delete the record, start a HP TRIM 7.3.5 client or use the HP TRIM 7.x SDK and try again.

Happy CM9ing!

 

 

Download Document from Record to a specific FilenameOpen in a New Window

Hi,

We are having a problem on site with our integration with RM8, specifically around certain special chracters contained in Record Title's causing problems when downloading documents.

We download a document for the user to interact with by using the RecordDownload class, and using the TrimClient GetDocument method to retrieve the document. Once the document has been downloaded, we then move the document into our processing directory.

This works fine, until there are special characters in the title of the Record - at which point the path returned from the GetDocument method does not match the location of the downloaded file. The file is present but has a different path - the special characters in the filename are causing either an Invalid path or are being encoded in a way that on the filesystem the filename doesn't match the value being returned.

Is there any way to specify a filename to have the document downloaded to ? That would avoid us having to copy the file at all ?

 

 

Sorting issueOpen in a New Window

I have noticed that when adding sorting to the queries it doesn't sort properly.

I have the following code:

objSearch.AddSortItemAscending(SearchClauseIds.RecordNumber);

I thought this would sort all numbers appropriately, but I am getting search results like this:

 

1001
1002
...
1
2

Is there another sort option to sort numbers correctly, (i.e. 15 comes before 100)?

 

Efficient queriesOpen in a New Window

I have a few questions regarding best practices about querying data from TRIM using the .NET SDK (for HPE Records Manager v8.3):

1. I have seen several different ways to query information from the database. Which of these is faster/more efficient?

Record record = new Record(db, id);
- Or -
Record record = db.FindTrimObjectByUri(BaseObjectTypes.Record, id) as Record;

2. And how do you access a Location using similiar syntax?

 

I have tried
Location user = db.FindTrimObjectByName(BaseObjectTypes.Location, "john.doe") as Location;
and
Location user = new Location(db, "john.doe");

But these did not work.

This works, but seems inefficient to have to do a search.

TrimMainObjectSearch objSearch = new TrimMainObjectSearch(db, BaseObjectTypes.Location);
objSearch.SetSearchString("login:" + login);

Is there a better way to get a Location object from TRIM about the currently logged in user. I would be using the User ID/Login  (from AD) which will match the ID in TRIM.

 

3. What is the best approach to search for records based on a select number of Record Types:

I have tried something like this:
TrimMainObjectSearch objSearch1 = new TrimMainObjectSearch(db, BaseObjectTypes.Record);
objSearch.SetSearchString("container:" + container);
objSearch.SetFilterString("type:Record Type 1 or type:Record Type 2 or type:RecordType3");

I ended up doing different queries for each record type, which is of course not efficient.
I was hoping to generate one query but can't seem it get the syntax correct.

Thanks in advance.

 

John

Contact Us

Vivit Worldwide
P.O. Box 18510
Boulder, CO 80308

Email: info@vivit-worldwide.org

Mission

Vivit's mission is to serve
the Hewlett Packard
Enterprise User
Community through
Advocacy, Community,
and Education.