47
Views
3
Comments
Solved
How to avoid that foundation module consumes core modules?
Application Type
Reactive
Service Studio Version
11.55.10 (Build 63997)

Hello dear OS community,

I am struggling with the architecture of my platform. My idea is to have a "common" app that I call "General Modules". In this app I have several Core Modules for different purposes; one for all my roles for all other different apps, other core modules are containing all actions which have to do with data from external databases. Finally I have a module where I lay all reusable modules for other apps, which is called "GM_CommonBlocks". This module consumes from the other core modules, and the specific apps consume from CommonBlocks. Here a screenshot from the modules:

I thought this was a valid approach, however in Mentor Studio I get the warning that a foundation module (GM_CommonBlocks) should not consume from Core Modules (DMLDWH_CS for example). How can I solve this? Should I move the server actions from DMLDWH_CS to GM_CommonBlocks, so that there are no more dependencies? Or there is another better option?

2021-11-12 04-59-31
Manikandan Sambasivam
Solution

Hi,

If GM_CommonBlocks contains only reusable web blocks, set the layer in Discovery and ensure that auto-classification is turned off in AI Mentor.


2016-04-22 00-29-45
Nuno Reis
 
MVP
Solution

Hello.

Your error is seeing GM_CommonBlocks as Foundation module when by what you said is clearly Core.

Reclassify it in Discovery and it should be fine.

2022-12-30 07-28-09
Navneet Garg

you need to check following document

https://success.outsystems.com/documentation/best_practices/architecture/designing_the_architecture_of_your_outsystems_applications/validating_your_application_architecture/

What is wrong?

An upward violation clearly identifies that services are not properly isolated.

How to fix it?

Find the elements that are being consumed and move them to a lower layer. In this case, move the reusable service in A to a Library, eventually to E itself, if it fits in the same concept.

https://success.outsystems.com/documentation/11/monitoring_and_troubleshooting_apps/manage_technical_debt/code_analysis_patterns/

Core module consumed by Foundation

Core module providing services to Foundation modules.

Impact

Foundation modules are not supposed to consume services from a core module. They need to be fully isolated with no business logic or reference to a business module. Otherwise, consuming a foundation might bring unexpected impacts.

How to fix

To get more details on each finding, select "Consumed elements". If a consumed element isn't business logic, move the element to a Foundation module. If a consumed element is business logic, reevaluate if you should move the logic in the Foundation module that is consuming the element to another module.

2021-11-12 04-59-31
Manikandan Sambasivam
Solution

Hi,

If GM_CommonBlocks contains only reusable web blocks, set the layer in Discovery and ensure that auto-classification is turned off in AI Mentor.


2016-04-22 00-29-45
Nuno Reis
 
MVP
Solution

Hello.

Your error is seeing GM_CommonBlocks as Foundation module when by what you said is clearly Core.

Reclassify it in Discovery and it should be fine.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.