Try OpenEdge Now
skip to main content
Managed Adapters Guide
File Managed Adapter : Writing custom format plug-ins : Installing and running the plug-in
 

Installing and running the plug-in

After compiling the Format Plug-in, pack the classes in a jar file and include them in the classpath, as well as in the application server system classpath. After restarting the application server, you can start using the new Plug-in.
A sample Business Process Server application with the Log Format Plug-in is shown in the following figure.
Figure 8. File Adapter - Log Format plug-in an application
The SetMessage human workstep is used to enter the text of the message to be logged. The LogMessage adapter workstep invokes the Log Plug-in of the File Adapter to store the message in the logfile.
To install and run the plug-in:
1. Define a CHARACTER dataslot, MessageDS. This dataslot will contain the message text.
2. Double-click the SetMessage workstep and add this dataslot to those listed on the Dataslots sub-tab.
3. Double-click the LogMessage workstep and verify that GenericFileAdapter is the performer listed in the Performer field.
4. In the Configuration tab, click Configure to display the File Adapter Configurator dialog box.
5. Select the Mode as Append.
6. Select the Data Format as Log, and configure the file name and prefix, as shown above. Ensure that the directory exists on the Business Process Server, and you have permissions to write to the output file you selected.
7. Click the Log tab. This tab contains the designed custom format configurator.
You can modify the default message format ([D] M) if required.
8. Click OK. The File Adapter is now configured.
9. The Dataslot Mapping dialog box appears, as shown in the following figure.
Alternatively, you can open the Dataslot Mapping dialog box by clicking Change mapping in the Configuration tab in the Properties view for the LogMessage workstep.
a. Map the MessageDS dataslot to the Message input parameter.
b. Click OK.
Your business process is now ready to be published. Publish and run the process. Verify that the message you entered appears in the logfile and is in the correct format.