Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Business rules are added by editing your form or workflow. Click the Rules editing mode in the Form/Workflow Designer header to add new business rules or edit existing ones.

provides frevvo provides two ways to create business rules:

...

  • Your new rule is given a randomly generated name. Change the name and description to describe the rule function.
  • Click the Run Builder button to open the Visual Rule Builder (Click the link to find out more information about the wizard) or the Rule Code button (Click the Rule Code link for details about the Rule Validator) to enter the JavaScript directly. 
  • Click any  icon to edit an existing rule in the Visual Rule Builder.
  • Use the  Action Menu to
    • Collapse or expand the rule (you can also collapse/expand by clicking on the rule name or the carrot.)
    • Delete a rule. Confirm your choice in the dialog that pops up and the rule will be immediately removed. This is an irreversible process so make sure you do not need the rule before you delete it.
    • Enable /Disable  the rule. Rules are enabled by default. 
    • Move a rule to reorder the list. Depending on the rules current location your choices may be "Move up," "Move down," "Move top," and/or "Move bottom." You may also reorder rules by dragging and dropping them to another spot in the list.
  • Click View All1069515451 to see a readonly view of the javascript for all the rules in your form/workflow.
  • Click Save and Test  to test your rule without leaving the Rule Editor.

...

However, catching an exception when a  control a frevvo control does not exist (is undefined), will not work as you might expect. This is because  catches because frevvo catches the problem while parsing the rule before the JavaScript interpreter catches the error. In the example below the control named Color does NOT exist in the form.

...

It is very important when using a control in a rule that the control has a unique name. If multiple controls have the same name  can name frevvo can not determine which control the rule refers to. Controls added to your form from palette are for the most part forced to have a unique name. If you try to change it to a name of a control that already exists in your form  will form frevvo will not allow it. However there are several ways you can have multiple controls with the same name:

...

Rules refer to form controls using the control's Name. Refer to properties of the control using the syntax <Control Name>.<Property>.  frevvo supports the following properties:

  • visible : Set to false to hide a control and true to make the control visible.
  • value : Read or write the value of a control. This is not applicable to sections, tabs and other controls where it does not make sense to set a value.
  • enabled : Set to false to disable (grey out) a control so that a user can not change its value and true to enable it. This is not applicable to sections, tabs and other controls that do not make sense to disable/enable.
  • expanded : Set to false to collapse a group control (sections controls only) and true to expand a group control.
  • selected : Set to true to make a tab the selected tab (tab controls only).
  • valid : The value of this property is true if the control contains a valid value otherwise false.  Validity is based on the control’s type.  For instance a numeric control will be invalid if the user enters a string value that cannot be converted to a number.  This property can be read as well as written.
  • required : Set to true to make a control required and display a yellow background color. Available for palette and schema controls (controls generated from XSD schema data source). This is also a property of section controls. Setting a section required to false automatically sets all inner controls to not required. Click here for an example.
  • options : This property enables dynamic setting select control options (radio, dropdown & checkbox controls only).
  • label : This property sets the label seen on any control including sections.
  • help : This property sets the help text.
  • hint : This property sets the hint seen on hover.
  • status : This property sets the error message display whenever the control's value is invalid. The one exception is the Required Property for Controls in an Accessible form/workflow.
  • clicked : This property works with trigger controls.  Its initial state is false.  When a user clicks a trigger its state turns true.
  • printable: Set to false to remove the control from both the printable view and PDF submission document.
  • itemAdded : This property works with repeat controls.  Its initial state is false.  When a user clicks "+" to add a repeat item AND when a repeat item is added via a Document URI as the form loads its state turns true.
  • itemRemoved : This property works with repeat controls.  Its initial state is false.  When a user clicks "-" to delete a repeat item its state turns true.
  • itemIndex : This property works with repeat controls. When an itemAdded or itemRemoved event fires the value of itemIndex is set. For itemRemoved events itemIndex will return -1. For itemAdded events itemIndex will give you the index of the added item
  • minFiles - This property only applies to an Upload control. Use this property to dynamically change the minimum number of attachments that can be uploaded by the user.
  • maxFiles - This property only applies to an Upload control. Use this property to dynamically change the maximum number of attachments that can be uploaded by the user.
  • comment.value - This property only applies to dropdowns, checkboxes and radio controls. Use this property in a rule to retrieve or set the value of the comment field that displays when users select the last option. The comment value can also be accessed for dropdowns, check boxes and radios directly in templates using special syntax.

Examples of identifiers used in  rules in frevvo rules are:

  • FirstName.value
  • BillingAddress.visible
  • Email[1].value 
  • Email[i].visible

...

  • form.load : This event is occurs when a form or workflow step loads for the first time. It is useful for setting default values via rules that you need to be set before the user starts interacting with the form. 
  • form.unload : This event is true when users click the form's Submit or a workflow's Continue button. It is useful for setting control values just prior to the execution of the form's Doc Actions and Form Actions. If you have a rule in your form that changes any control(s) after clicking Submit, thereby making the form invalid, the form will no longer be submitted and the invalid form will redisplay. Form and Document actions will not execute,  PDFs are not generated, invalid controls become highlighted as expected and form.unload output displays in the debug console Debug Console. This prevents an invalid xml for a successful submission from being created and only applies to forms.
  • form.positionUpdated : This event is used for the Geo location feature. You can fire a rule using this special identifier every time the position is updated.
  • form.activate: This event indicates that a workflow has navigated to a step. If form.activate is true, the workflow just moved to a step. Use the _data.getParameter to determine what step that is.
  • form.deactivate:  This event indicates that a workflow has left a step. If form.deactivate is true, the workflow just left a step. Use the _data.getParameter to determine what step that is.

form.load vs form.activate

...

When you create or edit a rule,  figures  frevvo figures out the list of controls and properties of those controls that the rule depends upon. The rule will be automatically executed whenever there is a state change that is relevant to the rule. This is called a dependency. If there are multiple rules triggered by the same dependency, the rules are executed sequentially in a top to bottom order as they are seen in the form designer's rules panel.

...

It's easy to create rules that run forever. An example is a rule that updates A.value based on B.value and another rule that updates B.value based on A.value. They could continually trigger each other.

The  server The frevvo server will prevent this from happening by setting an execution time limit for each rule. Any rule that takes longer than 5 seconds to execute will be forcibly stopped. Note that this is a very lengthy period of time for most computational tasks and the vast majority of rules will not be impacted by this constraint. However, since  is since frevvo is a hosted site that may be simultaneously used by numerous users, there is a time limit imposed on these computations.

...

Business rules are executed on the  serverfrevvo server-side and not as client-side javascript. There are several reasons why rules execute server-side:

...

When you are designing a form/workflow with many objects and a lot of business rules, reduce the number of page reloads when switching between the designer view, rules view, and the test view by clicking the  save and test icon. Save and Test checks for Rule errors before the test popup displays. If rule validation errors are detected, the designer is notified and given the option to correct before the Test popup is displayed.

...

The validator also supports global directives. Use the global directive to identify additional global objects and functions defined in the execution environment and made available to the rule for which it is not appropriate to include a var statement in the rule code itself. One directive can be used to list all additional globals on a single line. Currently there are no known cases requiring the use of the global directive.  

Rule Editor Functions

The Rule Validator includes an enhanced editor designed to provide an easy experience when developing rules. The rule editor box includes the following features:  

FeaturesDescription
Line NumbersLine numbers in the rule code editor make it easier to correlate reported validation errors with the line of code.
Bracket auto closeType a {, ( or [ and the closing bracket is automatically inserted.
Match BracketPlace the cursor on a bracket and both it and the matching bracket are shown in a matching distinctive color (green).
Syntax Hi-lightingJavaScript syntax hi-lighting with keywords, variables, comments, etc. shown in distinctive colors.
Auto IndentNew lines are auto-indented according to generally accepted code formatting rules.
Code Folding
Bracketed code blocks (functions, if-then-else blocks, etc.) are collapsible. Click the arrow immediately to the right of the line numbers to collapse/expand code blocks.
Full screen edit mode

Expand the editor to full screen mode if you need more space to work. Click the "double arrow" expand icon (directly above the editor box) or press F2 when your cursor is inside the Rule box to expand to full screen. The ESC key returns you to small window mode.

Auto Complete/Hinting
When composing a rule, the designer can pick from a list of available controls frevvo controls and their properties directly within the rule editor. The pick list is context sensitive and will behave differently based on where the cursor is located when it is invoked. When on a blank space or immediately following an open bracket/brace, it can be manually invoked using Ctrl-Space to bring up a list of controls. Typing a dot (.) immediately after a  control a frevvo control name or after the index ("[i]") that follows a control name will automatically bring up a context sensitive pick list of properties applicable to that control for selection. You can type the first letter of the item you are looking for and the property starting with that character will be highlighted in the list. Continue typing and the matching options will progressively narrow to the characters typed. Double click your choice using the mouse or press the Enter key to select an item. Any other key dismisses the pick list. . See the example below 1069515451
HelpThe help icon displays a small help window listing the hot keys described above - (F2, ESC and Ctrl-Space)

...

The easiest way to minimize mistakes in control names when writing rules is to use the Auto Complete/Hinting feature in the rule editor. Let's say you want to compose a rule that will populate the FirstName field in your form with the first name of the logged in user when the form loads. This rule using the frevvo Built-in Data in conjunction with the form.load rule identifier will accomplish this.

...

Press the Enter key to advance to line 2. Add the left curly bracket. Press the Enter key to advance to line 3. Press Control Space. A list of available controls from your form will display. You can type the first letter of the item you are looking for and the first field name starting with that character will be highlighted in the list. Be sure to use the correct case. Double click or use the the Enter key to select the FirstName control. The control named FirstName will be inserted in your rule.

...

Add the remainder of the rule. The closing bracket will already be there. Of course, you can still use the Form Outline 1069515451 to help you when composing rules.

...

  • # -  A sequential line number. The # starts at 0 when a form is instantiated and increments until the form is finally submitted. Even if you clear the console by clicking the Clear link, the numbers continue incrementing from where they left off for this particular form instance. This gives you a clear way to follow the order in which the rule code was executed during the lifetime of a particular form instance.  
  • Level - One of 5 log levels. See below for details. The level also dictates a color coding. For example all ERROR log level messages are displayed in red.
  • Event  - One of many possible Events. This column enables you to quickly distinguish between various events such as rule start/stop. See the detailed event list below.
  • Source - This column contains the name the designer gave to each rule for RULE_START and RULE_END events so that you can clearly see which rule the output lines are a part of. Source is also set for DOC_READ_START and DOC_READ_END events and indicates the name of the data source. If the data source is the default document Source displays the form/workflow's name. 

Refer to the  log the frevvo log files for a complete history of all rule debugging output. 

...

This example shows a CUSTOM event. These events are created by adding frevvo.log() calls to your rules. Custom log messages are useful when you need even more debugging output. See Custom Logging for more details.

Note

Doc URI write methods information, which occur when the form is submitted, do not appear in the debug console output.

...

Rules debug output can also be written to the  log the frevvo log file <frevvo-home>/frevvo/tomcat/logs/frevvo.log file and is also visible in the tomcat console if tomcat stdout logging is enabled.

To change the rule debug logging verbosity level, append one of the URL parameters below to the  base the frevvo base URL. For example: http://<server:port>/frevvo/web?rule-debug=TRACE turns on the highest rule debug log level.  The verbosity options are:

...

Note

Changing the rule logging verbosity affects all tenants, users, and forms running on the serverfrevvo server. A high log level can effect the form server's performance. Turn rule logging back to the lowest level of ERROR when your are done debugging.

...

Rule execution can be profiled to determine how much time each rule takes to execute. This can help you tune and improve performance in forms that use a lot of business rules. To turn on profiling in the log files set the rule-debug=INFO or higher. See rule debugging Rule Debugging for setting log levels. Profiling output is also displayed in the Debug Console.

...

As rules are executed on the  server frevvo server and not on the browser client side. Thus timing is effected by the performance of your server machine and the server's current load.

...

By default a rule that takes longer to execute then 5 seconds will be timed out by the Form Server. Customers using the in-house download version can customize this timeout. This is often necessary when rules have to perform longer running operations such as sending email messages, database stored procedures, etc. To configure the timeout add the following line to your web application containers property file. For the frevvo-tomcat bundle this file is <frevvo-home>\tomcat\conf\Catalina\localhost\frevvo.xml and is specified as follows:

...

Every control in your form has an initial default property states for the visible, expanded, value, valid & enabled properties.  However you can change a controls initial state in in frevvo' form designer Edit tab.  A control’s initial state can be modified several ways.  One way is by simply typing a value into an input control.  This sets the default value for the control when the form is first opened in use mode.  Another way is by expanding or collapsing group controls.  This sets the initial expanded state.  The default state for the visible and enabled properties is set via the controls edit property panel.  The edit property contains checkboxes for visible and enabled for controls on which those properties make sense like input controls.

...

Excerpt

There are several special considerations when writing rules using date, time and date/time controls. You can also find many working samples in the Rules Examples chapter.

To initialize a date control, the data must be in the correct format. Here are examples of correct date formats:

Code Block
d1.value = "2012-01-13"; //yyyy-mm-dd
d2.value = "01-13-2012"; //mm-dd-yyyy
d3.value = "jan 13 2012"; //using string for month

 The following formats will not correctly initialize a date control. They will either cause unexpected results or be flagged as an invalid value when the form is used.

Code Block
//adjusted or invalid date formats
d4.value = "2012-13-01"; //yyyy-dd-mm
d5.value = "13-01-2012"; //dd-mm-yyyy
d6.value = "13-2012-01"; //dd-yyyy-mm
d7.value = "01-2012-13"; //mm-yyyy-dd

In general, it is not recommended to rely on either the browser's locale or the server's locale when writing date, time (time of day) and date/time literals in frevvo rules. The recommended method is to use locale independent formats that are listed below. These are standard ISO formats.

Date - yyyy-MM-dd

Date/Time - yyyy-MM-ddTHH:mm:ssZ - The trailing Z indicates UTC.). 

Time - HH:mm:ss (or HH:mm). Time is really time of day and is not affected by time zones at all.

Note

yyyy-MM-ddTHH:mm:ss is also supported but will convert to the server's timezone. The rule author has no control of this, so it is not recommended.

Here is an example rule:

Code Block
if (form.load) {
  date.value = "2020-02-20";
  timeofday.value = "13:10:02";
  datetime.value = "2020-02-20T18:10:02Z"; 
}

This rule will initialize a date control in a form with 02-20-2020, a time control with 1:10 PM and a date and time control with 02-20-2020 in the date portion and 1:10 PM in the time portion.  

Notice the special character "Z" at the end of the date/time value. This is equivalent to an offset of UTC-00:00 and indicates that the time of 18:10:02 is given in UTC. 18:10:02 UTC is equal to 1:10 PM Eastern Standard time. 

...

The minOccurs and maxOccurs (Max#) properties of a Table or Repeat control, can be used to write a rule to dynamically change Min# and Max# values of repeating items. This feature is helpful if you want to allow only a certain number of items based on user input. Here's how it works:

In the designer, set the min/max properties so that they cover the whole range of min and max numbers that you wish to use via rules. When you increase the Min# value with a rule,  will frevvo will check if that number of items are there in form, if not then it will add them. When you reduce the maxOccurs property via the rule,  will frevvo will check if the form has more than that many items. If there are more items than the Max# that you are setting via the rule, it will remove those extra items.

...

This is one case where the order of your rules matters. When adding rows, set the maxOccurs first, then minOccurs. When deleting rows, set minOccurs first, then maxOccurs. If you attempt to set minOccurs higher than the current maxOccurs, you will see an error in the debug console, "Illegal value for minOccurs. The type specifies a range of [0,3]. Attempted to set to: 4". Notice the rule order in these code snippets from this example rule to dynamically set min/max on a table.

Code Block
//Add new rows if existing number of rows is less than resultset length
  RepeatRow.maxOccurs = x.resultSet.length;
  RepeatRow.minOccurs = x.resultSet.length;

//Delete extra rows if existing number of rows is more than resultset length
  RepeatRow.minOccurs = x.resultSet.length;
  RepeatRow.maxOccurs = x.resultSet.length;

A common example is a form that retrieves data from a database - let's say the details of a Purchase Order. There could be one or more rows in the result. Depending on how many rows are returned, you may want to show only that many repeat/table rows in the form. Your rule can automatically set the min and max properties of the repeat/table to the same value (Min# = Max#) so that only the number of items specified in your rule are displayed. 

Refer to this rule example for repeats and this rule example for tables.

Info

When you dynamically populate repeats/tables using the Doc URI Approach,  will  frevvo will automatically set the minOccurs/maxOccurs accordingly, so you do not need a business rule.

Note: Setting the min and max to the same value via a business rule will not always remove the left +/- column. You may see a blank left column.

Note

Please note that scaling tables or repeating sections via business rules when there are 100 rows or more may impact performance.

Selection Controls

Radio controls, dropdowns and checkboxes are all examples of select controls. Radio & dropdown controls are single select.  That is, if one item in the dropdown is selected then all other items in the dropdown are deselected.  The same is true for a radio.  Only one radio button can be depressed at any time.  Thus the <ControlName>.value of radios and dropdowns are similar to the other input and output controls.  The value is a single item.

...

  1. the URL to the web service
  2. payload (data) constructed as a JavaScript object.
  3. headers constructed as a JavaScript object
  4. Whether the payload is in multipart form
  5. dataOnly, which defaults to true and returns just the content. It should be set to false in order to get additional information (headers, status) in a JSON format (see this sample JSON data set).

    Expand
    titleClick here for an example of the json response...

    If the dataOnly parameter is set to false, frevvo returns a JSON string with a content field containing data, header (another JSON object containing the headers), status code, and reason (describes the status). For example:

    Code Block
    {"content":"…", "header": {"Access-Control-Allow-Origin":"*", "Connection": "Keep-Alive", ...}, "statusCode":200, "reason":"Ok"}

     Not every HTTP method provides content. In case of an exception, a null is returned in all cases.

    Here is a sample business rule to illustrate the response:

    Code Block
    /*member statusCode, reason, content, header, Server*/
    var response;
    if (form.load) {
      eval('response=' + http.get('https://httpbin.org/json',null,true,false));
      if (response) {
        Status.value = response.statusCode;
        Reason.value = response.reason;
        Content.value = response.content;
        Headers.value = response.header.Server;
      }
    }



In previous versions of frevvo, the post, put, get and delete methods accepted only a JSON string for payload and header parameters. Using string concatenation to generate a JSON string is fragile due to potential encoding issues and possibly XSS security concerns. This requires the designer to use JSON.stringify('{name:'+Name.value+'}')) to avoid encoding issues.

...

  1. The rule will fail when executed if the object syntax is incorrect.
  2. takes frevvo takes care of encoding to JSON automatically.

...

When making http calls from rules, special characters (e.g #) cannot be used in URLs  because the URL which is passed in the http method gets encoded by default. For example, if the URL contains a #,  encoding  frevvo encoding assumes this is a query fragment. If the designer encodes it as shown in the example below by replacing the # with the encoded value %23,  will  frevvo will encode it again turning the % into %25 for a final value that looks like %2523. This returns an invalid URL.

A boolean parameter can be specified in a rule for http.get, http.put, http.delete and http.post methods that can be used to tell  not tell frevvo not to encode the URL. In this case, the designer  encodes the URL and sets this parameter to false to turn off additional encoding by by frevvo.

For example: Let's say you write a rule to perform an http get to a web server when the form loads. Here is the URL you want to use in plain text:

...

Code Block
if (form.load) {
  var url = "http://<your webserver:port>/Client/AMR/Vendors/aramark%7C8435%20Georgetown%20Road%23100IndianapolisIN46268";
  var response = http.get(url);
  frevvo.log(response);
}

 encodes frevvo encodes the URL again. The result is a server 404 error because the URL is invalid which prompts an error message in the  logfile the frevvo logfile similar to:

In this rule, the local variable URL is set to the encoded version and the http.get() includes the third argument, set to false, to prevent double encoding:

...

Reusing Data from a Web Service

The example above uses the database connector, which returns a clean json that doesn't cause any problems when it is copied into a text field. The json returned from other services might included extra spaces or other characters and might require trimming. This can cause an error such as 'SyntaxError: Unexpected token in object literal'.

You may need to add this code, which removes spaces from the json string, to your first rule:

Code Block
​var json = http.get(requestUrl);
jsonUserData.value = json.replace(/[\n\t\r]/g,"");

...

The dynamic content described above requires an http get to a specific URI service returning a JSON object. The examples above specified absolute URI paths. You can also use a relative path.

Assuming the  Form the frevvo Form Server is running on http://www.myhost.com, http.get(‘http://www.myhost.com/path/to/resource’) may instead be written as http.get(‘/path/to/resource’).

...

In this example the path to the URI service is an absolute hard coded path. When the service is running on the same host as the  form the frevvo form server you may use a relative URI. One common scenario where this is applicable is for  Infor frevvo In-house customers who have also installed the  database the frevvo database connector. In this case the rule is best written as follows because it becomes portable if you move your form server from one <webhost> to another <webhost> as is common when running under development servers and moving to production servers.

...

URL parameters passed into your form via the _data  parameter  frevvo parameter can be accessed in rules several ways. If &_data(FirstName:'Joe') was added to your form URL, then:

  1. FirstName.value - only for parameters bound to a control in your form.
  2. {FirstName} - only for parameter used in http get templatized URIURIs.
  3. _data.getParameter('FirstName') - if used anywhere else in a rule other than a URI.

Option 2 & 3 are available for both bound and unbound controls. So choose whichever approach is the simplest for you.

Built-in Data

 makes frevvo makes certain data available to your rules. This includes information about the person currently using your form, the tenant and form information. You retrieve this data in your rule using the _data.getParameter('<data name>') syntax. Here is the list of available data:

...

LDAP supports both the standard subject attributes and custom attributes. When a user is successfully authenticated by the LDAP security manager, frevvo automatically retrieves Last Name, First Name and Email Address for this user from the LDAP server. You can retrieve custom attributes in addition to the standard ones from Active Directory and pull the data into your form/workflow using  business using frevvo business rules. 

Rules can use built-in methods to populate controls on a form/workflow with the information for the logged in user. The rules use the   the frevvo  _data.getParameter syntax, For example, the business rule shown fills the respective form fields with the First/Last Names and Email Address of the logged in user. 

...

Attributes with more than one value are also supported. For example, The carLicense attribute can return multiple licenses. You can write a rule to populate dropdown options with those values. Make sure the carLicense attribute is added to the custom field on the LDAP Configuration screen and of course, there are multiple carLicense attributes, each one containing a different value for the dropdown options, set up for appropriate users on the LDAP server.

...

Note

The manager attribute maps to the builtfrevvo built-in data 'subject.reports.to.' This means you can retrieve this value in a rule or use 'subject.reports.to' for workflow navigation if you configure the manager attribute in your LDAP tenant.

...

Code Block
if (form.load) {   
  if (_data.getParameter('flow.activity.name') === 'Manager Review') {     
    Review.visible = true;  
  }
} 

Built-in Methods

 provides frevvo provides built-in helper methods for common functionality required by business rules.

...

If these methods are used in rules a the designer will see a message in the Debug Console 1069515451 urging that the methods listed above 1069515451 be used instead.

Note

When you Save & Test a form, the form time zone is determined automatically. However, when you copy the share URL, you should consider whether to add the _formTz parameter to specify the time zone where the rules should run. 

  • When using frevvo.currentDateTime() or now() to set a Date/Time Control value without the _formTz parameter, these functions will return the current date/time in UTC and display it in the user's browser timezone. Often, this is the desired behavior, so _formTz is not necessary.
  • When using frevvo.currentDate() or today() to set a Date control value, or frevvo.currentTime() or timeofday() to set a Time control value without the _formTz parameter, these functions will both return and display the current date/time in UTC. This may or may not be the desired behavior, as the UTC time may appear "wrong" to the end user since it does not match their own time zone.
  • To return and display Date, Time, and Date/Time values set by these functions in a particular time zone, specify a timezone using the _formTz=<timezone> URL parameter.

See the Time Zones and Business Rules documentation for more details.

...

Here is the list of methods that can be used in business rules to verify if a specified user or role exist in your tenant or if a tenant exists in your serverfrevvo server. These methods return a boolean true/false value:

...

Here is a snippet of debug console output. The frevvo.log() message Event type displays as "CUSTOM". In this example the rule called the method frevvo.log('ERROR', 'Loading tenant roles...'); The message appears in red because all ERROR level log messages automatically are colored red.

See the debug console 1069515451 topic for full details of all the console output information.

...

JavaScript behavior when calculating decimal point addition, might show a result with a large number of decimal places. provides frevvo provides a built-in method, toFixed(n) that can be used in this situation.

...

This feature is mainly intended for OEM  partnersOEM frevvo partners. Often there are common rule code that is reused over and over in many forms. Traditionally this code must be duplicated in each form.  is  frevvo is packaged with a file in tomcat/webapps/frevvo/WEB-INF/rules/includes.js which is initially empty. OEM  partners OEM frevvo partners can put commons functions into includes.js. There is a second file com.frevvo.forms.model/src/main/resources/com/gauss/forms/rule/executor/includes.js also in the WEB-INF directory whose contents are defined by frevvo.

When you write any form rule you can now call functions defined in these two includes.js files above. The first one is for OEM partners to create and repackage with frevvo.zip. The second one is frevvo's and is automatically updated when there is a new release and should not be modified by OEM partners.

...

Note that includes.js is parsed and compiled once when  startswhen frevvo starts. If you update this file with new functions and fixes to existing functions you must restart  for restart frevvo for the changes to take affect. 

...