127
Views
8
Comments
Solved
How to use Service Module?
Service Studio Version
11.54.86 (Build 63808)

Previously, I was using one Reactive module to run the entire application from server action to the CRUD function and client action. Read on forums which suggested that this is not efficient, thus, trying out new approach in building application.

Decided to build a Core Service module which host the database and logic that will be implemented to my main application. But, I am unable to find the service module and add it in as a dependency in the main project despite having the service module set up completed.  Where can I locate or integrate the service module onto my main reactive app?

2024-12-18 16-06-42
Junaid Syed
Solution

Hello Chin,

Typically it is not advised to set ExposeReadOnly to 'No' since beside other reasons it becomes hard to maintain logic and trace as well as troubleshoot the problems.

Since Service modules serves the main purpose of segregating the concerns, it is advisable to keep the ExposeReadOnly as 'Yes' so that there is really segregation of concerns. Further centralizing the CRUD logic will make it easier for you to reuse it in other consumers too.

Hope that answers your question!

Junaid

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP
Solution

You will only find elements of the service.modulemifnyou have set their ispublic property to true, or have at least one aervixe action defined, and successfully published the module.

2024-12-02 13-16-47
Vipin Yadav

Hi @Chin Kai,

In OutSystems, you can use Service modules in your apps to enforce the separation of concerns and encapsulate the core service functionality. 

In a Service module you define the elements that compose your core services:

  • The service logic, using Server Actions and Service Actions.
  • Integrations such as REST.
  • Processes and Timers.
  • Database Entities.

Based on the nature of a core service, it is not possible to have UI related elements in a Service module. Therefore, the following features are not available in Service modules:

  • Interface tab
  • Module properties for UI assets (JavaScript, Global Error Handler, ...)
  • Client-side logic
  • Local Storage Entities
  • Session Variables

I have added below document please check. 

https://success.outsystems.com/documentation/11/building_apps/reusing_and_refactoring/use_services_to_expose_functionality/?_gl=1*hfz923*_gcl_au*OTY4NDU1MTMzLjE3MjY2NDE4NzA.*_ga*NTQzMjQ0NTYwLjE2NDc5NjM5Mjg.*_ga_ZD4DTMHWR2*MTczNDIzODM5OC40LjEuMTczNDMxODkzNS41Ni4wLjA.*_ga_HGKNZZMWJS*MTczNDMxODQxOS44LjEuMTczNDMxODkzNS41My4xLjE5MzcwOTg1MDg.*_ga_G11QMS1MBT*MTczNDMxODQyMC4xODQuMS4xNzM0MzE4OTM1LjAuMC4w

Thanks.

Vipin Yadav 

UserImage.jpg
Chin Kai

Yes, I have read it prior posting on forum. The issue with the reactive Module I created, I am unable to locate or add the service module as a dependency to used its database or server logic in the reactive module.

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP
Solution

You will only find elements of the service.modulemifnyou have set their ispublic property to true, or have at least one aervixe action defined, and successfully published the module.

UserImage.jpg
Chin Kai

Hi Daniel, thanks! Yes I found it now. But for the "Expose Read Only" settings do I change it to "no" if I want to perform CRUD operation?

2024-12-18 16-06-42
Junaid Syed
Solution

Hello Chin,

Typically it is not advised to set ExposeReadOnly to 'No' since beside other reasons it becomes hard to maintain logic and trace as well as troubleshoot the problems.

Since Service modules serves the main purpose of segregating the concerns, it is advisable to keep the ExposeReadOnly as 'Yes' so that there is really segregation of concerns. Further centralizing the CRUD logic will make it easier for you to reuse it in other consumers too.

Hope that answers your question!

Junaid

UserImage.jpg
Chin Kai

Hi Junaid, thanks for the clarification! 

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