RAMP application works in designer mode but not in user mode
|Date:||3 December, 2007|
|Product/Release:||Visual LANSA Framework - RAMP|
|Abstract:||Known reasons for a RAMP application working OK in designer mode but not in user mode|
|Submitted By:||LANSA Technical Support|
When running a RAMP application it works in Framework Designer mode (e.g. UF_DESGN) but not in Framework End User mode (e.g. UF_EXEC).It also produces an error in x_err.log:
Component : VF_SY120
NL runtime manager outer wrapper
Line : 608
Message : Error Code = -1
Routine : Dispatch_Component_Manager
There are a 2 possible causes:
Individual RAMP scripts are dynamically loaded and executed from this file. This is why you change your script and it executes immediately.
These are the RAMP script files that you deploy.
All the scripts within a 5250 session (identified in this example by the GUID 6C8F62620CB74C2893B4EFF7E23CD393) are defined into this 'big' file and they are all loaded in one hit.
This is done because it produces much better execution time performance than the dynamic loading model that is used for designers.
This performance benefit of this model creates 2 possible issues you need to be aware of:
- Untested or unused scripts that contain syntax errors may be okay during development, but will produce execution time errors.
Say you have a script named BUTTON_SCRIPT_7 and you accidentally put a syntax error in it.
You never test or use BUTTON_SCRIPT_7 during development.
The syntax problem will only be detected when BUTTON_SCRIPT_7 is loaded, so you don't notice the problem.
BUTTON_SRIPT_7 then gets saved into the 'big' .JS file used at execution time.
Your RAMP application fails to start.
Solution - Do a test load of your 'big' .JS file
If your scripts work during development, but you get an error when executing them in end user mode, then you should try this test.
In your LANSA partition execute directory make a small file that contains this HTML. The script src should be pointing at your nodes.js file:
<html> <head> <script src="My_Nodes_6C8F62620CB74C2893B4EFF7E23CD393.js"> </script> </head> <body> <p>TEST</p> </body> </html>
Save this file as (e.g. test.htm) and open this HTML file in Internet Explorer.
This assumes that you allow JS errors to display, which is an IE browser configuration setting you should check.
Working with the line number, and by looking at the content of the 'big' JS file, you should be able to locate the syntax error.
Go back to the Visual LANSA Framework RAMP Tool, correct the syntax error, then save your Framework to create a new 'big' JS file.
Note: You might have more than one syntax error, so keep doing this check until no errors are displayed.
There is no change in the RAMP script so it is definitely NOT a RAMP script syntax problem.
The RAMP application runs fine in VLF Designer mode but it gives this error only in VLF User mode.
What else can I try?
If there is NO syntax mistakes in your RAMP script but you receives a '..vf_sy120 outer wrapper..' error only during VLF USER mode then one thing to check is by synchronizing all the RAMP scripts of the application in DESIGNER mode and USER mode by doing a FULL save using the RAMP Tool.
What happens is that:
- In Visual LANSA Framework DESIGNER (UF_DESGN) uses the XML Nodes file (ie. vf_sy001_nodes.xml or equivalent).
During a "PARTIAL" Save the RAMP Tool updates the XML file but not the .js file so these may become out of sync which leads to a different result when running the RAMP application in UF_EXEC as compared to UF_DESGN.
There are two ways you can save your changes to the Framework in the RAMP window:
|Full Save||Performs a full Framework save including the generation of all scripts for execution in end-user mode and the uploading of web server details.|
|Partial Save||Performs a partial Framework save so that your work is fully recoverable, but does not generate run-time scripts or upload server details.|
You will need to do a full Framework save to deploy your application or execute it in end-user mode.
The solution to ensure both files are in synch with the same version of the RAMP script is to perform a FULL SAVE in the RAMP Tool in VLF Designer mode.
Make a dummy change in the RAMP application caption and select the 'FULL' SAVE button in the RAMP Tool and then execute your RAMP application in USER mode (UF_EXEC) to correct the problem.