Project Design Tutorial : Create an HTTP Channel and Destination

Create 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. BusinessEvents 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 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 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 5, Channels and Destinations, and Chapter 6, JMS Channels in TIBCO BusinessEvents Developer’s Guide.
Task B Create the 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 can’t be any of the keywords or other words listed in Chapter 17, Rule Language Grammar in TIBCO BusinessEvents Developer’s Guide, and they can’t use spaces.
4.
5.
In the Port field, enter 8104. If that port is not free, use an available port in the 8000 range.
6.
Task C Create an HTTP Channel and Destination
1.
Right-click the Channels folder and select New > Channel.
2.
a.
b.
c.
Click Finish. You see the Channel editor
In BusinessEvents, you can’t change any new project resource name after you click Finish in the new resource wizard. (You can change the description, however.) The resource name displays in the title of the resource editor, for example, Channel: HTTP.
3.
4.
In the Resource field, browse to and select the HTTP connection resource you created in Task B. Only valid shared resources for the current resource display.
5.
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.
Adding a default event is not necessary for the provided examples because the readme.html, which starts an HTTP channel, specifies the event. However for other use cases, default events are convenient: all messages arriving at a destination are transformed to the destination’s default event, unless the message specifies a different event. The default event in this channel is not required, but it does stop the warning sign from appearing! — the warning sign just lets you know when a destination does not have a default event.
6.
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.