Skip to main content

Extensibility and Integration

 

OutSystems

Update the Extension Source Code

The Update Source Code operation synchronizes the source code you added in the IDE (Integrated Development Environment) with the definition of the extension elements. This operation involves the following steps:

  1. Generate the template files according to the definition of your actions, structures, and entities.

    If one of these files does not exist as an extension resource, then this operation implicitly adds the file as a resource, except when the extension does not contain any source files at all.

  2. Update the extension implementation files, according to the extension definition in Integration Studio.

    Any changes you have made directly in these files are overridden in this step.

  3. Merge the <extension_name>.cs file in .NET application server; the Act<ActionName>.java file in a J2EE application sever; or both files in a (Both) application server. This operation updates the signatures of the methods with the action definition, but is applied only to the signatures: the body of the methods remains as is.

    Any changes you have made in the signatures of the methods directly in the IDE are overridden in this step.

How to update the extension source code

In the File menu or Toolbar, click Update Source Code or 1-Click Publish .

The Update Source Code operation is also executed when you edit source code or verify the extension.

Merge Algorithm

The merge algorithm is responsible for updating the source code with the changes made in the extension definition. The next steps describe the merge algorithm:

  • Scan the source files that contain the signatures of the actions and, by name, verifies whether the signatures in these files are according to the action definition in Integration Studio.

    To perform this verification, Integration Studio compares the content of the actions template, generated previously, and <extension_name>.cs, in a .NET application server, or the Act<ActionName>.java file, in a J2EE application server:

    1. If the signature in the template is the same as in the source file, then proceed to next action.

    2. If the signature in the template is different from the source file, then update <extension_name>.cs, in a .NET application server, or the Act<ActionName>.java file, in a J2EE application server, with the new definition as defined in the template.

    3. If the signature in the template does not exist in the source file, then add the new definition as defined in the template to <extension_name>.cs, in a .NET application server, or to the Act<ActionName>.java file, in a J2EE application server.

In some situations, the Merge algorithm might not be able to establish the correspondence between an element in the template file and in the source files, for example if you change an action name. In this situation, you should use the Compare with Template operation.

  • Was this article helpful?