Call (Imagine function)
Jump to navigation
Jump to search
Run Imagine code on the Transparency Broker (Imagine class)
[Introduced in Model 204 8.0 βeta]
This method calls code running in the Imagine Transparency broker for the current transaction.
Syntax
[%string =] %(Imagine):Call( name, [payload= string], [globals= boolean], - [globalImages= boolean], [recordMap= boolean]) Throws BrokerLost
Syntax terms
%string | The value returned by the called Imagine function. This could be anything though JSON would be the most convenient format for passing data from Imagine to Model 204. |
---|---|
%(Imagine) | The class name in parentheses denotes a shared method. Call can also be invoked via a Imagine object variable, which may be Null. |
name | A string that contains the name of the function to be called in the Imagine broker. The semantics of this value is under the control of the Imagine broker. |
payload | A string that contains data passed to the Imagine function. This could be anything though JSON would be the most convenient format for passing data to the Imagine function. Thwe default value for this is an empty string. |
globals | A Boolean value that indicates whether global strings ($setg /$getg ) should be sent to Imagine. The default value of this argument is false. |
globalImages | A Boolean value that indicates whether global images should be sent to Imagine. The default value of this argument is false. |
recordMap | A Boolean value that indicates whether a map of (thread-specific) Model 204 record numbers to Imagine file and recordId should be sent to Imagine. This can be useful if one is passing Model 204 record numbers to the Imagine application. The default value of this argument is false. |
Usage notes
In Imagine, a transaction includes both retrieval requests and updating requests.
Because Imagine Transparency files and transactions are automatically kept in synch with the corresponding files in Model 204 any updates in the Model 204 transaction are visible in the Imagine transaction and vice versa==Examples==