Skip to main content

Extensibility and Integration



Extend Logic with Your Own Code

When developing your app, you might want to leverage existing libraries and SDKs or reuse your own code as opposed to reproducing the functionality that code provides using OutSystems Logic. OutSystems allows you to implement server-side logic using your own code in Extensions.

To create an Extension:

  1. In Integration Studio, click New to create a new Extension module;

  2. Select the Application Server where to publish your extension later;

  3. Right-click the Action folder to define the new actions that will encapsulate your code;

  4. Define any input and output parameters for your action(s);

  5. Generate the stubs for the declared actions;

  6. Code the logic of the actions using your favorite IDE;

  7. Publish the Extension module.

To use the created Extension, for each of your OutSystems applications where you want to use the new Extension, add the Extension module as a dependency. Once the Extension module is a dependency of your application, the logic that the module implements becomes available in the Logic tab of Service Studio.


In this example, we already have a method that calculates the monthly payments for a mortgage. Instead of implementing the same method from scratch using OutSystems logic, we'll encapsulate that method into an Extension module.

To create the Extension module, do the following:

  1. Add a new module to your application, and choose New Extension Module... template;

  2. Name your module MortgageLib;

  3. In Integration Studio, in the Actions folder, create a new CalculateMortage action;

  4. Define the CalculateMortage action signature as displayed in the image below.

    Integration Studio, creating a new extension

  5. To make the action available for reuse, click Edit Source Code. This automatically generates the stubs for the actions and opens the IDE;

  6. Implement and test the code.

    Implementing logic with C#

  7. Once you finish coding, go back to Integration Studio and click on 1-Click Publish, or use F5 to deploy your Extension.


To use the new Extension in your application:

  1. From your Application's detail screen, click on Add Dependency;

  2. From the Manage Dependencies window pick the CalculateMortgage action;

  3. Call the Extension action in your logic. In this example, we call it after validating the end-user input.

    Using action(s) in the extension module; editing an action flow in the development environment

  • Was this article helpful?