Call custom library from server-side script
Hi,
I'm trying to call a custom library from a server-script in version 9.1.1.
I added the dll to the following locations:
\BPM\Deployment\CustomLib
\BPM\Designer\CustomLib
\BPM\Engine\CustomLib
And just in case, but not sure if it's necessary I also added the library to:
\BPM\Engine\dotnetbin
\BPM\Engine\dotnetlib
What else needs to be done? I assume I need to add a reference someway in the project, but I don't know how it's done.
Thanks in advance for any help.
Kind regards,
Chris
Comments
-
Hi Chris,
You don't say whether you are having any specific problems so I assume it's just now how to use library. You'll need to add a reference to the assembly in your server-side script via a using statement. After that you should be able to use the exposed functionality of the assembly.
An engine, deployment service, or designer will need to be restarted after installing an assembly in those folders before either of these components will pick it up.
You do not say what environment you are using or what type of assembly and I have come across some strange situations with some assemblies and environments. Unfortunately, the documantationis a litle sparse on this topic.
Hope this helps
0 -
You may well need to bounce the engine service, we have found in the past.
0 -
Hi Paul,
Thanks for the answer. As you already mentioned, neither could I find a lot of documentation on this and I'm not sure if I took all the steps necessary to make this work.
The thing is, after copying the assembly to those folders, restarting the services (eventually even a system-restart), I can't reference the assembly, I dont' see any namespaces come up in the intellisence, and when I put the using there anyways, I get the compile-error in metastorm of a unknown namespace.
The assembly is now compiled in .Net-2.0. It's not signed. The library contains one public class.
Any thougths on this?
Kind regards,
Chris
0 -
Hi Chris
Double check that the Designer is configured to look for assemblies in the Designer's CustomLib folder.
These locations are specified in the Scripting section of the Designer options.
Iain
0 -
Hi,
Yes, the folder-location is in place.
Kind regards,
Chris
0 -
You don't say what environment you are using and give any details of the assembly.
I have found some really strange behaviour on 64bit platforms. Also Metastorm say that only fully managed code is supported - again not documented as far as I can tell. Is your assembly fully managed? if not you may have to go through some more hoops.
0 -
Hi,
Yes, the assembly is fully managed code, but the assembly is not strong named. The assembly contains one class, compiled to .Net framework 2.0. The code of the class:
using System;
using System.Collections.Generic;
using System.Text;namespace TestLibrary
{
public class TestClass1
{
public static string GetValueStatic()
{
return "Test 1";
}
public TestClass1()
{}
public string GetValueInstance()
{
return "Test 2";
}
}
}The system I'm using:
VMWare with W2K8R2 (x64)
Metastorm 9.1.1
If you need more details of my configuration, just ask.
But do I understand correctly that I took all the necessary steps to implement a custom library so that theoratically it should be working?
0 -
I had an issue recently with an assembly that Designer just wouldn't recognise and this was on a Win2k8 64bit server. The deployment service and engine were fine with it but Designer just wasn't going to have it. In the end I put it in the GAC and everything was fine. I'm not saying it's your problem but it certainly worked for me.
0 -
Hi,
At this point I'm also trying to find ways how I could possible make this work. Unfortunately, placing the assemlby in the GAC didn't work for me.
Once I found a way to make this stuff working, I'll let you know.
Any suggestions on this are most welcome.
Kind regards,
Chris
0 -
We have some of the same challenges and I will share the work-around we settled on. It isn't great but it seems to work.
We have many, many .NET assemblies that are compiled as v2.0. Let's just say that their dependancies chronical the rich history of software development inside our company and there are many that pre-date .NET completely.
Trying to use these DLL's directly with Metastorm was not sucessful.
What we ended-up doing was create a shell DLL, compiled as .NET 3.5 that calls these older 2.0 assemblies. As long as we stick to passing only primitives or objects defined in the 3.5 DLL to Metastorm everything works fine.
0 -
do you have radio selected in Metastorm -> Optopns -> Scripting -> Intellisence (tab) -> All functions (including Microsoft .NET Framework functions) (radio) ?
0 -
You do not say what problems you were experiencing while trying to use these custom assemblies in v9?
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 154 General Questions
- 149 Thrust Services
- 57 Developer Hackathon
- 37 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 33 eDOCS
- 190 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 10 XM Fax
- Follow Categories