Implement a logging mechanism that records any changes made to a User object in Liferay. This mechanism will capture the changed fields and store them in a 'log' object within Liferay. Additionally, it will include the timestamp from an external service located at http://worldtimeapi.org/api/timezone/Asia/Tokyo to ensure accurate timing based on the Tokyo timezone.
Download the workspace and run gw initBundle
.
- After writing your CX code in your CX classes, start your Liferay bundle.
- Run
./restart.sh
in the Node.js app (please use node 18 ->nvm use v18.14.2) . - For the Java app, run
gw clean && gw deploy && gw bootRun
.
- Create an object called
log
with two text fields:datetime
andmessage
. - Go to the user object and configure an action to trigger our CX "on updating" the user object.