Static Entities with Server Actions / Micro-services

Hi All,

I have a micro-services architecture.

My question is, what is the best way to do, what we do when we have access to the Static entity like "ProductColorId = Entity.ProductColor.Green" since now I don't have access to Entities tables?


Obviously we can do it by ID if they are with: Static id (is Autonumber = No) 


Any idea?



Hi Daniel, sorry, but it's not clear why you wouldn't have access to Static Entities from Service Actions.

Have you added the reference to the Color Entity in your module?

I just tried and could use it normally within a Service Action. See an example below:

João Melo wrote:

Hi Daniel, sorry, but it's not clear why you wouldn't have access to Static Entities from Service Actions.

Have you added the reference to the Color Entity in your module?

I just tried and could use it normally within a Service Action. See an example below:


Let me give you more context,
So i have my static entity in CS <- BL (Micro services/Service Actions) <- FE
so i need do some validations in FE, and in FE i don't have access to the Static entities. because i'm passing the content through service actions. 

I'm sorry, but I can't see why Service Actions would prevent you from accessing Static Entities.

Do you wanna share your espaces so I can have a closer look and help you out?

João Melo wrote:

I'm sorry, but I can't see why Service Actions would prevent you from accessing Static Entities.

Do you wanna share your espaces so I can have a closer look and help you out?

@Joao Melo, to have access to the Static entity i need to reference the CS, it's where i have my static entity, But the idea is don't have references from CS to don't have dependencies. well the idea is don't have references from anywhere.  because of that they implemented this architecture, everything need to be exposed from BL. 


Solution

Hi Daniel,

Static entities are weak references in OS11, so you should be good. If you don't want any reference at all, you have to pass stuff by value. But you loose all the true change and impact analysis features.

Regards,

Daniel

Solution

Daniel Rodrigues wrote:

João Melo wrote:

I'm sorry, but I can't see why Service Actions would prevent you from accessing Static Entities.

Do you wanna share your espaces so I can have a closer look and help you out?

@Joao Melo, to have access to the Static entity i need to reference the CS, it's where i have my static entity, But the idea is don't have references from CS to don't have dependencies. well the idea is don't have references from anywhere.  because of that they implemented this architecture, everything need to be exposed from BL. 


Sorry about the delay in catching your needs Daniel. But, indeed, if you don't want to have any references, you can't benefit from features like code completion, design time bindings, strong typing, etc.

From an architecture design's perspective, I don't think that adding references to Static Entities on your CS module would be an issue, as they are not lokely to change.