blob: 16754ec70fc59118e4a8e99e9bfcafd8559f4cf4 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="SMILA/Documentation/HowTo/Howto integrate a component in SMILA,SMILA/Development Guidelines/Declarative Services,SMILA/Development Guidelines/How to filter and access record data in BPEL,SMILA/Development Guidelines/How to implement a crawler,SMILA/Development Guidelines/How to implement an agent,SMILA/Development Guidelines/How to integrate the HelloWorld webservice as a Pipelet,SMILA/Development Guidelines/How to write a Pipelet,SMILA/Development Guidelines/How to write a Worker,SMILA/Documentation/Bundle org.eclipse.smila.processing.pipelets,SMILA/Documentation/Bundle org.eclipse.smila.processing.pipelets.xmlprocessing,SMILA/Documentation/JobManager" />
<link rel="shortcut icon" href="http://wiki.eclipse.org/SMILA/favicon.ico" />
<link rel="search" type="application/opensearchdescription+xml" href="http://wiki.eclipse.org/opensearch_desc.php" title="Eclipsepedia (English)" />
<link rel="alternate" type="application/rss+xml" title="Eclipsepedia RSS Feed" href="http://wiki.eclipse.org/index.php?title=Special:Recentchanges&amp;feed=rss" />
<link rel="alternate" type="application/atom+xml" title="Eclipsepedia Atom Feed" href="http://wiki.eclipse.org/index.php?title=Special:Recentchanges&amp;feed=atom" />
<title>SMILA/Documentation/HowTo/Howto integrate a component in SMILA - Eclipsepedia</title>
<style type="text/css" media="screen,projection">/*<![CDATA[*/ @import "http://wiki.eclipse.org/skins/eclipsenova/novaWide.css?116"; /*]]>*/</style>
<link rel="stylesheet" type="text/css" media="print" href="http://wiki.eclipse.org/skins/eclipsenova/eclipsenovaPrint.css?116" />
<link rel="stylesheet" type="text/css" media="handheld" href="http://wiki.eclipse.org/skins/eclipsenova/handheld.css?116" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/Nova/css/header.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/tabs.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/Nova/css/visual.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/Nova/css/layout.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/Nova/css/footer.css" media="screen" />
<!--[if IE]><link rel="stylesheet" type="text/css" href="/skins/eclipsenova/IEpngfix.css" media="screen" /><![endif]-->
<!--[if lt IE 5.5000]><style type="text/css">@import "/skins/eclipsenova/IE50Fixes.css?116";</style> <![endif]-->
<!--[if IE 5.5000]><style type="text/css">@import "/skins/eclipsenova/IE55Fixes.css?116";</style><![endif]-->
<!--[if IE 6]><style type="text/css">@import "/skins/eclipsenova/IE60Fixes.css?116";</style><![endif]-->
<!--[if IE 7]><style type="text/css">@import "/skins/eclipsenova/IE70Fixes.css?116";</style><![endif]-->
<!--[if lt IE 7]><script type="text/javascript" src="/skins/common/IEFixes.js?116"></script>
<meta http-equiv="imagetoolbar" content="no" /><![endif]-->
<script type= "text/javascript">/*<![CDATA[*/
var skin = "eclipsenova";
var stylepath = "/skins";
var wgArticlePath = "/$1";
var wgScriptPath = "";
var wgScript = "/index.php";
var wgServer = "http://wiki.eclipse.org";
var wgCanonicalNamespace = "";
var wgCanonicalSpecialPageName = false;
var wgNamespaceNumber = 0;
var wgPageName = "SMILA/Documentation/HowTo/Howto_integrate_a_component_in_SMILA";
var wgTitle = "SMILA/Documentation/HowTo/Howto integrate a component in SMILA";
var wgAction = "view";
var wgRestrictionEdit = [];
var wgRestrictionMove = [];
var wgArticleId = "15994";
var wgIsArticle = true;
var wgUserName = null;
var wgUserGroups = null;
var wgUserLanguage = "en";
var wgContentLanguage = "en";
var wgBreakFrames = false;
var wgCurRevisionId = "286113";
var wgVersion = "1.12.0";
var wgEnableAPI = true;
var wgEnableWriteAPI = false;
/*]]>*/</script>
<script type="text/javascript" src="http://wiki.eclipse.org/skins/common/wikibits.js?116"><!-- wikibits js --></script>
<!-- Performance mods similar to those for bug 166401 -->
<script type="text/javascript" src="http://wiki.eclipse.org/index.php?title=-&amp;action=raw&amp;gen=js&amp;useskin=eclipsenova"><!-- site js --></script>
<!-- Head Scripts -->
<script type="text/javascript" src="http://wiki.eclipse.org/skins/common/ajax.js?116"></script>
<link rel="stylesheet" type="text/css" href="Howto_integrate_a_component_in_SMILA.html" /> </head>
<body class="mediawiki ns-0 ltr page-SMILA_Documentation_HowTo_Howto_integrate_a_component_in_SMILA">
<div id="globalWrapper">
<div id="column-one">
<!-- Eclipse Additions for the Top Nav start here M. Ward-->
<div id="header">
<div id="header-graphic">
<img src="http://wiki.eclipse.org/skins/eclipsenova/eclipse.png" alt="Eclipse Wiki">
</div>
<!-- Pulled 101409 Mward -->
<div class="portlet" id="p-personal">
<div class="pBody">
<ul>
<li id="pt-login"><a href="http://wiki.eclipse.org/index.php?title=Special:Userlogin&amp;returnto=SMILA/Documentation/HowTo/Howto_integrate_a_component_in_SMILA">Log in</a></li>
</ul>
</div>
</div>
<div id="header-icons">
<div id="sites">
<ul id="sitesUL">
<li><a href="http://www.eclipse.org"><img src="http://dev.eclipse.org/custom_icons/eclipseIcon.png" width="28" height="28" alt="Eclipse Foundation" title="Eclipse Foundation" /><div>Eclipse Foundation</div></a></li>
<li><a href="http://marketplace.eclipse.org"><img src="http://dev.eclipse.org/custom_icons/marketplace.png" width="28" height="28" alt="Eclipse Marketplace" title="Eclipse Marketplace" /><div>Eclipse Marketplace</div></a></li>
<li><a href="https://bugs.eclipse.org/bugs"><img src="http://dev.eclipse.org/custom_icons/system-search-bw.png" width="28" height="28" alt="Bugzilla" title="Bugzilla" /><div>Bugzilla</div></a></li>
<li><a href="http://live.eclipse.org"><img src="http://dev.eclipse.org/custom_icons/audio-input-microphone-bw.png" width="28" height="28" alt="Live" title="Live" /><div>Eclipse Live</div></a></li>
<li><a href="http://planeteclipse.org"><img src="http://dev.eclipse.org/large_icons/devices/audio-card.png" width="28" height="28" alt="PlanetEclipse" title="Planet" /><div>Planet Eclipse</div></a></li>
<li><a href="http://portal.eclipse.org"><img src="http://dev.eclipse.org/custom_icons/preferences-system-network-proxy-bw.png" width="28" height="28" alt="Portal" title="Portal" /><div>My Foundation Portal</div></a></li>
</ul>
</div>
</div>
</div>
<!-- NEW HEADER STUFF HERE -->
<div id="header-menu">
<div id="header-nav">
<ul> <li><a class="first_one" href="http://wiki.eclipse.org/" target="_self">Home</a></li> <li><a href="http://www.eclipse.org/downloads/" target="_self">Downloads</a></li>
<li><a href="http://www.eclipse.org/users/" target="_self">Users</a></li>
<li><a href="http://www.eclipse.org/membership/" target="_self">Members</a></li>
<li><a href="http://wiki.eclipse.org/index.php/Development_Resources" target="_self">Committers</a></li>
<li><a href="http://www.eclipse.org/resources/" target="_self">Resources</a></li>
<li><a href="http://www.eclipse.org/projects/" target="_self">Projects</a></li>
<li><a href="http://www.eclipse.org/org/" target="_self">About Us</a></li>
</ul>
</div>
<div id="header-utils">
<!-- moved the search window here -->
<form action="http://wiki.eclipse.org/Special:Search" >
<input class="input" name="search" type="text" accesskey="f" value="" />
<input type='submit' onclick="this.submit();" name="go" id="searchGoButton" class="button" title="Go to a page with this exact name if one exists" value="Go" />&nbsp;
<input type='submit' onclick="this.submit();" name="fulltext" class="button" id="mw-searchButton" title="Search Eclipsepedia for this text" value="Search" />
</form>
</div>
</div>
<!-- Eclipse Additions for the Header stop here -->
<!-- Additions and mods for leftside nav Start here -->
<!--Started nav rip here-->
<!-- these are the nav controls main page, changes etc -->
<div id="novaContent" class="faux">
<div id="leftcol">
<ul id="leftnav">
<!-- these are the page controls, edit history etc -->
<li class="separator"><a class="separator">Navigation &#160;&#160;</li>
<li id="n-mainpage"><a href="http://wiki.eclipse.org/Main_Page">Main Page</a></li>
<li id="n-portal"><a href="http://wiki.eclipse.org/Eclipsepedia:Community_Portal">Community portal</a></li>
<li id="n-currentevents"><a href="http://wiki.eclipse.org/Eclipsepedia:Current_events">Current events</a></li>
<li id="n-recentchanges"><a href="http://wiki.eclipse.org/Special:Recentchanges">Recent changes</a></li>
<li id="n-randompage"><a href="http://wiki.eclipse.org/Special:Random">Random page</a></li>
<li id="n-help"><a href="http://wiki.eclipse.org/Help:Contents">Help</a></li>
<li class="separator"><a class="separator">Toolbox &#160;&#160;</a></li>
<li id="t-whatlinkshere"><a href="http://wiki.eclipse.org/Special:Whatlinkshere/SMILA/Documentation/HowTo/Howto_integrate_a_component_in_SMILA">What links here</a></li>
<li id="t-recentchangeslinked"><a href="http://wiki.eclipse.org/Special:Recentchangeslinked/SMILA/Documentation/HowTo/Howto_integrate_a_component_in_SMILA">Related changes</a></li>
<!-- This is the toolbox section -->
<li id="t-upload"><a href="http://wiki.eclipse.org/Special:Upload">Upload file</a></li>
<li id="t-specialpages"><a href="http://wiki.eclipse.org/Special:Specialpages">Special pages</a></li>
<li id="t-print"><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/HowTo/Howto_integrate_a_component_in_SMILA&amp;printable=yes">Printable version</a></li> <li id="t-permalink"><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/HowTo/Howto_integrate_a_component_in_SMILA&amp;oldid=286113">Permanent link</a></li> </ul>
</div>
<!-- Additions and mods for leftside nav End here -->
<div id="column-content">
<div id="content">
<a name="top" id="top"></a>
<div id="tabs">
<ul class="primary">
<li class="active"><a href="Documentation/HowTo/Howto_integrate_a_component_in_SMILA.html"><span class="tab">Page</span></a></li>
<li><a href="http://wiki.eclipse.org/index.php?title=Talk:SMILA/Documentation/HowTo/Howto_integrate_a_component_in_SMILA&amp;action=edit"><span class="tab">Discussion</span></a></li>
<li><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/HowTo/Howto_integrate_a_component_in_SMILA&amp;action=edit"><span class="tab">View source</span></a></li>
<li><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/HowTo/Howto_integrate_a_component_in_SMILA&amp;action=history"><span class="tab">History</span></a></li>
<li><a href="http://wiki.eclipse.org/index.php?title=Special:Userlogin&amp;returnto=SMILA/Documentation/HowTo/Howto&#32;integrate&#32;a&#32;component&#32;in&#32;SMILA"><span class="tab">Edit</span></a></li>
</ul>
</div>
<script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script>
<h1 class="firstHeading">SMILA/Documentation/HowTo/Howto integrate a component in SMILA</h1>
<div id="bodyContent">
<h3 id="siteSub">From Eclipsepedia</h3>
<div id="contentSub"><span class="subpages">&lt; <a href="../SMILA.html" title="SMILA">SMILA</a> | <a href="Documentation.1.html" title="SMILA/Documentation">Documentation</a> | <a href="Documentation/HowTo.html" title="SMILA/Documentation/HowTo">HowTo</a></span>(Redirected from <a href="http://wiki.eclipse.org/index.php?title=SMILA/Howto_integrate_a_component_in_SMILA&amp;redirect=no" title="SMILA/Howto integrate a component in SMILA">SMILA/Howto integrate a component in SMILA</a>)</div>
<div id="jump-to-nav">Jump to: <a href="Howto_integrate_a_component_in_SMILA.html#column-one">navigation</a>, <a href="Howto_integrate_a_component_in_SMILA.html#searchInput">search</a></div> <!-- start content -->
<p>This page summarizes the different types and complexity levels for the integration of components in SMILA.
</p>
<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
<ul>
<li class="toclevel-1"><a href="Howto_integrate_a_component_in_SMILA.html#Introduction"><span class="tocnumber">1</span> <span class="toctext">Introduction</span></a></li>
<li class="toclevel-1"><a href="Howto_integrate_a_component_in_SMILA.html#Conventions"><span class="tocnumber">2</span> <span class="toctext">Conventions</span></a>
<ul>
<li class="toclevel-2"><a href="Howto_integrate_a_component_in_SMILA.html#Handling_of_Character_Encoding"><span class="tocnumber">2.1</span> <span class="toctext">Handling of Character Encoding</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="Howto_integrate_a_component_in_SMILA.html#Integrating_BPEL_service"><span class="tocnumber">3</span> <span class="toctext">Integrating BPEL service</span></a>
<ul>
<li class="toclevel-2"><a href="Howto_integrate_a_component_in_SMILA.html#Simple:_Integrating_web_services"><span class="tocnumber">3.1</span> <span class="toctext">Simple: Integrating web services</span></a>
<ul>
<li class="toclevel-3"><a href="Howto_integrate_a_component_in_SMILA.html#Examples"><span class="tocnumber">3.1.1</span> <span class="toctext">Examples</span></a></li>
<li class="toclevel-3"><a href="Howto_integrate_a_component_in_SMILA.html#Further_reading"><span class="tocnumber">3.1.2</span> <span class="toctext">Further reading</span></a></li>
</ul>
</li>
<li class="toclevel-2"><a href="Howto_integrate_a_component_in_SMILA.html#Default:_Integrating_local_SMILA_pipelets"><span class="tocnumber">3.2</span> <span class="toctext">Default: Integrating local SMILA pipelets</span></a>
<ul>
<li class="toclevel-3"><a href="Howto_integrate_a_component_in_SMILA.html#Examples_2"><span class="tocnumber">3.2.1</span> <span class="toctext">Examples</span></a></li>
<li class="toclevel-3"><a href="Howto_integrate_a_component_in_SMILA.html#Further_reading_2"><span class="tocnumber">3.2.2</span> <span class="toctext">Further reading</span></a></li>
</ul>
</li>
<li class="toclevel-2"><a href="Howto_integrate_a_component_in_SMILA.html#Advanced:_Integrating_remote_services"><span class="tocnumber">3.3</span> <span class="toctext">Advanced: Integrating remote services</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="Howto_integrate_a_component_in_SMILA.html#Enhanced:_Integrating_own_workers"><span class="tocnumber">4</span> <span class="toctext">Enhanced: Integrating own workers</span></a>
<ul>
<li class="toclevel-2"><a href="Howto_integrate_a_component_in_SMILA.html#Description"><span class="tocnumber">4.1</span> <span class="toctext">Description</span></a></li>
<li class="toclevel-2"><a href="Howto_integrate_a_component_in_SMILA.html#Further_reading_3"><span class="tocnumber">4.2</span> <span class="toctext">Further reading</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="Howto_integrate_a_component_in_SMILA.html#Integrating_data_sources"><span class="tocnumber">5</span> <span class="toctext">Integrating data sources</span></a>
<ul>
<li class="toclevel-2"><a href="Howto_integrate_a_component_in_SMILA.html#Examples_3"><span class="tocnumber">5.1</span> <span class="toctext">Examples</span></a></li>
<li class="toclevel-2"><a href="Howto_integrate_a_component_in_SMILA.html#Further_reading_4"><span class="tocnumber">5.2</span> <span class="toctext">Further reading</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="Howto_integrate_a_component_in_SMILA.html#Integrating_alternative_implementations_of_SMILA_core_components"><span class="tocnumber">6</span> <span class="toctext">Integrating alternative implementations of SMILA core components</span></a>
<ul>
<li class="toclevel-2"><a href="Howto_integrate_a_component_in_SMILA.html#Examples_4"><span class="tocnumber">6.1</span> <span class="toctext">Examples</span></a></li>
<li class="toclevel-2"><a href="Howto_integrate_a_component_in_SMILA.html#Further_reading_5"><span class="tocnumber">6.2</span> <span class="toctext">Further reading</span></a></li>
</ul>
</li>
</ul>
</td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
<a name="Introduction"></a><h2> <span class="mw-headline"> Introduction </span></h2>
<p>Due to its architecture SMILA allows for the easy integration of third-party components into its framework. Actually there are four different possible integration scenarios available that are depicted in the following table.
</p>
<table class="wikitable" border="1" cellpadding="5">
<tr>
<td> <a href="Howto_integrate_a_component_in_SMILA.html#Integrating_BPEL_service" title="">Integrating BPEL service</a>
</td></tr>
<tr valign="top">
<td> This is probably the most frequently used integration scenario. It allows for the integration or exchange of functionality (services, 3rd party software, etc.) used to process records in the workflow engine.
</td></tr>
<tr valign="top">
<td> <a href="http://wiki.eclipse.org/Image:Integrate-Service_0.9.0.png" class="image" title="image:Integrate-Service_0.9.0.png"><img alt="image:Integrate-Service_0.9.0.png" src="http://wiki.eclipse.org/images/2/2e/Integrate-Service_0.9.0.png" width="960" height="720" border="0" /></a>
</td></tr>
<tr valign="top">
<td> The figure demonstrates how you can integrate the functionality of your service or your piece of software to SMILA by adding it to the workflow engine.
</td></tr></table>
<p><br />
</p>
<table class="wikitable" border="1" cellpadding="5">
<tr>
<td> <a href="Howto_integrate_a_component_in_SMILA.html#Integrating_data_sources" title="">Integrating data sources</a>
</td></tr>
<tr valign="top">
<td> <span style="color:red; background-color:yellow">Deprecated, implement a new crawler for the ETL framework instead of the deprecated connectivity framework. See <a href="HowTo.html" class="mw-redirect" title="SMILA/HowTo">HowTos</a>.</span> Integrating your own <a href="Glossary.html#C" title="SMILA/Glossary">crawler</a> or <a href="Glossary.html#A" title="SMILA/Glossary">agent</a> implementations is another common scenario for adding functionality to SMILA. By doing so, further data sources can be unlocked to provide additional input to SMILA.
</td></tr>
<tr valign="top">
<td> <a href="http://wiki.eclipse.org/Image:Integrate-Crawler_0.9.0.png" class="image" title="image:Integrate-Crawler_0.9.0.png"><img alt="image:Integrate-Crawler_0.9.0.png" src="http://wiki.eclipse.org/images/1/1a/Integrate-Crawler_0.9.0.png" width="960" height="720" border="0" /></a>
</td></tr>
<tr valign="top">
<td> The figure above exemplary shows how you can add your own crawler implementation to SMILA. Please note that though you may also add an agent implementation likewise this option is not shown in the figure. This was chosen due to simplicity.
</td></tr></table>
<p><br />
</p>
<table class="wikitable" border="1" cellpadding="5">
<tr>
<td> <a href="Howto_integrate_a_component_in_SMILA.html#Integrating_workers" title="">Integrating workers</a>
</td></tr>
<tr valign="top">
<td> Integrating your own <a href="Glossary.html#W" title="SMILA/Glossary">worker</a> implementation is another common scenario for adding functionality or adapting workflows to SMILA.
</td></tr>
<tr valign="top">
<td> <a href="http://wiki.eclipse.org/Image:Integrate-Worker_0.9.0.png" class="image" title="image:Integrate-Worker_0.9.0.png"><img alt="image:Integrate-Worker_0.9.0.png" src="http://wiki.eclipse.org/images/9/93/Integrate-Worker_0.9.0.png" width="960" height="720" border="0" /></a>
</td></tr>
<tr valign="top">
<td> The figure above exemplary shows how you can add your own worker implementation to SMILA. Please note that you also have to add the worker to the job manager configuration files (workers.json, workflows.json) and add your worker as an OSGi service to activate it.
</td></tr></table>
<p><br />
</p>
<table class="wikitable" border="1" cellpadding="5">
<tr>
<td> <a href="Howto_integrate_a_component_in_SMILA.html#Integrating_alternative_implementations_of_SMILA_core_components" title="">Integrating alternative implementations of SMILA core components</a>
</td></tr>
<tr valign="top">
<td> This scenario is particularly intended for the experienced (SMILA) developer and comprises the possibility to exchange existing implementations of the SMILA core components by your own implementations.
</td></tr>
<tr valign="top">
<td> <a href="http://wiki.eclipse.org/Image:Provide-Alternative-To-Core-Component_0.9.0.png" class="image" title="image:Provide-Alternative-To-Core-Component_0.9.0.png"><img alt="image:Provide-Alternative-To-Core-Component_0.9.0.png" src="http://wiki.eclipse.org/images/9/95/Provide-Alternative-To-Core-Component_0.9.0.png" width="960" height="720" border="0" /></a>
</td></tr>
<tr valign="top">
<td> The figure above demonstrates how two of the SMILA core components -- <i>connectivity</i> (which btw. is deprecated in SMILA 1.0) and <i>data store</i> -- may be exchanged by your own implementations. These components serve as examples only, that is, you may also exchange other core components such as the <a href="Glossary.html#B" title="SMILA/Glossary">blackboard service</a> or the <a href="Glossary.html#D" title="SMILA/Glossary">delta indexing manager</a>.
</td></tr></table>
<div class="messagebox" style="background-color: #def3fe; border: 1px solid #c5d7e0; color: black; padding: 5px; margin: 1ex 0; min-height: 35px; padding-left: 45px;">
<div style="float: left; margin-left: -40px;"><a href="http://wiki.eclipse.org/Image:Note.png" class="image" title="Note.png"><img alt="" src="http://wiki.eclipse.org/images/c/cc/Note.png" width="35" height="35" border="0" /></a></div>
<div><b>The above figures exemplary demonstrate at which levels in the <a href="http://www.eclipse.org/smila" class="external text" title="http://www.eclipse.org/smila" rel="nofollow">SMILA architecture</a> an integration of new components is applicable. However, for simplicity reason, we restricted the above figures to the index processing chain while completely ignoring the search processing chain that offers the same integration options (except for the integration of agents and crawlers), but is currently not in the focus of this page.</b>
<b><br /></div></b>
</div>
<a name="Conventions"></a><h2> <span class="mw-headline"> Conventions </span></h2>
<a name="Handling_of_Character_Encoding"></a><h3> <span class="mw-headline"> Handling of Character Encoding </span></h3>
<p>To make processing of data in SMILA easier: If external data must be converted to a string (e.g. an attribute value), the crawler, agent or any other component accessing an external data source should try everything that is possible to ensure that the conversion is done using the correct encoding. For example, HTTP clients should use the encoding reported by the HTTP server. If the data source does not provide information about the character encoding, you can use the class <tt>org.eclipse.smila.utils.file.EncodingHelper</tt> that tries to convert a byte[] to a string by trying to detect the correct encoding from a <tt>byte[]</tt> by checking BOMs or checking XML and HTML content for instructions and finally by using UTF-8 or, if this fails, the default platform encoding. You may find this helpful.
</p><p>On the other hand, if valid string data must be converted to a byte[] (e.g. if it is stored as a attachment after pipelet processing), the conversion must always use UTF-8 encoding.
</p>
<a name="Integrating_BPEL_service"></a><h2> <span class="mw-headline"> Integrating BPEL service </span></h2>
<p>As already shown in the overview above, SMILA offers the possibility to integrate your own service or piece of software into SMILA <a href="Glossary.html#BPEL" title="SMILA/Glossary">BPEL</a> workflows.
In SMILA we simply call these workflows <a href="Glossary.html#P" title="SMILA/Glossary">pipelines</a>. A pipeline is the definition of a BPEL process (or workflow) that orchestrates <a href="Glossary.html#P" title="SMILA/Glossary">pipelets</a> and other BPEL services (e.g. web services).
</p><p>There are several options on how to achieve this:
</p>
<ul><li> <a href="Howto_integrate_a_component_in_SMILA.html#Simple:_Integrating_web_services" title="">Simple</a>: The easiest method to add functionality is to invoke a web service by using the standard functionality of BPEL. However, the disadvantage is that not all data of SMILA <a href="Glossary.html#R" title="SMILA/Glossary">records</a> are accessible if you opt for this method of integration.
</li><li> <a href="Howto_integrate_a_component_in_SMILA.html#Default:_Integrating_local_SMILA_pipelets" title="">Default</a>: The recommended way to integrate additional functionality in SMILA is to provide Java implementations of an interface that allow for an easy creation of the above mentioned <a href="Glossary.html#P" title="SMILA/Glossary">pipelets</a>.
</li><li> <a href="Howto_integrate_a_component_in_SMILA.html#Advanced:_Integrating_remote_SMILA_processing_services" title="">Advanced</a>: (<i>idea, not realized yet</i>) This method extends the default mechanism by providing an alternative procedure for integrating OSGi services that do not run in the same OSGi runtime as the BPEL workflow but in another OSGI runtime that may even run on a remote machine.
</li></ul>
<a name="Simple:_Integrating_web_services"></a><h4> <span class="mw-headline"> Simple: Integrating web services </span></h4>
<p>The simplest way of integrating additional functionality in SMILA is to call a web service, which is a standard BPEL workflow engine functionality independent of SMILA. However, there are some limitations concerning the input and result data to/from web services: The workflow object (a DOM object) that enters the BPEL workflow in SMILA contains only the record <a href="Glossary.html#I" title="SMILA/Glossary">IDs</a> by default. That means <a href="Glossary.html#R" title="SMILA/Glossary">records</a> and the data contained therein - <a href="Glossary.html#A" title="SMILA/Glossary">attributes</a>, <a href="Glossary.html#A" title="SMILA/Glossary">annotations</a>, and <a href="Glossary.html#A" title="SMILA/Glossary">attachments</a> - are <b>not</b> accessible from a BPEL workflow because it can only access and use the values contained in the BPEL workflow object.
</p><p>To overcome this restriction you can add additional data to the workflow object by adding filters in the configuration file located at <tt>org.eclipse.smila.blackboard/RecordFilters.xml</tt>. These filter rules define which <a href="Glossary.html#A" title="SMILA/Glossary">attributes</a> and <a href="Glossary.html#A" title="SMILA/Glossary">annotations</a> should be copied to the workflow object to make them accessible in the BPEL workflow. Additionally, you should not forget to include all attributes and annotations in the <tt>RecordFilters.xml</tt> file that you wish to write data to. Though filters work on attributes and annotations there is no possibility to access attachments of records because binary data is not reasonable in DOM.
</p>
<a name="Examples"></a><h5> <span class="mw-headline"> Examples </span></h5>
<p>A good example for this use case is the integration of the <a href="http://www.languageweaver.com/home.asp" class="external text" title="http://www.languageweaver.com/home.asp" rel="nofollow">Language Weaver</a> web service. The Language Weaver Translation Server provides a web service interface that translates a text into another language. This service could easily be used within SMILA to extend its functionality.
</p>
<a name="Further_reading"></a><h5> <span class="mw-headline"> Further reading </span></h5>
<p>Please consult the following how-to tutorials for a more detailed technical description:
</p>
<ul><li> <a href="Development_Guidelines/How_to_filter_and_access_record_data_in_BPEL.html" class="mw-redirect" title="SMILA/Development Guidelines/How to filter and access record data in BPEL">How to filter and access record data in BPEL</a>
</li><li> <a href="Development_Guidelines/How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet.html" class="mw-redirect" title="SMILA/Development Guidelines/How to integrate the HelloWorld webservice as a Pipelet">How to integrate the HelloWorld <b>web service</b> as a pipelet</a>
</li></ul>
<a name="Default:_Integrating_local_SMILA_pipelets"></a><h4> <span class="mw-headline"> Default: Integrating local SMILA pipelets </span></h4>
<p>The default and thus recommended technique to integrate simple and small functionality or software in SMILA is to provide a <a href="Glossary.html#P" title="SMILA/Glossary">pipelet</a> that runs in the same OSGi runtime as the BPEL workflow engine. Pipelets are easy to implement as they require only standard Java knowledge. They are not shared between multiple pipelines, even multiple invocations of a Pipelet in the same Pipeline do not share the same instance. The lifecycle and configuration of pipelets is managed by the workflow engine, not by OSGi runtime. For further information on pipelets refer to the <a href="Documentation/Pipelets.html" title="SMILA/Documentation/Pipelets">Pipelets documentation</a>.
</p><p>The above mentioned restriction of integrated web services using the BPEL default engine functionality does not apply to pipelets. Both have full access to SMILA <a href="Glossary.html#R" title="SMILA/Glossary">records</a> by using the [SMILA/Glossary#B|blackboard service]], which makes it easy to read, modify, and store <a href="Glossary.html#R" title="SMILA/Glossary">records</a>.
</p><p>In general pipelets follow the same (sometimes optional) logical steps (of course this depends highly on the business logic to be executed). These steps are:
</p>
<ul><li> Read the configuration (optional)
</li><li> Read input data from blackboard (optional)
</li><li> Execute the business logic
</li><li> Write result data to blackboard (optional)
</li></ul>
<p>In terms of the pipelet that implements the business logic you are totally free to use any desired technology. Some of the posibilities include:
</p>
<ul><li> Using POJOs (For examples refer to the <a href="Documentation/Bundle_org.eclipse.smila.processing.pipelets.xmlprocessing.html" title="SMILA/Documentation/Bundle org.eclipse.smila.processing.pipelets.xmlprocessing">XML processing pipelets</a>)
</li><li> Using any local available OSGi service (For an example refer to the <a href="Documentation/Bundle_org.eclipse.smila.processing.pipelets.html#org.eclipse.smila.processing.pipelets.MimeTypeIdentifyPipelet" title="SMILA/Documentation/Bundle org.eclipse.smila.processing.pipelets">MimeTypeIdentifyPipelet</a> which uses a MimeTypeIdentifier service)
</li><li> Using other technologies such as JNI, RMI, or CORBA to integrate remote or non Java components (As an example consider the integration of <a href="http://www.oracle.com/technologies/embedded/outside-in.html" class="external text" title="http://www.oracle.com/technologies/embedded/outside-in.html" rel="nofollow">Oracle Outside In Technology</a>.)
</li></ul>
<a name="Examples_2"></a><h5> <span class="mw-headline"> Examples </span></h5>
<ul><li> Typical examples for pipelets are the <a href="Documentation/Bundle_org.eclipse.smila.processing.pipelets.xmlprocessing.html" title="SMILA/Documentation/Bundle org.eclipse.smila.processing.pipelets.xmlprocessing">XML processing pipelets</a>. These lightweight pipelets are used for XML processing (e.g. XSL transformation). Each pipeline uses its own <a href="Glossary.html#P" title="SMILA/Glossary">pipelet</a> instance.
</li></ul>
<a name="Further_reading_2"></a><h5> <span class="mw-headline"> Further reading </span></h5>
<p>Please consult the following how-to tutorials for a more detailed technical description:
</p>
<ul><li> <a href="Development_Guidelines/How_to_write_a_Pipelet.html" class="mw-redirect" title="SMILA/Development Guidelines/How to write a Pipelet">How to write a pipelet</a>
</li><li> <a href="Development_Guidelines/How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet.html" class="mw-redirect" title="SMILA/Development Guidelines/How to integrate the HelloWorld webservice as a Pipelet">How to integrate the HelloWorld web service as a pipelet</a>
</li></ul>
<a name="Advanced:_Integrating_remote_services"></a><h4> <span class="mw-headline"> Advanced: Integrating remote services </span></h4>
<p>tbd.
</p>
<a name="Enhanced:_Integrating_own_workers"></a><h2> <span class="mw-headline"> Enhanced: Integrating own workers </span></h2>
<p>When the desired changes to the functionality are not simple and small or the desired functionality requires more than just accessing the records, it is recommended to integrate your functionality as new <a href="Glossary.html#W" title="SMILA/Glossary">workers</a>.
These workers have to be defined in the asynchronous job processing configuration and can then be integrated in workflows.
</p>
<a name="Description"></a><h3> <span class="mw-headline"> Description </span></h3>
<p>A worker is an OSGi service, that implements the Worker interface, i.e. provides a name (to collect tasks and to be identified in workflows) and offers a threadsafe <tt>perform</tt> method, which takes a <tt>TaskContext</tt> object (generated by the WorkerManager) as an argument.
</p><p>Normally the worker will handle a bulk of records in the perform method, manipulate the contained records, may access external services or stores and create new bulks of records.
</p><p>The worker does not have to handle tasks or check if tasks are available. These menial tasks are done by the WorkerManager that cares for all registered workers, handles the invocations of their perform methods and copes with input and output bulks, up-scaling or exception handling. The worker just has to provide the perfom method to deal with the records.
</p><p>If the worker requires direct access to the JobManager/TaskManager, e.g. because it is an initial worker and has to get initial tasks to start workflow runs without being triggered by previous workers, it must not register itself as a Worker service but has to tackle TaskManager and JobManager itself. Be careful, this is tedious work! So if possible stick to the Worker interface and let everything else be handled by the WorkerManager.
</p>
<a name="Further_reading_3"></a><h3> <span class="mw-headline"> Further reading </span></h3>
<p>Please consult at least the following pages about asynchronous job processing:
</p>
<ul><li> <a href="Documentation/JobManager.html" title="SMILA/Documentation/JobManager">JobManager</a>
</li><li> <a href="Documentation/WorkerManager.html" title="SMILA/Documentation/WorkerManager">WorkerManager</a>
</li><li> [<a href="http://build.eclipse.org/rt/smila/javadoc/current/index.html?org/eclipse/smila/taskworker/package-summary.html|TaskWorker" class="external text" title="http://build.eclipse.org/rt/smila/javadoc/current/index.html?org/eclipse/smila/taskworker/package-summary.html|TaskWorker" rel="nofollow">JavaDoc</a>]
</li><li> <a href="Development_Guidelines/How_to_write_a_Worker.html" class="mw-redirect" title="SMILA/Development Guidelines/How to write a Worker">How to write a <b>worker</b></a>
</li></ul>
<a name="Integrating_data_sources"></a><h2> <span class="mw-headline"> Integrating data sources </span></h2>
<p><span style="color:red; background-color:yellow">The connectivity framework is deprecated as of SMILA 1.0. Consider implementing a new crawler for the ETL framework (which is implemented as a worker) instead of the deprecated connectivity framework. See <a href="HowTo.html" class="mw-redirect" title="SMILA/HowTo">HowTos</a>.</span>
</p><p>Due to the architecture of the SMILA connectivity framework it is easy to include additional data sources by providing appropriate implementations of <a href="Glossary.html#A" title="SMILA/Glossary">agents</a> and/or <a href="Glossary.html#C" title="SMILA/Glossary">crawlers</a>.
</p>
<a name="Examples_3"></a><h3> <span class="mw-headline"> Examples </span></h3>
<ul><li> A typical agent is a FilesystemWatcher. It monitors a folder (or folder structure) for changes (creation, modification, or deletion of files/folders) and reports those actions to SMILA.
</li><li> Typical crawlers are the FilesystemCrawler or the WebCrawler. The first iterates over a folder structure and sends all encountered files to SMILA. The latter traverses the links of HTML pages, follows links to other HTML pages, and sends these pages as well as other resources (images, PDF files, etc.) to SMILA.
</li></ul>
<a name="Further_reading_4"></a><h3> <span class="mw-headline"> Further reading </span></h3>
<p>Please consult the following how-to tutorials for a more detailed technical description:
</p>
<ul><li> <a href="Development_Guidelines/How_to_implement_an_agent.html" class="mw-redirect" title="SMILA/Development Guidelines/How to implement an agent">How to implement an agent</a>
</li><li> <a href="Development_Guidelines/How_to_implement_a_crawler.html" class="mw-redirect" title="SMILA/Development Guidelines/How to implement a crawler">How to implement a crawler</a>
</li></ul>
<a name="Integrating_alternative_implementations_of_SMILA_core_components"></a><h2> <span class="mw-headline"> Integrating alternative implementations of SMILA core components </span></h2>
<p>The component-based architecture of SMILA even allows you to provide your own implementations of SMILA core components, since these are implemented as OSGi service components (see <a href="Development_Guidelines/Declarative_Services.html" class="mw-redirect" title="SMILA/Development Guidelines/Declarative Services">Declarativ Services</a>) and can thus be exchanged in a standard way.
</p>
<ul><li> Include a new plug-in that exposes a service implementing the interface of the core component (e.g. <tt>ObjectStoreService</tt>)
</li><li> modify the config.ini configuration file in SMILA.application to include and start the new plug-in instead of the plug-in provided by SMILA core.
</li><li> build your application and run it.
</li></ul>
<a name="Examples_4"></a><h3> <span class="mw-headline"> Examples </span></h3>
<p>A typical example could be an alternative implementation of the <tt>ObjectStoreService</tt> that does not store the objects in the file system but in memory or in a database.
</p>
<a name="Further_reading_5"></a><h3> <span class="mw-headline"> Further reading </span></h3>
<ul><li> <a href="Development_Guidelines/Declarative_Services.html" class="mw-redirect" title="SMILA/Development Guidelines/Declarative Services">SMILA/Development_Guidelines/Declarative_Services</a>
</li><li> <a href="http://eclipse.org/equinox" class="external text" title="http://eclipse.org/equinox" rel="nofollow">Eclipse Equinox</a>
</li><li> <a href="http://live.eclipse.org/node/407" class="external text" title="http://live.eclipse.org/node/407" rel="nofollow">Webinar: Getting started with OSGi</a>
</li></ul>
<!--
NewPP limit report
Preprocessor node count: 67/1000000
Post-expand include size: 1915/2097152 bytes
Template argument size: 1385/2097152 bytes
#ifexist count: 0/100
-->
<!-- Saved in parser cache with key wikidb:pcache:idhash:15994-0!1!0!!en!2!edit=0 and timestamp 20120710082729 -->
<div class="printfooter">
Retrieved from "<a href="Documentation/HowTo/Howto_integrate_a_component_in_SMILA.html">http://wiki.eclipse.org/SMILA/Documentation/HowTo/Howto_integrate_a_component_in_SMILA</a>"</div>
<div id="catlinks"><p class='catlinks'><a href="http://wiki.eclipse.org/Special:Categories" title="Special:Categories">Category</a>: <span dir='ltr'><a href="http://wiki.eclipse.org/Category:SMILA" title="Category:SMILA">SMILA</a></span></p></div> <!-- end content -->
<div class="visualClear"></div>
</div>
</div>
</div>
<!-- Yoink of toolbox for phoenix moved up -->
</div>
</div>
<div id="clearFooter"/>
<div id="footer" >
<ul id="footernav">
<li class="first"><a href="http://www.eclipse.org/">Home</a></li>
<li><a href="http://www.eclipse.org/legal/privacy.php">Privacy Policy</a></li>
<li><a href="http://www.eclipse.org/legal/termsofuse.php">Terms of Use</a></li>
<li><a href="http://www.eclipse.org/legal/copyright.php">Copyright Agent</a></li>
<li><a href="http://www.eclipse.org/org/foundation/contact.php">Contact</a></li>
<li><a href="http://wiki.eclipse.org/Eclipsepedia:About" title="Eclipsepedia:About">About Eclipsepedia</a></li>
</ul>
<span id="copyright">Copyright &copy; 2012 The Eclipse Foundation. All Rights Reserved</span>
<p id="footercredit">This page was last modified 13:27, 24 January 2012 by <a href="http://wiki.eclipse.org/index.php?title=User:Juergen.schumacher.attensity.com&amp;action=edit" class="new" title="User:Juergen.schumacher.attensity.com">Juergen Schumacher</a>. Based on work by <a href="http://wiki.eclipse.org/User:Andreas.schank.attensity.com" title="User:Andreas.schank.attensity.com">A. Schank</a>, <a href="http://wiki.eclipse.org/User:Igor.novakovic.attensity.com" title="User:Igor.novakovic.attensity.com">Igor Novakovic</a> and <a href="http://wiki.eclipse.org/User:Drazen.cindric.attensity.com" title="User:Drazen.cindric.attensity.com">Drazen Cindric</a> and <a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/HowTo/Howto_integrate_a_component_in_SMILA&amp;action=credits" title="SMILA/Documentation/HowTo/Howto integrate a component in SMILA">others</a>.</p>
<p id="footerviews">This page has been accessed 5,472 times.</p>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-910670-4");
pageTracker._trackPageview();
</script>
<!-- <div class="visualClear"></div> -->
<script type="text/javascript">if (window.runOnloadHook) runOnloadHook();</script>
</div>
<!-- Served in 0.058 secs. --></body></html>