Trident Database/Registry Access Issue using a Web Service

Jul 22, 2010 at 3:27 AM

Hello,

We are using the old Trident version, before it went open source.

The workflow metadata is stored in the Trident registry or database and we plan on accessing that through code.

We are using custom API provided by Trident team to access the Trident registry or database.

The API code takes as an input the location of the 'ConnStore-Application.configSources' file which stores the details of the Trident back end. When we write this registry access code in a simple Console Application and run it, it gives the desired output. It runs using the logged in user account and hence runs fine.

When we create a web service with this API code for accessing the Trident registry/backend, and we hit the web service, we get a ProviderMissingException from the Microsoft.Research.DataLayer class. This is a custom exception from the Trident API dll. Whereas, when we write simple ADO.NET code to access the Trident backend database (using simple connection string) in a web service, it works perfectly. So this does not seem to be permissions issue for the Trident database. It seems to be some issue in the Trident API DLL code.

Please find the API code used below for reference.

Thanks,

Prashant

 

Registry Access API Code

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

using SR = Microsoft.Research.DataLayer;
using Microsoft.Research.DataLayer;
using TridentAPI;

                Connection registryConnection = null;
                SR_Connection.Init();
                string configFilePath = Path.Combine(@"C:\Users\psabhnan\AppData\Roaming\Research\Trident\", "ConnStore-Application.configSources");
                ConnectionManager connMgr
                    = ConnectionManager.CreateCustom(ConnectionManager.CancelBehavior.ThrowException, configFilePath);
                
                registryConnection
                    = connMgr.PickConnection(ConnectionManager.ConnectionUI.NeverShowUI);
                if (registryConnection == null)
                    Console.Write("Not opened");
                else
                    Console.Write("Opened");
                List<WorkflowRun> returnData = new List<WorkflowRun>();
                WorkflowManagerService wms = new WorkflowManagerService(registryConnection);
                Collection<SR.Job> jobList = wms.GetCompletedJobs(null);

 

 

Jul 22, 2010 at 12:50 PM

Hi Prashant,

The ProviderMissingException is thrown when a provider is not found in the base directory of the application. Please copy the following assemblies from your install location (e.g., C:\Program Files\Microsoft Project Trident - A Scientific Workflow Workbench) to your application base directory.

1. Microsoft.Research.DataLayer.DataLayerSecurity.dll

2. Microsoft.Research.DataLayer.DataProvider.dll

3. Microsoft.Research.DataLayer.DataProviders.Microsoft.dll

4. Microsoft.Research.DataLayer.DataProvidersSecurity.Activity.dll

 

Regards,

Trident Support Team

Oct 28, 2010 at 3:01 PM

Hi,

Can you please let us know if our response solved your questions?

Thanks,
Trident Support Team

Oct 31, 2010 at 12:48 AM

I have the same problem, this solution works

Many thanks