Difference between revisions of "GVExample TOUPPER"

From GreenVulcano Wiki
Jump to: navigation, search
Line 1: Line 1:
The easiest way to create a service with {{L_VULCON}} is to interact with the ''[[Wizard]] New Service'' option.
+
==Description==
 
 
 
 
From the core view:
 
# expand the element [[GVServices]]
 
# right click the element [[Services]]
 
# select from the visualized drop down menu the object Wizard New Service
 
 
 
 
 
[[File:GVExamplesTOUPPER1.jpg|thumb|Creating service TOUPPER]]In addition to the name of the service, the user could select a [[group]] (including those already configured) and a [[paradigm]] of communication between couples Client-ESB and ESB-Server. In this new service, the client will be the system suggested by the name "GVESB", and the server will be a testing service internal to {{GVESB}}
 
# choose "DEFAULT_GRP" as a group
 
# choose "Synchronous-Synchronous" as a [[scenario]]
 
# call the Service "TOUPPER".
 
 
 
 
 
 
 
 
 
[[File:GVExamplesTOUPPER2.jpg|thumb|Chosing an operation]]Continuing with the Wizard, the user can choose the client system, and the requested operation that will run on the server through the selection of the triple [[system]]-[[Channel]]-[[Operation]].
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
[[File:GVExamplesTOUPPER3.jpg|thumb|Operation diagram]]After you click on the button "Finish", a new [[service]] named "TOUPPER" will be available. In addition, a diagram is shown with the flow operations (in this case only one: the ''RequestReply'').
 
 
 
 
 
 
 
  
 +
This example shows a synchronous service.
  
 +
==How To==
  
 +
[[File:NewVulconProject.jpg|thumb| New Vulcon Project]]As this is our first example, the first step will be the creation of a new {{VULCON}} Project.
 +
# From the Menu panel of {{VULCON}} click File -> New -> Project. A new windows will be open containing the projects type.
 +
# Select "New Vulcon Project" item. Then click Next
 +
# Set the project name and Location. We named the project as TEST and the Location as /home/user/Lavoro/GvEnterprise3.2.0/workflow. Then click finish. The new {{VULCON}} project TEST has been created.
  
 +
The best mode for creating a Service is through the Wizard. But for use it you must first define the [[System]], [[Channel]] and the operations you need for.
 +
From the core view:
 +
# Expand the GVSystems item.
 +
# Right clicking on Systems, insert-after -> System. A new element System will be created.
 +
# Set the [[System]] parameters in the [[VulCon_perspective|Properties panel]]. We named it GVESB_TEST
 +
# By right clicking the [[System]] element, you can insert a new [[Channel]].
 +
# Click on this new Channel element and set the property ''id_channel''. We named TEST_CHANNEL
 +
# Finally, insert the operation you need for the workflow. In this case a test-service-call. Right clicking Channel -> Insert after (or Insert before) -> [[test-service-call]]. A new element will be created.
 +
# Set the [[test-service-call]] attributes. From the properties view set those as follows:
 +
** name: test.
  
 +
[[File:NewServiceWizard.jpg|thumb|New {{GVESB}} Service Wizard]]Now we are able to use the Wizard.
 +
# From the Core View of {{VULCON}}. Right click the element Services -> Wizard New Service
 +
# A new windows will be open where you can set the name of the Service you want to create, in this case we named TOUPPER. You can also select the paradigm, for this example will be synchronous-synchronous. Click next.
 +
# Set System as GVESB and Channel TEST_CHANNEL. Then finish.
  
  
[[File:GVExamplesTOUPPER4.jpg|thumb|Adding a Notification node]]The user can also customize the flow created by adding new nodes with the help of the palette tools. For example, let's add a [[Notification node]] for notifying an error occurred in the [[flow]] (must be inserted after a [[check node]] and it is identified by a red arrow).
+
[[File:TOUPPEREditor.jpg |thumb |TOUPPER flow]]A new Service named TOUPPER has been created and the editor will be open automatically, showing the nodes involved in our [[Flow]].
# pick a notification node present in the [[palette]] and drag it into the editor
+
* The [[Main_nodes|Start node]] sets the flow first node. In this case ''request''
# give it a name, we use ''notify''
+
* The [[Operations |Operation node]] ''request'' calls the ''test-service-call'' operation '''test''' and executes it.
# make the Error [[connection]] (red arrow pointing from ''check_status'' to ''end_error'' nodes), to point to ''notify'' node by dragging the arrowhead
+
* A [[Main_nodes|Check node]] named ''check_status'' is also inserted for controlling the success of the preceding node.
# create a Default [[connection]] from ''notify'' to ''end_error''
+
* If ''success'' flow passes to the [[Main_nodes|End node]] ''return_status''
# save the editor (Ctrl+s) or directly from the Eclipse Menu.
+
* In case of Error, flow goes to the [[Main_nodes|End node]] ''return_error''. The difference with ''return_status'' is signed by the Connection with ''check_status'' Check node. In this case an [[Error Connection]] (the Red arrow) have been used.  
# control that everything is fine in the Core view. Errors are visualized using the icon [[File:DefaultWarn.png|20px]] for the superelements and a red cross over the icon of the node for which the warning is present ([[File:notification_error.png|20px]] in this case)
+
* Save clicking the ''Save'' icon from the Core View
# moves the cursor over the object with warning. In this case ''notify''. Comments and warnings (reported with a red background) of the DTD elements appear as a tooltip. In this case it reads: "Attribute ''output'' in the element ''GVNotificationNode'' cannot be empty"
 
# set in the property panel the attribute output, preferably with the input value of one of the preceding operation nodes in order to avoid and [[exception]] spread.
 
# save the changes into the core view
 
  
 +
Now you are able to test your first {{VULCON}} service from the {{L_GVCONSOLE}}. But first you need to export the configuration.
  
[[File:GVExamplesTOUPPER5.jpg|thumb|Exporting configuration]]Once the flow is correctly configured, the user can export the configuration and pass it to the {{GVESB}} import tool, in order to add into the ESB the service just created. The Export function is available in the view "Navigator Explorer" (or "Project Explorer" depending on the Eclipse version), expanding the project and clicking the folder "conf" with the left mouse button (before you proceed press F5 to refresh the file list). It will open a drop-down list, which shows the "VulCon Editor "> option "Export in compressed files".
+
[[File:GVExamplesTOUPPER5.jpg|thumb|Exporting configuration]]Once the flow is correctly configured, the user can export the configuration and pass it to the {{GVESB}} import tool, in order to add into the ESB the service just created.
 +
# The Export function is available in the view "Project". Expand the project
 +
# Before you proceed press F5 to refresh the file list.
 +
# Right click the ''conf'' folder. It will open a drop-down list.
 +
# Clicking "Export" will be open a window. Select Vulcon Export Tool -> Vulcon Project. Then Next
 +
# Select the project and set the path where you want to save the file. Then Finish
  
  
Now you can test your First Vulcon Project using the {{L_GVCONSOLE}}. You can find the "How To" for this example clicking [[Examples using the GV Console | here]].
+
For knowing how test your service using {{L_GVCONSOLE}} click [[Examples using GVConsole | here]].

Revision as of 01:26, 10 February 2012

Description

This example shows a synchronous service.

How To

New Vulcon Project

As this is our first example, the first step will be the creation of a new VulCon Project.

  1. From the Menu panel of VulCon click File -> New -> Project. A new windows will be open containing the projects type.
  2. Select "New Vulcon Project" item. Then click Next
  3. Set the project name and Location. We named the project as TEST and the Location as /home/user/Lavoro/GvEnterprise3.2.0/workflow. Then click finish. The new VulCon project TEST has been created.

The best mode for creating a Service is through the Wizard. But for use it you must first define the System, Channel and the operations you need for. From the core view:

  1. Expand the GVSystems item.
  2. Right clicking on Systems, insert-after -> System. A new element System will be created.
  3. Set the System parameters in the Properties panel. We named it GVESB_TEST
  4. By right clicking the System element, you can insert a new Channel.
  5. Click on this new Channel element and set the property id_channel. We named TEST_CHANNEL
  6. Finally, insert the operation you need for the workflow. In this case a test-service-call. Right clicking Channel -> Insert after (or Insert before) -> test-service-call. A new element will be created.
  7. Set the test-service-call attributes. From the properties view set those as follows:
    • name: test.
New GreenVulcano® ESB Service Wizard

Now we are able to use the Wizard.

  1. From the Core View of VulCon. Right click the element Services -> Wizard New Service
  2. A new windows will be open where you can set the name of the Service you want to create, in this case we named TOUPPER. You can also select the paradigm, for this example will be synchronous-synchronous. Click next.
  3. Set System as GVESB and Channel TEST_CHANNEL. Then finish.


TOUPPER flow

A new Service named TOUPPER has been created and the editor will be open automatically, showing the nodes involved in our Flow.

  • The Start node sets the flow first node. In this case request
  • The Operation node request calls the test-service-call operation test and executes it.
  • A Check node named check_status is also inserted for controlling the success of the preceding node.
  • If success flow passes to the End node return_status
  • In case of Error, flow goes to the End node return_error. The difference with return_status is signed by the Connection with check_status Check node. In this case an Error Connection (the Red arrow) have been used.
  • Save clicking the Save icon from the Core View

Now you are able to test your first VulCon service from the GV Console®. But first you need to export the configuration.

Exporting configuration

Once the flow is correctly configured, the user can export the configuration and pass it to the GreenVulcano® ESB import tool, in order to add into the ESB the service just created.

  1. The Export function is available in the view "Project". Expand the project
  2. Before you proceed press F5 to refresh the file list.
  3. Right click the conf folder. It will open a drop-down list.
  4. Clicking "Export" will be open a window. Select Vulcon Export Tool -> Vulcon Project. Then Next
  5. Select the project and set the path where you want to save the file. Then Finish


For knowing how test your service using GV Console® click here.