Use these instructions to associate
your PHP code with a PHPCompute node.
- Create a message flow containing a PHPCompute node. For
example, create a message flow containing an MQInput node, a PHPCompute node, and an MQOutput node. For information,
see Creating a message flow.
- Connect the Out terminal of the MQInput node to the In terminal
of the PHPCompute node.
- Connect the Out terminal of the PHPCompute node to the In terminal
of the MQOutput node.
- On the MQInput node,
set the Queue name property
(on the Basic tab) to InQueue.
- On the PHPCompute node,
set the PHP script property
(on the Basic tab) to Hello.php. You can
either type the name of the PHP file into the field, or select Browse to
navigate to the PHP files stored in your workspace. If you select Browse,
the PHP files in the current Message Broker
project are displayed, together with PHP files in any referenced
projects. To add project references, right-click the Message Broker
project, select Properties,
then select the Project references category.
- Set the following properties of the MQOutput node:
- On the Basic tab, set the Queue name property to OutputQueue
- On the Validation tab, set the Validate property to Inherit.
- Save the message flow.
You can display the PHP script file associated with the PHPCompute node by double-clicking
the node in the message flow. The file Hello.php is
opened in the Eclipse text editor.