I noticed in outsystems there is a new application type call Service, as describe it is use to build centralize and isolate resuable logic and data that can be shared by serveral application.
Anyone have any sample or video that i can learn how to use this service
How do i pass the query parameter to this service REST API and return the result back to the application
How do you share the data entity from this service and use it in other application like dropdown list
Hi Jerah,
So in this case you must set to YES the PUBLIC PROPERTY of your structure, like this:
Your structures are on the data tab, there you select them and change the public property:
But in your case, you will set to YES the structures that are being used in the input and output parameters of your service action, which you will find in the data tab.
Did it help you?
Best Regards.
I'm a little bit confused with your questions.
first, you have a module tupe that is "Service". That kind of modules is oriented to services and don't have the Interface tab.
Then, you have the "Service Actions", that are an abstraction for internal REST APIs but that can be developed like server actions (the pradigm, the approach must be somekind of different because the behavior is different).
In this case, you can create REAT APIs or SOAP APIs in thoose modules like you ever did in other kind of modules.
You can make the data available sharing your data model (setting the entity attribute Public to yes) or you can create structures to expose data and make your GetActions based on that.
I believe this link can help you:
https://success.outsystems.com/Documentation/11/Developing_an_Application/Reuse_and_Refactor/Use_Services_to_Expose_Functionality
Hope this can help you.
Best regards,
Ricardo Pereira
Hi Jerah
You can use services similar to a server action, using input and output parameters.
Look at this example I made
In this case, I'm searching an address by a postal code (CEP code in Brazil) as an input parameter and I return the address details as an output parameter.
Inside my service, I have a REST API GetAddressByCEP function to do this.
I hope it helps you
Thank you for your reply
I try to follow your example;
Inside my service module, i created a service action call ValidateAcc.
But from another application how do you call VaidateAcc
Also how do you return the result to the external application
But i got some error ;
Hi,
The structures (or entities) "ValidRequest" and "validateResponse" aren't defined as public in the structures (or entities) section from Data tab.
Thank you for your help after resolving the error, i am now able to see the ldap service in another application.
Once i added the dependency i can call the function and pass the account and pwd for checking and return the status of the login.
Thank you so much
Sorry for the late reply i was tie up with my work but so glad i manage to learn this many thanks to you :)
Did these answers help you?
Regards