The Custom Object Test page is available from either the Create Custom Object or Edit Custom Object wizard. You can access this page as long as the source code for the object has been compiled successfully. If you click Next in the Create/Edit Custom Object page and the code has not been compiled, the Platform compiles it. If the compilation fails, this page is not displayed. If it succeeds, then this page is displayed.
Tip: Scripting languages are generally forgiving of errors in coding. A successful compilation does not always mean that the custom object will run successfully. Make sure that you test every new custom object before using it in a new rule or action.
The content of this page depends on the Type of custom object you are testing and on the parameters that have been added for the custom object. Most of the standard attributes for the custom object have default values; the Asset Serial Number is one exception to this. In general, to test an object, provide the requested information and click Test. A Test Result popup window appears when the test completes.
All the fields in this page, except for the parameters for the custom object, accept up to 100 characters, including spaces and special characters such as , ; ! @ # $ % * ( ) \ / and so forth.
For all custom objects, you need to enter an Asset Serial Number. If you do not know the exact name of an asset as it exists in the Platform, start typing the characters you do know. This field uses Axeda Smart Suggest, so shortly after you start typing the Platform displays a list of the assets whose names contain the characters you typed. Use your mouse to select a name from the list (do not press ENTER because pressing ENTER will start the test).
Under Asset <object_type> Details, type or select values for any other attributes that the custom object requires. These input fields accept up to 100 characters. Click the following links for assistance with the attributes that each type of object requires:
Registration Rule Test - no other values are required.
If the custom object has parameters, enter a value for each parameter under Custom Object Parameters. These input fields accept up to 500 characters.
To run the test, click Test. Alternatively, you can press Enter. The results appear in the separate Test Result window.
Important!
Not all global variables are available to custom objects in the Test page.
However, the global variables are available at execution time. To test
custom objects that expect global variables, do so outside of this Test
page.
The Platform does NOT write to the custom object log file (for example,
customobjects.log) when you test a custom object from this page. The Platform
writes to the custom object log file when the custom object runs in live
mode, but not in test mode. The results of this test appear only in the
Test Result window.
When it is tested, the custom object is executed with the context of the
user who is logged in to the Axeda® Connected Product Management Applications.
For
more information about context for running custom objects, refer to Context for Running
Custom Objects from Expression Rules or Web Services.
If the test ran successfully, click Next
or Finish to display the Commit Custom Object page. If
the test resulted in an error and you need to change your source code,
click Back to make your changes
and recompile; you can then run the test again.
At any time you can click Clear to discard all the entries
and start over.