User-defined funclets that are created in the Mapper perspective can be stored in multiple places in the Fiorano installation.
The two repositories meant for storing funclets are:
- Local Funclet Repository: The funclets that are created inside a mapper transformation in an Event Process, for example, in a component like Xslt or on a port or on a route, are stored in Local Funclet Repository.
- Global Funclet Repository: The funclets that are created in Configuration Repository view of Offline or Online perspectives are stored in Global Funclet Repository of respective perspectives.
Both the repositories are explained in detail in the following sections.
Local Funclet Repository
In the Offline/Online perspective, the User Defined Functions dialog box have more options apart from Remove and Edit buttons present in the Mapper perspective.
Click the "Creating/Editing User-defined Function(s)" icon to open the User Defined Functions dialog box.
Figure 1: User Defined Functions dialog box with functions added in the Event Process perspective
The table below provides information about each button, starting with the Add option to add funclets, in the User Defined Functions dialog box.
Property | Description |
Add | Opens a new script wizard to add a function. |
Remove | Removes the function selected and deletes it from the location where it was added (using the Add button) as well. |
Import from | Imports user-defined functions added in any event process. The specific funclet can be imported into the mapping from the list of existing functions. |
Export to Global Repository | Exports funclets to the Global repository (refer the section below to understand more about Global Repository). |
Edit | Helps to make changes to the selected script. |
The funclets created in the Local Funclet Repository are saved in the machine where eStudio is launched. These funclets can be seen in Funclet View of this particular eStudio application which is attached to the machine.
Example: %FIORANO_HOME%/eStudio/plugins/com.fiorano.tools.mapper.runtime_1.0.0/resources/functions.repository.
The following scenario explains the availability of funclets in transformations created in Local Funclet Repository:
- In Machine1, launch eStudio, login to Enterprise Server and create an Event Process EVENT_PROCESS1 with a service instance of the Xslt component.
Launch CPS (Configuration Property Sheet) of the Xslt component, open Mapper, and create a funclet "FUNCLET1".
- Use FUNCLET1 in a mapping, save and close the mapping.
- Create another Event Process EVENT_PROCESS2 with another service instance of Xslt.
Launch the Xslt CPS, open mapper and navigate to User Defined Funclets in Funclet View.
- Now, login into the same Enterprise Server from a different machine "Machine2".
Open EVENT_PROCESS1 and open the Xslt CPS.
Global Funclet Repository
The user-defined funclets in the Local Funclet Repository can be created and shared globally to use across eStudio applications in multiple machines which connect to the same Enterprise Server.
In eStudio, Offline and Online perspectives will have separate global funclet repositories:
- In the Offline perspective, funclets will be stored in the same machine as eStudio at
%FIORANO_HOME%\runtimedata\eStudio\workspace\.repositories\Offline\Configurations\funclet\development - In the Online perspective, funclets will be stored in Enterprise Server at
%FIORANO_HOME%\runtimedata\repository\configurations\funclet\development
To open the Global Funclet Repository, in Offline/Online perspective, go to the Configuration Repository view, right-click the Funclet node, and click the Add Configuration option.
Figure 2: Opening Global User Defined Functions dialog box
The table below provides information about each button, starting with the Add option to add funclets, in the Add New Configuration dialog box.
Property | Description |
Add | To add a funclet, click Add, provide Extension Name, and click Finish to open a new script function wizard. |
Remove | Removes the selected funclet from the repository. |
Import from | Event Process Repository: The custom funclets added in any event process in the event process repository get displayed from where the required funclet can be chosen. Exported Event Process: The custom funclets present in an exported event process get displayed from where the required funclet can be chosen. Exported Global Funclets: The funclets that are exported previously from global repository to the local disk can be imported here. |
Export to Local Disk | The selected funclet will be zipped and saved in the location specified. |
Editing the script in the added funclet
To edit the script in the added funclet, perform the following actions:
- Expand the Funclet node, right-click the GlobalFunclets node and click Edit.
- Select the funclet that needs to be edited and click Finish.
- Edit the script in the Script Information section in the New Script Function dialog box and click Finish.
Figure 4: Editing the funclet