Online documentation - WebsydianExpress v3.5 |
This is a general description of the use and purpose of the memory parameters APIs.
These APIs are used to transfer information from the service processor to the service handler when service requests are being handled.
After the service processor has identified the service handler in the service structure, the service handler program is called dynamically. The dynamic call demands that the interface of the service handler program is the same for all service handlers.
As the different types of service handlers need different input and output to receive and return data, it is not feasible to let the interface of the service handlers contain all combinations of the input and output fields the service handlers might need. To ensure that this does not limit the possibility of transferring data to and from the service handlers, APIs has been developed that allows the parameters to be written and read to and from memory.
For each set of parameters, a set of APIs has been created containing:
To transfer a parameter from the service processor to the service handler, you would do the following:
These APIs can be used in any cases where you want to transfer information from a calling to a called program without changing the interface of the called program. However, you should only do this if it is necessary, as the memory handling does carry a performance overhead.
If you are going to create your own specialized service processors and service handlers, it is conceivable that you need to transfer additional parameters between the service processor and the service handler.
You can create your own memory API in the following manner:
Create the triples:
Source Object | Verb | Target Object |
---|---|---|
MySetAPI | is a FNC | SystemAbstract.MemoryAPI |
MyGetAPI | is a FNC | SystemAbstract.MemoryAPI |
MyDeleteAPI | is a FNC | SystemAbstract.MemoryAPI |
For each of the functions add the fields you want to transfer in the local variable Data (to ensure that you have the same fields, you might want to create a common abstract function that just defines the content of the Data variable).
For MySetAPI, add the fields to Input.
For MyGetAPI, add the fields to output.
Post Point Set Set_Get flag:
Set RdWrGlobal<Set_GetPropertyFlag> = <Set_GetPropertyFlag.Set>
Post Point For Set function - set input to data:
Set Data = Input
Post Point Set Set_Get flag:
Set RdWrGlobal<Set_GetPropertyFlag> = <Set_GetPropertyFlag.Get>
Post Point For Get function - set data to output
Set Output/Output = Data
Post Point Set Set_Get flag:
Set RdWrGlobal<Set_GetPropertyFlag> = <Set_GetPropertyFlag.Set>
Background: Handling web service requests