Posts

Batch Imports Audit

Image
  Batch Imports Audit Knowing What Happened to Your Data Introduction Liferay's Batch Engine is the workhorse behind bulk data movement into Liferay. Instead of creating records one REST call at a time, you POST (or PUT, or DELETE) an array of items to a /batch endpoint for the entity you care about — Objects, Commerce catalogs, channels, product specifications, whatever — and the Batch Engine takes it from there. It queues the work as an asynchronous import task, processes the records, and updates that task's status as it goes, from INITIAL through to COMPLETED (or FAILED). That async, fire-and-forget model is exactly what you want when an external system needs to push thousands of records into Liferay without waiting around for a synchronous response. It's also exactly what makes the next question so important: once you've fired that batch off, how do you know what actually happened to it?   Problem Overview This came up for real on a large-scale B2B commerce proje...

Liferay Workspace: Code Formatter

  Liferay Workspace: Code Formatter How to integrate Spotless Code Formatter to a Liferay Gradle Workspace 1. What is Spotless? Spotless is a nice tool that can auto-format code for multiple programming languages using different build tools to ensure consistent codestyle across the project. It supports different configuration options to provide developers with the possibility to define project-specific codestyle preferences and restrictions. Using code formatters like Spotless you can prevent different code formatting approaches in a single project, make sure the codebase is consistent, avoid possible merge conflicts, and reduce time spent for code reviews. 2. How to integrate Spotless to a Gradle module? To integrate Spotless plugin to a Java module in the Liferay Gradle Workspace you need to: Define Spotless plugin in the module’s build.gradle: plugins {    id "com.diffplug.spotless" version "7.2.1" } Specify Spotless configuration: spotless {    ja...