cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

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

SH_10321565
4-Participant

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

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

4 REPLIES 4

@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

SH_10321565
4-Participant
(To:PEHOWE)

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.


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

SH_10321565
4-Participant
(To:PEHOWE)

Hello @PEHOWE ,
I am able to build an extension and also I loaded extension. But the main motive is to log the event in Audit log when some file gets downloaded.(In Monitoring -->Audit-->Audit log.So thats not happening.
I am using thingworx version 9.3.13.

Top Tags