Fabric Project functions are user-defined Java functions that are added to the project implementation to perform complex data manipulations or to execute queries on a specific Instance ID.
Functions can be edited in the Fabric Studio by either:
Functions can be created in Logical Units, References, Web Services, Shared Objects or from existing Table Populations.
The Function Manager window displays the following panes on the right of the window:
Both panes include the following components:
To define Input and Output settings manually, do the following:
The Bulk Load Parameters option can be used to upload multiple parameters to a function.
Input / Output settings can be automatically defined based on DB objects either from a source DB or LU objects using the Objects / Database pane in the Function Manager window.
Example of the code generated for the function with Input = CUSTOMER_ID from the CUSTOMER table:
String sql = "SELECT CUSTOMER_ID FROM CUSTOMER";
db("CRM_DB").fetch(sql, <val1>, <val2>, ...).each(row->{
});
Notes
Click to display the Fabric API list: http://[Fabric IP address]:3213/static/doc/user-api/index.html
To invoke a project function from another category in the same LU, do the following to add an import:
To see the import, open the source file of the function's category. For example, when adding an invocation to the fnCheckSourceEnv() function which belongs to the DECISION category in the CRM Logical Unit, the following import is added:
import static com.k2view.cdbms.usercode.lu.CRM.DECISION.Logic.fnCheckSourceEnv;
To invoke several functions in the same category, modify the import as follows:
import static com.k2view.cdbms.usercode.lu.CRM.DECISION.Logic.*;
Fabric Project functions are user-defined Java functions that are added to the project implementation to perform complex data manipulations or to execute queries on a specific Instance ID.
Functions can be edited in the Fabric Studio by either:
Functions can be created in Logical Units, References, Web Services, Shared Objects or from existing Table Populations.
The Function Manager window displays the following panes on the right of the window:
Both panes include the following components:
To define Input and Output settings manually, do the following:
The Bulk Load Parameters option can be used to upload multiple parameters to a function.
Input / Output settings can be automatically defined based on DB objects either from a source DB or LU objects using the Objects / Database pane in the Function Manager window.
Example of the code generated for the function with Input = CUSTOMER_ID from the CUSTOMER table:
String sql = "SELECT CUSTOMER_ID FROM CUSTOMER";
db("CRM_DB").fetch(sql, <val1>, <val2>, ...).each(row->{
});
Notes
Click to display the Fabric API list: http://[Fabric IP address]:3213/static/doc/user-api/index.html
To invoke a project function from another category in the same LU, do the following to add an import:
To see the import, open the source file of the function's category. For example, when adding an invocation to the fnCheckSourceEnv() function which belongs to the DECISION category in the CRM Logical Unit, the following import is added:
import static com.k2view.cdbms.usercode.lu.CRM.DECISION.Logic.fnCheckSourceEnv;
To invoke several functions in the same category, modify the import as follows:
import static com.k2view.cdbms.usercode.lu.CRM.DECISION.Logic.*;