requirements

Specifies one or more requirements that must be satisfied before the form will function properly.

For example, a form may require a Java™ Virtual Machine to run correctly.

You can use the requirements feature to check for the availability of a particular class, function call, or Java Virtual Machine. If the requirement is not met, you can display a message and then either continue or fail.

Syntax

   <requirements>
      <requirement>requirement settings1</requirement>
         ...
      <requirement>requirement settingsn</requirement>
      <detected>status</detected>
   </requirements>
Table 1. requirements parameters
Parameter Type Description
requirement settings (see the following)  
status on All requirements were detected successfully. This is a controlled option that is not written out with the form.
  off One or more requirements were not detected successfully. This is the default value.

Available in

form global

Requirement Settings

The requirement settings use the following syntax:

   <requirement>
      <component>component setting</component>
      <detected>on|off</detected>
      <actions>
         actions
      </actions>
   </requirement>

The settings work as follows:

Table 2. requirements settings
Setting Description
component Identifies the type of requirement. This can be a class, a function call, or a Java virtual machine (see the following).
detected When on, the component for this requirement was successfully detected. When off, the component for this requirement was not successfully detected. The default is off.
actions Optional. Specifies the action to perform if the component is not available. (see the following).

Contains a message that is displayed when the component is not successfully detected. If this option is not set, then no message is displayed to the user.

Class component

When you list a class as a requirement, that class must be available for the requirement to be fulfilled. The class component uses the following syntax:

   <component>
      <class>
         <name>class name</name>
         <minversion>version number</minversion>
      </class>
   </component>

The settings work as follows:

Table 3. class component setting
Setting Description
class name The name of the class. For example: com.PureEdge.WebServices
version number optional. The minimum version of the instance that must be registered. For example, 1.0.0.

Class instance component

When you list a class instance as a requirement, that class instance must be available for the requirement to be fulfilled. The class instance component uses the following syntax:

   <component>
      <class>
         <name>class instance name</name>
         <minversion>version number</minversion
         <criteria>
            <value>value1</value>
            ...
            <value>valuen</value>
         </criteria>
      </class>
   </component>

The settings work as follows:

Table 4. class instance component settings
Setting Description
class instance name The name of the class instance. For example: com.PureEdge.WebServices
version number optional. The minimum version of the instance that must be registered. For example, 1.0.0.
value A string that was used to register the class. For example, the Sun JVM (com.pureedge.java.JavaInvocationEngineFactory class) is registered with the following string: "Sun VM 1.4"

You may include any number of strings, and all strings must match for the requirement to be met.

Function call component

When you list a function call as a requirement, that function call must exist as an XFDL function for the requirement to be fulfilled. The function call can be made available through an extension or a WSDL. The function call component uses the following syntax:

   <component>
      <functioncall>
         <name>name</name>
      </functioncall>
   </component>

The settings work as follows:

Table 5. function call component setting
Setting Description
name The name of the function call. This is the name of the function that must be registered and it must include the package name.

Java VM component

When you list a Java Virtual Machine as a requirement, the correct version of the Java VM must be available on the local computer. The Java VM component uses the following syntax:

   <component>
      <javavm>
         <minversion>minimum version</minversion>
         <maxversion>maximum version</maxversion>
      </javavm>
   </component>

The settings work as follows:

Table 6. Java VM component setting
Setting Description
minimum version optional. The minimum acceptable version of the Java VM. For example, 1.2.

You must list either a minimum version or a maximum version. You may also list both.

maximum version optional. The maximum acceptable version of the Java VM. For example, 1.4.

You must list either a minimum version or a maximum version. You may also list both.

Example

The following example sets up the following requirements for a form: (1) a Java Virtual Machine version 1.4.0 or greater must be available, and (2) the Web Services class must be available.

   <requirements>
      <requirement>
         <component>
            <javavm>
               <minversion>1.4.0</minversion>
            </javavm>
         </component>
         <actions>
            <message>Your computer does not have the required Java
               Virtual Machine installed. Because of this, the Web
               Services functions will not execute properly. To
               correct this, you must install the Sun Java VM version
               1.4 or higher.</message>
         </actions>
      </requirement>
      <requirement>
         <component>
            <class>
               <name>com.PureEdge.WebServices</name>
               <minversion>1.0.0</minversion>
            </class>
         </component>
         <actions>
            <message>The Web Services system is not available on your
               computer. Please contact your System Administrator for
               assistance.</message>
         </actions>
      </requirement>
   </requirements>

Usage details

  1. The detected option is not written out with the form description that is saved or transmitted.
  2. The default for the detected option is off.