HPE Software Products: SDK / API Support
Share |

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

 

Search in all metadata using .NET APIOpen in a New Window

Hi All,

Please escuse me of my query seems a bit silly. BUt i have seaarch in the help doc and did not find any refernce to this.

We have just started working on creating a custom portal for an HPRM8.3 setup.

While coding I encountered that i have to provide a 'search by' option along with the phrase to search.

My requirment is to search the phrase in  ALL options/fields insted of just title or note.

Is there any inherent option which lets me do that ?

eg.

In code currently i write,

TrimMainObjectSearch search = .....

search.SetSearchString("typedTitle:galaxy");

which only searches for 'galaxy' in title of record

But what chnages should I do to this code If my user wants to search for 'galaxy' in all fileds insted of just title field. 

 

 

CM 9 Fresh Install and fail on tsjApi.dllOpen in a New Window

Hello all,

After a few years away on sabbatical I have perched on a HPE CM 9 upgrade. This is the first issue I have come across:

Summary

When installing HPE CM9 client for the first time on a new machine the installation doesn't appear to integrate with Office out-of-the-box because it expects tsjApi.dll to be in the place it was installed in previous versions. The 9.0.0.279 64 bit version of tsjAPI.dll as installed isn't a signed assembly or a registerable COM object.

Solution

Don't have one. i will determine that the file shipped is corrupt or just my install but I've tried twice so far.

Steps to Replicate

Using VMWare virtual Windows 7 Enterprise SP1 and Office 2013

Installed then un-installed TRIM 7.3.5 and had a bit of a careful clean up to be sure there were no registry entries or folders hanging about.

Installed HPE CM9 version 9.0.0..2.01 64 bit base (Client only) with Word and Excel integration turned on

Installed (after RTFM)  September 2016 patch 2 HP_CM_x64 with GUID {92472F18-0A60-4066-961A-94AB65094369}

Checked registry entries for Word and Excel integration. All as expected

Went to run Word or Excel. No integration. Hmm. Time for a look at the error message in Excel:

HPE Issue Image 1.pngHPE Issue Image 2.png

in the event viewer I got these little nuggets:

Log file opened for writing at C:\Users\<user>\AppData\Roaming\Hewlett-Packard\HP TRIM\OfficeIntegration\Logs\OfficeIntegration.Excel.log by 'STAFF\<user>' (9.0.0.279[120533])

System.TypeInitializationException (-2146233036): The type initializer for 'HP.HPRM.OfficeIntegration.SDK.SDKHelper' threw an exception.. The type initializer for 'HP.HPTRIM.SDK.trimPINVOKE' threw an exception. at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)

at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)

at System.Activator.CreateInstance(Type type, Object[] args)

at HP.HPTRIM.Framework.Reflection.Reflection.GetObjectOfType[T](String assemblyName, String className, Object[] args)

at HP.HPRM.OfficeIntegration.OfficeIntegrationGlobals.GetAPIHelper(String binariesLocation)

at HP.HPRM.OfficeIntegration.OfficeIntegrationGlobals..ctor(Type typeOfAddin)

Useless right? Well not really because then I tried to replicate the issue by calling the same method from VS2013:

    class Program
    {
        static void Main(string[] args)
        {
            HP.HPTRIM.Framework.Logging.Asynchronous.Log log = new HP.HPTRIM.Framework.Logging.Asynchronous.Log();
            HP.HPRM.OfficeIntegration.SDK.SDKHelper helper 
                = new HP.HPRM.OfficeIntegration.SDK.SDKHelper(log, "Excel", @"C:\Users\user1\AppData\Roaming\Hewlett-Packard\HP TRIM\OfficeIntegration\Logs");
            Console.WriteLine(helper.GetOfflineRecordsPath());

        }
    }

This threw a very interesting stack trace. The inner exception appears below:

 

                 Message=HP.HPTRIM.SDK.dll - Unable to load tsjApi.dll. Additional information follows.
TrimApplication.TrimBinariesLoadPath: <not set>
Trying assembly directory. Search path: C:\Windows\assembly\GAC_MSIL\HP.HPTRIM.SDK\8.2.0.0__93ab772ef8ad9a2e\tsjApi.dll . File does not exist.
Trying parent directories of assembly directory. Search path: C:\Windows\assembly\GAC_MSIL\HP.HPTRIM.SDK\8.2.0.0__93ab772ef8ad9a2e\tsjApi.dll . File does not exist.
Trying parent directories of assembly directory. Search path: C:\Windows\assembly\GAC_MSIL\HP.HPTRIM.SDK\tsjApi.dll . File does not exist.
Trying parent directories of assembly directory. Search path: C:\Windows\assembly\GAC_MSIL\tsjApi.dll . File does not exist.
Trying parent directories of assembly directory. Search path: C:\Windows\assembly\tsjApi.dll . File does not exist.
Trying parent directories of assembly directory. Search path: C:\Windows\tsjApi.dll . File does not exist.
Trying parent directories of assembly directory. Search path: C:\tsjApi.dll . File does not exist.

When I copy the file to the root of C: I get this

Trying parent directories of assembly directory. Search path: C:\tsjApi.dll . Error: %1 is not a valid Win32 application

 

Service API - Detecting a Timeout when performing a SearchOpen in a New Window

When performing a Search for records when we get a timeout we still seem to be having a Response returned by the service API, rather than an Exception of any kind.

 

Is there a way to check if a timeout has occured ?

 

ServiceAPI - Performing a 'Phrase' search of RecordsOpen in a New Window

We are using the .NET Wrapper around the service API, and we are trying to perform a Phrase search for documents

This should consist be achievable by having the Q property set to 

content:"phrase to search"

 

However this seems to actually perform a search on each term individually, rather than the phrase.

Can anyone advise how to get a phrase search to work ?

 

 

Bulk update of user defined fields for containers using RESTOpen in a New Window

Hi,

I am currently using HPE CM 9 Patch 2 with the ServiceAPI V 1.0 and am performing a batch update operation on a series of containers using the API endpoint: /HPECMServiceAPI/json/Reply/Record[]

An example of the Body of the REST web service call I am making is:
[{"RecordLongNumber":"S12345E","Uri":"21289572","RecordTitle":"Test 2","DateOfBirthDdMmYyyy":"01/02/2003"}]

While the record title is being updated just fine, I am finding that the value for the user defined field DateOfBirthDdMmYyyy is being completely ignored.

Is anyone able to advise me on how I can update user defined fields as part of a bulk update operation on the ServiceAPI? I am finding the documentation to be a little sparse.

Thanks!

Mike

 

Installing HP RM 8.3 on Azure for Dev & TestOpen in a New Window

Hi All,

Since the development and testing efforts required for HP RM are limited, we were thinking of creating a dev and test environmet for creating custom application with HP RM 8.3 as their backend on Azure cloud.

So my question is if I create a Virtual Machine in Azure having ActiveDirectory, SQL and HP ERM8.3 in one machine and other VM containing Development tools liks HP ERM 8.3 SDK, Visual Studio, etc. then would there be any issues during the installation, configuration, usage of RM8.3 ?

I had read in one of the blogs that there is some issues with search if we put HP ERM on cloud, but i don't know how reliable is the source.

regards,

Rohan W.

 

HP ERM 8.3 and SDK on different networksOpen in a New Window

Hi All,

I'm trying to create a custom client for HP ERM system. For the same I will be developing on my local network.

But due to policy issues I cannot have a ActiveDirectory instance in my network.

I was thinking of adding the ActiveDirectory and HP ERM server on a VM in a isolated network which my development environment can access using HTTP/HTTPs or RDP.

If I do this, I guess I will have issues in authentication as my local users (intranet users) will not be having rights in HP ERM as HP ERM will be configured with users and roles present in the isolated networks AD. 

Have you guys ever implimented such scenario. If so did you face any issues especially with security ?

 

 

 

How to Mass Upload R&D Schedule Trigger EventsOpen in a New Window

Hi All,

We have a huge number of R&D Schedules defined in the HP Records Manager. Recently there has been a change in the Trigger Events (from 'Date Closed' to 'Last Action Date'). 

The manual way of making the above change on all the Schedules will take a long time; is there any way I can update all the Schedules at the same time?

Thanks,

(Hamed)

 

Check user permission to record in service APIOpen in a New Window

Hi,

We're updating our TRIM instance from 7 to RM8.3. As part of this we need to rewrite an integration we have since the SOAP web services aren't available in 8.3.

We're having difficulty checking if a location has access to a record. For the SOAP web service we're using

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:trim="http://www.towersoft.com/schema/webservice/trim2/">
<soapenv:Body>
    <trim:Execute>
        <trim:req>
            <trim:ObjectStringSearchSelect>
                <trim:TargetForUpdate>false</trim:TargetForUpdate>
                <trim:IsForUpdate>false</trim:IsForUpdate>
                <trim:Limit>0</trim:Limit>
                <trim:Skip>0</trim:Skip>
                <trim:TrimObjectType>record</trim:TrimObjectType>
                <trim:Search>container:[[containerID]]</trim:Search>
                <trim:Sort>registeredon-</trim:Sort>
            </trim:ObjectStringSearchSelect>
            <trim:HasAccess>
                <trim:TargetForUpdate>false</trim:TargetForUpdate>
                <trim:AclType>2</trim:AclType>
                <trim:LocationUri>[[userURI]]</trim:LocationUri>
            </trim:HasAccess>
            <trim:Fetch>
                <trim:TargetForUpdate>false</trim:TargetForUpdate>
                <trim:Items>
                    <trim:SpecificationProperty>
                        <trim:Name>rectypedtitle</trim:Name>
                    </trim:SpecificationProperty>
                    <trim:SpecificationProperty>
                        <trim:Name>uri</trim:Name>
                    </trim:SpecificationProperty>
                    <trim:SpecificationProperty>
                        <trim:Name>recextension</trim:Name>
                    </trim:SpecificationProperty>
                    <trim:SpecificationProperty>
                        <trim:Name>recdocumentsize</trim:Name>
                    </trim:SpecificationProperty>
                </trim:Items>
                <trim:HideVersion>true</trim:HideVersion>
            </trim:Fetch>
            <trim:HideVersionNumbers>true</trim:HideVersionNumbers>
            <trim:ProvideTimingResults>false</trim:ProvideTimingResults>
            <trim:ForceRealTimeCacheUpdate>false</trim:ForceRealTimeCacheUpdate>
        </trim:req>
    </trim:Execute>
</soapenv:Body>
</soapenv:Envelope>

This gives us the content of a container, and whether or not the location with the specified URI has permission to view the records.

We can't find something similar in the Service API. We have got how to get the content of a container (/Record?q=container:<<container title>>&format=json&properties=title,uri,recordDocumentSize,recordExtension), and the uri of a location (/Location?format=json&q=locUnique:<<username>>&properties=uri) . What we're missing is how to ensure the location has view access to the record.

Does anyone have any ideas?

 

How to check permissions about a recordOpen in a New Window

I would like to use the .NET SDK to query the permissions (ACL) for a user to determine if they have access to view the record and also what properties they can access.

I found that even though a user may access a record, there are some properties (i.e. Container) that they may not be able to access.

 

HP ERM 8.3 and Active Directory & SecurityOpen in a New Window

Hi All,
I was looking at the documentation & installation steps for the HP ERM 8.3 solution and from my limited reading I understand that it relies on Active Directory to provide security.

My question was if I try to access an HP ERM8.3 from another machine (using the SDK) what kind of user will I need to be ? Also how does the overall security work in Record Manager system when we use SDK ? Finally is it possible to impersonate different users during execution ?

Any links or references will be really helpful.

regards,

Rohan W.

 

Question on Titling in HPE Records Manager 8.3Open in a New Window

I have a question on certain built-in properties and what they are used for (intended purpose).

What are the Title, Title (Free text), and Title (structured) used for?

I am working with our organization to help them build a custom web app to interface with an existing HP RM that was built prior to the folks here who manage it.

Right now they do not use Title or Title (Free Text) for anything. The Title (structured) property is used in conjunction with Classification.

They also have an additional field named "Name" which they use as a name for the record. But what I have read in the manuals and SDK it looks like Title should be used for that. This has become an issue as we are trying to search for information in the additonal field "Name" and many searches come back empty even though something exists in the Name field. They also have the box clicked for excluding the "Free Text Title" when creating records.

Not sure what the recommended practice is with HP RM about these items. I would appreciate any insight into how the recommended approach is to inputting data and using those fields.

 

Searching for record typesOpen in a New Window

I would like to search for record types that match on one or the other.
Basically I want to formulate an "or" clause in the SQL statement.

I am using the following code:

TrimMainObjectSearch objSearch = new TrimMainObjectSearch(db, BaseObjectTypes.Record);
objSearch.SetSearchString(queryString);
queryString would be something like "recNumber:xxxx"

I want to add a filter or another search criteria that specifies to only return records that match on one of 2 record types

I tried something like objSearch.SetFilterString("type:\"recordtype1\" or type:\"recordtype2\"");

But it doesn't like the or. I also tried using the objSearch.AddFilterClause() and objSearch.Or() but was unsuccessful.

Any suggestions?

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.