WebSphere Message Broker, Version 8.0.0.7
Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS
See information about the latest product version
See information about the latest product version
Updating the global environment with the PHPCompute node
Use PHP code associated with a PHPCompute to modify the global environment.
The Global Environment tree is always created when the logical tree is created for an input message. You can use this tree for your own purposes, for example to pass information from one node to another. You can use the whole tree as a scratchpad or working area.
The global
environment can be altered across the message flow. The following PHP code shows
how to alter the global environment:
<?php
class GlobalEnv {
/**
* */
function evaluate($output_assembly, $input_assembly) {
$output_assembly [MB_GLOBAL_ENVIRONMENT] = $input_assembly->XMLNSC->Message;
$output_assembly [MB_GLOBAL_ENVIRONMENT]->Folder1 = 'some data';
$output_assembly [MB_GLOBAL_ENVIRONMENT]->Folder2->SubFolder = 'more data';
}
}
?>