Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENDOC-771-Data-model #797

Merged
merged 2 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 23 additions & 4 deletions vuepress/docs/next/tutorials/create/ms/update-data-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This tutorial explains how to use the [Entando Component Generator](../../../doc
A [Blueprint-generated project](./generate-microservices-and-micro-frontends.md)

## Tutorial
The steps below assume you're working out of the root directory of the microservice, e.g. /microservices/conference-ms.
The steps below must be performed from the directory of the specific microservice, e.g. /microservices/conference-ms.

1. Use JHipster to extract the current application description. The resulting JHipster Domain Language (JDL) file contains your project's application configuration and entity definitions:
```
Expand All @@ -22,7 +22,7 @@ ent jhipster export-jdl export.jdl
```
entity Conference {
name String
}
}
```
3. Enhance this definition by adding fields, entities, table mappings, field validation, etc. This is easily accomplished with the [online JDL-Studio or corresponding JHipster IDE plugins/extensions](https://www.jhipster.tech/jdl/intro). For example:
```
Expand Down Expand Up @@ -53,9 +53,28 @@ This file content adds two fields to the Conference entity, introduces the Sessi
```
ent jhipster import-jdl conference.jdl
```
If the default project structure has been retained, this step will update your data model, add entries to Liquibase to upgrade database schema during deployment, add service methods to your microservice, add fields to your MFEs, etc.

5. You can now build your updated project and [run it locally](./run-local.md) or [deploy it to Entando](../pb/publish-project-bundle.md). Definition enhancement through build and test can be repeated as many times as needed.
If the default project structure has been retained, this step updates your data model, adds entries to Liquibase to upgrade database schema during deployment, adds service methods to your microservice, adds fields to your MFEs, etc.
- For pre-existing micro frontends, they need to be moved because they have been regenerated. From the project directory:

```shell
mv microservices/conference-ms/ui/widgets/conference/tableWidget/{.,}* microfrontends/conference-table
```

- For new micro frontends, use the ent CLI to add them to the bundle descriptor, relocate them, and add an API claim to extablish the connection. From the project directory:
1. Add the new MFE and move it to the `microfrontends/YOUR-NEW-MFE` folder:
```shell
ent bundle mfe add YOUR-NEW-MFE
alepintus marked this conversation as resolved.
Show resolved Hide resolved
mv microservices/conference-ms/ui/widgets/conference/YOUR-NEW-MFE/{.,}* microfrontends/YOUR-NEW-MFE
```
2. Add an API claim to connect the new MFE to the pertinent microservice. If this is an extension of the Blueprint generated project, an API claim should connect the new MFE to the `conference-ms` microservice.

```
ent bundle api add YOUR-NEW-MFE conference-api --serviceName=conference-ms --serviceUrl=http://localhost:8081
alepintus marked this conversation as resolved.
Show resolved Hide resolved
```

See the [Generate Microservices and Micro Frontends](./generate-microservices-and-micro-frontends.md#configure-the-components) tutorial for step by step directions to adjust the bundle.

5. You can now build your updated project and [run it locally](./run-local.md) or [deploy it to Entando](../pb/publish-project-bundle.md). Definition enhancement through build and test can be repeated as many times as needed.


20 changes: 19 additions & 1 deletion vuepress/docs/v7.3/tutorials/create/ms/update-data-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,25 @@ This file content adds two fields to the Conference entity, introduces the Sessi
```
ent jhipster import-jdl conference.jdl
```
If the default project structure has been retained, this step will update your data model, add entries to Liquibase to upgrade database schema during deployment, add service methods to your microservice, add fields to your MFEs, etc.
If the default project structure has been retained, this step updates your data model, adds entries to Liquibase to upgrade database schema during deployment, adds service methods to your microservice, adds fields to your MFEs, etc.
- For pre-existing micro frontends, they need to be moved because they have been regenerated. From the project directory:

```shell
mv microservices/conference-ms/ui/widgets/conference/tableWidget/{.,}* microfrontends/conference-table
```

- For new micro frontends, use the ent CLI to add them to the bundle descriptor, relocate them, and add an API claim to extablish the connection. From the project directory:
1. Add the new MFE and move it to the `microfrontends/YOUR-NEW-MFE` folder:
```shell
ent bundle mfe add YOUR-NEW-MFE
mv microservices/conference-ms/ui/widgets/conference/YOUR-NEW-MFE/{.,}* microfrontends/YOUR-NEW-MFE
```
2. Add an API claim to connect the new MFE to the pertinent microservice. If this is an extension of the Blueprint generated project, an API claim should connect the new MFE to the `conference-ms` microservice.

```
ent bundle api add YOUR-NEW-MFE conference-api --serviceName=conference-ms --serviceUrl=http://localhost:8081
```
See the [Generate Microservices and Micro Frontends](./generate-microservices-and-micro-frontends.md#configure-the-components) tutorial for step by step directions to adjust the bundle.

5. You can now build your updated project and [run it locally](./run-local.md) or [deploy it to Entando](../pb/publish-project-bundle.md). Definition enhancement through build and test can be repeated as many times as needed.

Expand Down