Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 2 Project Design Tutorial : Add an HTTP Channel and Destination

Add an HTTP Channel and Destination
In this task you configure an HTML channel with one destination. The AllOps destination listens for messages that come from HTTP forms embedded in the project’s readme.html file.
Example projects use the HTTP channel because it does not require use of any external software. If you have TIBCO ActiveMatrix BusinessWorks, TIBCO Enterprise Message Service, TIBCO Rendezvous, or other source for messages you can experiment with adding different types of channels.
Learning Points
What are channels and destinations?  Messages enter and leave the system through channels. You create destinations within a channel to define the message sources and sinks. Typically, events are created using data in incoming messages; outgoing messages are created using data from events. Later in the tutorial, you will set up the relationship between these destinations and the event types that they listen to by default.
Note that in this tutorial outbound messages are simply sent to the console, so there are no outbound destinations.
How are channels and destinations created?  You create channels and destinations at design-time, as explained below. When you are planning TIBCO BusinessEvents projects, you would consider the incoming and outgoing messages for your project, and then define the channels, destinations, and the corresponding event types — outbound events are transformed into appropriate messages, and inbound messages are transformed into events of a specified type.
Why Use Shared Resources?  Shared resources are generally used in channels to configure communication with some external system such as a database server or JMS server. You can configure the connection once and use it in multiple places. If some configuration has to be changed, you just have to change it in one place.
More Information
Chapter 4, Channels and Destinations, and Chapter 5, JMS Channels in TIBCO BusinessEvents Developer’s Guide.
Task B Add an HTTP Connection
1.
Select the SharedResources folder and press Ctrl+N. You see the Select a Wizard dialog. (You could also get here using File > New > Other.)
2.
Select TIBCO Shared Resources > HTTP Connection and click Next.
3.
In the New HTTP Connection Wizard, name the connection HTTPConnection and click Finish. (In a real world situation you would probably give the connection a more meaningful name.) You see the HTTP Connection dialog.
Resource names and directory names  in the path to a resource cannot be any of the keywords or other words listed in Chapter 19, Rule Language Grammar in TIBCO BusinessEvents Developer’s Guide, and they cannot contain spaces.
4.
5.
In the Port field, enter 8108. This is the port used in the readme.html for this example.
6.
If you change the port here, change the readme port too  If port 8108 is not free, use an available port in the 8000 range. You must also edit the readme.html that goes with the project. See Dependency Between Readme File and Project — Port Number.
Task C Add an HTTP Channel and Destination
1.
Right-click the Channels folder and select New > Channel.
2.
a.
b.
c.
d.
Click Finish. You see the Channel editor
3.
4.
In the Destinations section, click Add and name the destination AllOps. Leave all other fields set to their default values.
HTTP and AllOps are required names for examples. The readme.html uses the AllOps destination in its embedded forms.
5.
Default Events  All messages arriving at a destination are transformed to the destination’s default event, unless the message specifies a different event. Adding a default event is not necessary for example projects, because the readme.html, which starts an HTTP channel, specifies the event to use.
Summary and Next Steps
Now you have built a channel and a destination within that channel to listen for messages. The next step is to create some events.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved