Skip to main content
4-Participant
June 10, 2024
Question

Thingworx: How create a custom event in Java that logs event in Audit logs when file is downloaded.

  • June 10, 2024
  • 1 reply
  • 1721 views

I'm looking to create an custom event in Java SDK using Eclipse that logs event in Audit logs when I download a file using a custom action. I have to log the information like which file is downloaded, who downloaded file, when file is downloaded under which category etc.I have to build this file and import this extension in thingworx.
I need help in the steps. This is totally new to me, so please help me from the basics.
Steps I have followed:
1. Installed eclipse
2. Download  Eclipse Plugin and  Thingworx extension
3. Configured them in eclipse

1 reply

17-Peridot
June 11, 2024

@SH_10321565 ,
Please review on online help which has the step presented in the online help:
Using The Eclipse Plugin

 

If you have questions about the steps, please post were you are in the process and what issue are you encountering?
Including the version information of the Software involved will improve any direction provided.

Have Fun

Pehowe

4-Participant
June 12, 2024

Hi @PEHOWE ,
I have downloaded and installed eclipse-java-2024-03-R-win32-x86_64 as per steps mentioned in link. Also downloaded and configured Eclipse Plugin and  Thingworx extension in Eclipse.
I am in the process of writing a custom event  to log an event in Audit logs when file is downloaded. And Need a help in the code for creating an event.
I have enable the Audit Subsystem as  well  followed by link https://support.ptc.com/help/thingworx/platform/r9.5/en/index.html#page/ThingWorx/Help/Composer/System/Subsystems/AuditSubsystemEnabling.html#
I have written a sample code for the event. But its not logging an event to Audit logs.
Attached is the code.


17-Peridot
June 12, 2024

Hello @SH_10321565 ,

The code looks to be general and reasonable. My environment is not working today. I will have to reconfigure.
Have you been able to build the extension?
Have you loaded the Extension?

What Version of ThingWorx?

 

Pehowe