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
Saving a message flow file from memory
Use the Message Broker Java™ API when developing message flow applications to save a message flow from memory.
Save a message flow to a message flow file to preserve the
additions and modifications that you have made. To save a message
flow from memory, use the write() method of the FlowRendererMSGFLOW object.
The write() method writes all the changes made
using the Message Broker Java API to the specified
message flow file.
The schema for a message flow is stored in the message flow and cannot be modified by using the Message Broker Java API. When you save your message flow file by using the Message Broker Java API, the file is saved to a directory that has the same name as the schema. If the directory does not exist, it is created. For example, if your message flow is part of the mqsi schema, when you save the message flow file it is saved to the mqsi directory.
The following example shows how to save a message flow
in the specified directory by using the write() method.
On Windows, if the message
flow is part of the mqsi schema, the message
flow file is saved to C:\MB\mqsi\main.msgflow.
File msgFlow = new File("main.msgflow");
MessageFlow mf1 = FlowRendererMSGFLOW.read(msgFlow);
FlowRendererMSGFLOW.write(mf1,"C:\MB");