Extensions and Configuration
R24 AMR | Min(s) read

Python Script

This feature allows user to extend the framework to have customized validations as per their needs. This allows the user to store it as part of separate python hooks rather than making the change to the core framework. Validations can be performed both in request and response payloads.

Refer Supporting Python Script to know more about Python Script.

Creating and Editing Python Script

This section details about creating and editing Python Script.

Creating Python Script

To create a Python Script,

  1. Navigate to Extensions > Python Script, on the left pane of the dashboard.
  2. Click Add Python Script on the Search page.
  3. Enter the following details in the New Python Script screen.
    FieldActionMandatory – YES/NODefault Value
    Script NameEnter a relevant Python Script name. Tab out  from this field appends .py by default YES 
    Extension TypeDropdown, select API Extension, UX Resource Extension or Payments Extension YESFirst value from the list – API Extension
    War NameSelect a war file from the dropdown. This field is shown only for API Extension type. YES (for API Extension)First value in the list
  4. Enter the mandatory fields and the Python Script in the editor. Default script is loaded for each Extension Type.
  5. Click Create to create and store the Python Script in Generic Configuration Microservice.

    Python script for Extension Type: API Extension

    Python Script for Extension Type: UX Resource Extension (uses irf-rp-services.war by default)

    Python Script for Extension Type: Payments Extension

    Default sample script is loaded for the user.

Editing Python Script

To edit an existing Python Script,

  1. Navigate to Extensions > Python Script on the dashboard left pane.
  2. Search for the Python Script and click Edit. We can apply search filter based on Extension Type or War name. For example, Editing Python script for Payments Extension Type.
  3. Update and click Save.

Packaging Python Script

As a prerequisite, Extension configuration for Python Script must be defined as System properties. Read the Configuration Parameter Reference section for more information.

  • If Workbench is configured with non-Git mode, Add to Package button is available in all the screens.
  • If Workbench is configured with Git mode, Add to Project button is available in all the screens.

To package an existing Python Script

  1. Navigate to Extensions > Python Script, on the dashboard’s left pane.
  2. Search for a Python Script record and click Edit.
  3. Select a package or project from the top app bar and,
    • Click Add to Package or Add to Project.
    • On the appbar, click the ‘+’ icon and click either Add to Package/ Add to Project, or Add All to add Python Scripts to the package or project.

Copyright © 2020- Temenos Headquarters SA

Published on :
Friday, May 31, 2024 10:31:40 AM IST