Feature ETP-2980: Fix tutorial with new features#571
Conversation
There was a problem hiding this comment.
Pull request overview
This PR comprehensively updates the Etendo RX microservice tutorial to align with the latest workflow using the RX Gradle plugin. The documentation now reflects an automated approach to creating RX modules, replacing previous manual Spring Boot setup instructions with Gradle tasks that handle project scaffolding automatically.
Changes:
- Replaced manual Spring Boot project setup with automated RX Gradle plugin tasks (
rx.init,rx.new.module) - Updated projections and mappings section with revised UI workflows and terminology
- Removed outdated Spring Boot configuration instructions (plugins, dependencies, component scanning) now handled automatically
- Updated image references and section titles to reflect current UI
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| modules_rx/com.tutorial.rxtutorial/src/main/java/com/tutorial/rxtutorial/RxtutorialService.java | ||
| ``` | ||
|
|
||
| 2. Then, copy and paste the following code into the file: | ||
|
|
||
| ```java | ||
| package com.tutorial.rxtutorial; | ||
|
|
||
| import org.springframework.beans.factory.annotation.Autowired; | ||
| import org.springframework.web.bind.annotation.GetMapping; | ||
| import org.springframework.web.bind.annotation.RequestMapping; | ||
| import org.springframework.web.bind.annotation.RestController; | ||
|
|
||
| import com.etendorx.clientrest.base.RestUtils; | ||
| import com.etendorx.clientrest.base.RestUtilsException; | ||
| import com.tutorial.rxtutorial.entities.org.openbravo.model.common.order.OrderRxtutorialModel; | ||
|
|
||
| @RestController | ||
| @RequestMapping(path = "/api") | ||
| public class RxtutorialService { | ||
| public class TutorialService { |
There was a problem hiding this comment.
There is an inconsistency between the filename path given in the instructions and the class name in the code example. Line 383 instructs users to create a file named "RxtutorialService.java", but the class definition in line 402 shows "TutorialService". The filename should match the class name. The instruction should be updated to "TutorialService.java" to match the class name, or the class name should be changed back to "RxtutorialService" to match the filename.
| ### Adding the projection to a table | ||
|
|
||
| As we create the projection, now we need to assign it to a table where we want to extract data. | ||
| For this, open the *Tables and Columns* window and look for the *Order* table (as mentioned in the introduction, we want to consume orders). | ||
| For this, in the tab *Entity Field*, we need to create a new record selecting the table `C_Order`, which is the table that stores the sales orders in Etendo Classic. |
There was a problem hiding this comment.
The subsection title "Adding the projection to a table" is misleading given the updated instructions. In the new workflow, this section actually describes creating a record in the "Entity Field" tab to select the C_Order table, not adding a projection to a table. The subsequent subsection (lines 75-86) is what actually creates the projected entity linking the projection to the table. Consider renaming this subsection to better reflect what the instruction is doing, or restructure the workflow to be more intuitive (e.g., create the projected entity first, then add entity fields).
| | ---------- | ---------------------------------------------- | | ||
| | Projection |`rxtutorial - tutorial - 1.0.0 - English (USA)` | | ||
| | Table |`C_Order` | | ||
| | Mapping Type | `Etendo to external system` | |
There was a problem hiding this comment.
Inconsistent table formatting: The "Mapping Type" row has an extra space after the field name before the pipe separator, while the "Table" row does not. For consistency with the rest of the table formatting in the document, remove the extra space so the format matches: | Mapping Type | instead of | Mapping Type | (with space before pipe).
| | Mapping Type | `Etendo to external system` | | |
| | Mapping Type| `Etendo to external system` | |
|
|
||
| As we create the projection, now we need to assign it to a table where we want to extract data. | ||
| For this, open the *Tables and Columns* window and look for the *Order* table (as mentioned in the introduction, we want to consume orders). | ||
| For this, in the tab *Entity Field*, we need to create a new record selecting the table `C_Order`, which is the table that stores the sales orders in Etendo Classic. |
There was a problem hiding this comment.
This instruction is confusing and appears to be out of sequence. The section "Adding the projection to a table" mentions creating a record in the "Entity Field" tab by selecting the C_Order table, but this doesn't align with the workflow. Based on the next subsection "Adding a projected entity" (lines 75-86), it seems the projection should first be created at the header level (which was done in lines 59-68), then a projected entity should be added in the "Projected Entities" tab, and finally entity fields should be added in the "Entity Field" tab. This line appears to skip the projected entity creation step and directly mentions entity fields, which creates confusion about the correct workflow sequence.
This pull request significantly updates the Etendo RX microservice tutorial to clarify and modernize the workflow for creating a new microservice, aligning it with the latest RX Gradle plugin and project structure. The documentation now emphasizes using Gradle tasks for module and entity generation, streamlines instructions for projections and mappings, and removes outdated manual Spring Boot setup steps. Several images and section titles were updated for accuracy and clarity.
Major documentation improvements:
rx.init,rx.new.module), and generating entities.Minor corrections and clarifications:
TutorialServiceinstead ofRxtutorialService).General guidance improvements:
These changes make the tutorial more accurate, maintainable, and easier for new developers to follow.