Example workflow for REST and XPath activities
Created: 2012-04-05 16:44:54
Last updated: 2012-04-05 16:44:55
This workflow fetches weather forecast for the user-specified location.
First of all it uses the provided location name to obtain a WOEID ("Where On Earth ID") of that location, then uses that unique identifier to fetch the weather forecast from Yahoo server.
Multiple results may be obtained in case there is no unique translation of the location to a WOEID.
REST activity is used to perform HTTP requests and fetch data from remote servers; XPath activity is then used to parse the XML data and extract only selected elements.
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
![header=[] body=[This is the author information extracted from the workflow version] cssheader=[boxoverTooltipHeader] cssbody=[boxoverTooltipBody] delay=[200] Information](/images/famfamfam_silk/information.png?1680607579)
Authors (1)
![header=[] body=[These are the descriptive titles embedded within the workflow version] cssheader=[boxoverTooltipHeader] cssbody=[boxoverTooltipBody] delay=[200] Information](/images/famfamfam_silk/information.png?1680607579)
Titles (1)
Example workflow for REST and XPath activities |
![header=[] body=[These are the descriptions embedded within the workflow version] cssheader=[boxoverTooltipHeader] cssbody=[boxoverTooltipBody] delay=[200] Information](/images/famfamfam_silk/information.png?1680607579)
Descriptions (1)
This workflow fetches weather forecast for the user-specified location.
First of all it uses the provided location name to obtain a WOEID ("Where On Earth ID") of that location, then uses that unique identifier to fetch the weather forecast from Yahoo server.
Multiple results may be obtained in case there is no unique translation of the location to a WOEID.
REST activity is used to perform HTTP requests and fetch data from remote servers; XPath activity is then used to parse the XML data and extract only selected elements. |
![header=[] body=[These are the listed dependencies of the workflow] cssheader=[boxoverTooltipHeader] cssbody=[boxoverTooltipBody] delay=[200] Information](/images/famfamfam_silk/information.png?1680607579)
Dependencies (0)
Inputs (1)
Name |
Description |
Name_Of_Location_for_Weather_Forecast |
|
Processors (7)
Name |
Type |
Description |
LookupWOEID_REST_Service |
rest |
|
Get_Forecast_REST_Service |
rest |
|
Extract_WOEID_XPath_Service |
xpath |
Xpath Expression/query/results/default:place/default:woeid |
Extract_Forecast_Status_XPath_Service |
xpath |
Xpath Expression/rss/channel/item/yweather:condition/@text |
Extract_Sunrise_Time_XPath_Service |
xpath |
Xpath Expression/rss/channel/yweather:astronomy/@sunrise |
Extract_Sunset_Time_XPath_Service |
xpath |
Xpath Expression/rss/channel/yweather:astronomy/@sunset |
Extract_Forecast_Title_XPath_Service |
xpath |
Xpath Expression/rss/channel/item/title |
Outputs (4)
Name |
Description |
Forecast_Status |
|
Sunrise_Time |
|
Sunset_Time |
|
Forecast_For |
|
Datalinks (11)
Source |
Sink |
Name_Of_Location_for_Weather_Forecast |
LookupWOEID_REST_Service:location |
Extract_WOEID_XPath_Service:nodelist |
Get_Forecast_REST_Service:location_woeid |
LookupWOEID_REST_Service:responseBody |
Extract_WOEID_XPath_Service:xml_text |
Get_Forecast_REST_Service:responseBody |
Extract_Forecast_Status_XPath_Service:xml_text |
Get_Forecast_REST_Service:responseBody |
Extract_Sunrise_Time_XPath_Service:xml_text |
Get_Forecast_REST_Service:responseBody |
Extract_Sunset_Time_XPath_Service:xml_text |
Get_Forecast_REST_Service:responseBody |
Extract_Forecast_Title_XPath_Service:xml_text |
Extract_Forecast_Status_XPath_Service:nodelist |
Forecast_Status |
Extract_Sunrise_Time_XPath_Service:nodelist |
Sunrise_Time |
Extract_Sunset_Time_XPath_Service:nodelist |
Sunset_Time |
Extract_Forecast_Title_XPath_Service:nodelist |
Forecast_For |
Uploader
License
All versions of this Workflow are
licensed under:
Version 1
(of 1)
Credits (1)
(People/Groups)
Attributions (0)
(Workflows/Files)
None
Shared with Groups (1)
Featured In Packs (2)
Log in to add to one of your Packs
Attributed By (0)
(Workflows/Files)
None
Favourited By (0)
No one
Statistics
Other workflows that use similar services
(0)
There are no workflows in myExperiment that use similar services to this Workflow.
No comments yet
Log in to make a comment