Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
nirajkumar_chap Absent Member.
Absent Member.
3978 views

Problem in Events Callout Interface trigger


Hello,

I am trying to build a trigger based on the Event Callout Interface.

I am running dm_make on a Windows XP 32-bit machine for my sample event called FilePrinter. It simply creates a file output.txt and writes a string in it whenever it is called.

And for that i have edited the INTELNTVC2008 provided in the example to include "../Microsoft Visual Studio 9.0/VC/include" folder. The command is successful and it creates the following files in the / folder (in my case: INTELNTVC2008/FilePrinter)

1. libpcmsuu.dll

2. libpcmsuu.exp

3. libpcmsuu.dll.manifest

4. user_suppliedu.md

5. user_suppliedu.obj

6. libpcmsuu.lib

7. user_supplied.pdb.

While the README.txt provided with the examples says that the next step is to copy a file named 'libpcmsu.so' to $DM_ROOT/lib/.

So, my first question is. In my scenario, no file with the name "libpcmsu.so" was created.Is it because my runtime is Visual C and it's .so equivalent is .dll?

Although, just to try it out, i copied all the above files to the server machine(where the serena dimensions cm server application is installed), which is running 64-bit Windows Server 2008 as the operating system. And tried both, putting them in $DM_ROOT/lib, as well as placing them someplace else and setting the LB_LIBRARY_PATH to point to that folder. But the event is not being triggered in either of those two cases when i perform GET/DELIVER from Serena Dimensions CM client application from my XP machine.

Also, is it necessary that the dm_make should be done for the platform on which the server application of Serena is running?

Any solutions or suggestions? I am quite new to this.

Regards.
0 Likes
23 Replies
Micro Focus Expert
Micro Focus Expert

Re: Problem in Events Callout Interface trigger


Hello Niraj

Please note: If you are looking to install the trigger on the server then you need to compile on an equivalent system e.g. 64bit Win2008 machine rather than a 32bit XP machine.

1. Rename libpcmsuu.dll to libpcmsu.dll,

2. In %DM_ROOT%\prog copy libpcmsu.dll to libpcmsu.dll_orig

3. Stop the listener service

4. Copy libpcmsu.dll into %DM_ROOT%\prog

5. Start the listener service

6. Login to the client,perform a relevant action and check if the file is created

Please note: the file will be created on a path local to the server not the client.
0 Likes
nirajkumar_chap Absent Member.
Absent Member.

Re: Problem in Events Callout Interface trigger


Thank you for such quick and precise response. Things are really much clearer now. 🙂

So, i understand how the deployment is done. Although i do have a little request. If it is possible for anyone to share an example/sample arch file for Visual C x64 platform, it would really make my work easier.
0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Problem in Events Callout Interface trigger


Hello Niraj

there is an example on the knowledgebase

http://knowledgebase.serena.com/InfoC.
0 Likes
nirajkumar_chap Absent Member.
Absent Member.

Re: Problem in Events Callout Interface trigger


Update: I tried by modifying the 32bit platform file i had. The dm_make is once again successful for the 64-bit Server machine and i deployed the .dll as you instructed. But still the trigger is not being generated. The arch file i tried is as follows : http://pastebin.com/rna0bt4Z

For triggering the event, i tried get-deliver from both explorer view as well as serena cm client. But the .txt file is not being generated. Any idea on how to trace the error?
0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Problem in Events Callout Interface trigger


Hello Niraj

best if you first follow the instructions in the KB doc. Also please be aware that if your database is non unicode then you will need to build the multibyte version of the trigger and install that as well.
0 Likes
nirajkumar_chap Absent Member.
Absent Member.

Re: Problem in Events Callout Interface trigger


Once again i am thankful for the prompt response. The problem is that i have Serena v12.2.1 and in that version the '../pcms_api/examples/arch/config' folder does not contain the WIN64VC2008 as referenced in the knowledge base. Hence, i requested if anyone could share that particular file, it would make my task much easier.
0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Problem in Events Callout Interface trigger


Hello Niraj

I am not sure if I can attach files to hese queries so please share your email address with me and I will send you the file.
0 Likes
nirajkumar_chap Absent Member.
Absent Member.

Re: Problem in Events Callout Interface trigger


Hey Paul.

It is nirajkumar.chapla@opshub.com
0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Problem in Events Callout Interface trigger


Hello Niraj

file sent.
0 Likes
nirajkumar_chap Absent Member.
Absent Member.

Re: Problem in Events Callout Interface trigger


I received the file. Thank you Paul.

I'll try using that and get back with my results. Hopefully, it will solve my problem. 🙂
0 Likes
nirajkumar_chap Absent Member.
Absent Member.

Re: Problem in Events Callout Interface trigger


Hello again.

I am sorry for such a late follow-up.

I tried the procedure with the file you provided. Once again the dm_make process is successful. I deploy it in the DM_ROOT/prog. But the event is still not being triggered.

I verified that my SQL Server has Unicode collation so that leaves out building with the extra flag.

My sample application just creates a text file with an integer printed in it. I even configured it to work only on DELIVER events, thus implementing the First Call - Real Call check. Yet nothing.

Is there anyway through some logs i can verify where the blocking is?

Regards
0 Likes
nirajkumar_chap Absent Member.
Absent Member.

Re: Problem in Events Callout Interface trigger


Hello?

Is there any way to trace the event?
0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Problem in Events Callout Interface trigger


Hello Niraj

please build as a multibyte version and then install the .DLL (no need to rename it).
0 Likes
nirajkumar_chap Absent Member.
Absent Member.

Re: Problem in Events Callout Interface trigger


Hello again.

Sorry for such a late reply. But i dont think any of the above solutions are working.

I'll listing down the actions that i am performing for the trigger to run. Maybe i am doing something wrong.

My System - Server : Windows Server 2008 Enterprise R2

Client : Windows XP

Version: Serena Dimensions CM 12.2.1

1. I created a FilePrinter folder in '..pcms_api\examples\events' for my new event.It has a FilePrinter.mk and user_supplied.c. (Content of both can be seen here: User Supplied | Another user supplied | Make File).

2. The WIN64VC2008 file in my '..pcms_api\examples\ arch\config\' is edited to properly refer the DM_ROOT location and also the /WX flags are removed. (Content : config file ).

3. I start 'Visual Studio 2008 x64 Win64 Command Prompt' and i set it up for 64bit mode by running '\bin\AMD64\vcvars64.bat'.

4. I traverse to the '..pcms_api\examples\' from the prompt and then i execute the following command : dm_make --no-cm ARCH=WIN64VC2008 EVENT=DeliverEvent TYPE=event all.

5. It builds the files in '..pcms_api\examples\WIN64VC2008\FilePrinter'.

6. I rename the libpcmsuu.dll to libpcmsu.dll.

7. I deploy the .dll to '%DM_ROOT%\prog\' after stopping the Serena Listener Service temporarily. After copying,i restart the service. (the original file in the /prog folder has been kept as backup).

8. I run the client from another pc and i try to get-deliver some files. But, i see no .txt file created.

My database coallation is Unicode. Yet, I have tried the above process with 'MBCS_NEEDED=y' and then deploying the libpcmsum.dll in the /prog. (And keeping the original libpcmsuu.dll). But no trigger in that case either. I cant really think of anything that i am missing on my side. Any thoughts?

Is there any other way in which i can know, whether Serena has called the shared library or not?

Regards
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.