blob: 39e1ccc7830b49b63518e5538002cdb3a199879e [file] [log] [blame]
<!DOCTYPE html>
<html lang="en" dir="ltr" class="client-nojs">
<head>
<meta charset="UTF-8" />
<title>SMILA/Documentation/HowTo/How to write a Pipelet - Eclipsepedia</title>
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<meta name="generator" content="MediaWiki 1.23.2" />
<link rel="shortcut icon" href="http://wiki.eclipse.org/eclipse.org-common/themes/solstice/public/images/favicon.ico" />
<link rel="search" type="application/opensearchdescription+xml" href="http://wiki.eclipse.org/opensearch_desc.php" title="Eclipsepedia (en)" />
<link rel="EditURI" type="application/rsd+xml" href="http://wiki.eclipse.org/api.php?action=rsd" />
<link rel="alternate" type="application/atom+xml" title="Eclipsepedia Atom feed" href="http://wiki.eclipse.org/index.php?title=Special:RecentChanges&amp;feed=atom" />
<link rel="canonical" href="../Documentation/HowTo/How_to_write_a_Pipelet.html" />
<link rel="stylesheet" href="http://wiki.eclipse.org/load.php?debug=false&amp;lang=en&amp;modules=mediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.ui.button&amp;only=styles&amp;skin=solstice&amp;*" />
<link rel="stylesheet" href="http://wiki.eclipse.org/skins/solstice/public/stylesheets/styles.min.css?303" media="screen, print" /><meta name="ResourceLoaderDynamicStyles" content="" />
<style>a:lang(ar),a:lang(kk-arab),a:lang(mzn),a:lang(ps),a:lang(ur){text-decoration:none}
/* cache key: my_wiki:resourceloader:filter:minify-css:7:14ece53a42aa314864e5fd8c57f0d98f */</style>
<script src="http://wiki.eclipse.org/load.php?debug=false&amp;lang=en&amp;modules=startup&amp;only=scripts&amp;skin=solstice&amp;*"></script>
<script>if(window.mw){
mw.config.set({"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"SMILA/Documentation/HowTo/How_to_write_a_Pipelet","wgTitle":"SMILA/Documentation/HowTo/How to write a Pipelet","wgCurRevisionId":375644,"wgRevisionId":375644,"wgArticleId":15195,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["SMILA"],"wgBreakFrames":false,"wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgMonthNamesShort":["","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"wgRelevantPageName":"SMILA/Documentation/HowTo/How_to_write_a_Pipelet","wgIsProbablyEditable":false,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgRedirectedFrom":"SMILA/Development_Guidelines/How_to_write_a_Pipelet","wgWikiEditorEnabledModules":{"toolbar":false,"dialogs":false,"hidesig":true,"preview":false,"previewDialog":false,"publish":false},"wgCategoryTreePageCategoryOptions":"{\"mode\":0,\"hideprefix\":20,\"showcount\":true,\"namespaces\":false}"});
}</script><script>if(window.mw){
mw.loader.implement("user.options",function($,jQuery){mw.user.options.set({"ccmeonemails":0,"cols":80,"date":"default","diffonly":0,"disablemail":0,"editfont":"default","editondblclick":0,"editsectiononrightclick":0,"enotifminoredits":0,"enotifrevealaddr":0,"enotifusertalkpages":1,"enotifwatchlistpages":1,"extendwatchlist":0,"fancysig":0,"forceeditsummary":0,"gender":"unknown","hideminor":0,"hidepatrolled":0,"imagesize":2,"math":1,"minordefault":0,"newpageshidepatrolled":0,"nickname":"","norollbackdiff":0,"numberheadings":0,"previewonfirst":0,"previewontop":1,"rcdays":7,"rclimit":50,"rows":25,"showhiddencats":0,"shownumberswatching":1,"showtoolbar":1,"skin":"solstice","stubthreshold":0,"thumbsize":2,"underline":2,"uselivepreview":0,"usenewrc":0,"watchcreations":1,"watchdefault":1,"watchdeletion":0,"watchlistdays":3,"watchlisthideanons":0,"watchlisthidebots":0,"watchlisthideliu":0,"watchlisthideminor":0,"watchlisthideown":0,"watchlisthidepatrolled":0,"watchmoves":0,"wllimit":250,
"useeditwarning":1,"prefershttps":1,"language":"en","variant-gan":"gan","variant-iu":"iu","variant-kk":"kk","variant-ku":"ku","variant-shi":"shi","variant-sr":"sr","variant-tg":"tg","variant-uz":"uz","variant-zh":"zh","searchNs0":true,"searchNs1":false,"searchNs2":false,"searchNs3":false,"searchNs4":false,"searchNs5":false,"searchNs6":false,"searchNs7":false,"searchNs8":false,"searchNs9":false,"searchNs10":false,"searchNs11":false,"searchNs12":false,"searchNs13":false,"searchNs14":false,"searchNs15":false,"variant":"en"});},{},{});mw.loader.implement("user.tokens",function($,jQuery){mw.user.tokens.set({"editToken":"+\\","patrolToken":false,"watchToken":false});},{},{});
/* cache key: my_wiki:resourceloader:filter:minify-js:7:70d74423d3fc1e1c18fa9a1ff645a84a */
}</script>
<script>if(window.mw){
mw.loader.load(["mediawiki.page.startup","mediawiki.legacy.wikibits","mediawiki.legacy.ajax"]);
}</script>
<style type="text/css">/*<![CDATA[*/
.source-java {line-height: normal;}
.source-java li, .source-java pre {
line-height: normal; border: 0px none white;
}
/**
* GeSHi Dynamically Generated Stylesheet
* --------------------------------------
* Dynamically generated stylesheet for java
* CSS class: source-java, CSS id:
* GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
* (http://qbnz.com/highlighter/ and http://geshi.org/)
* --------------------------------------
*/
.java.source-java .de1, .java.source-java .de2 {font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;}
.java.source-java {font-family:monospace;}
.java.source-java .imp {font-weight: bold; color: red;}
.java.source-java li, .java.source-java .li1 {font-weight: normal; vertical-align:top;}
.java.source-java .ln {width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;}
.java.source-java .li2 {font-weight: bold; vertical-align:top;}
.java.source-java .kw1 {color: #7F0055; font-weight: bold;}
.java.source-java .kw2 {color: #7F0055; font-weight: bold;}
.java.source-java .kw3 {color: #000000; font-weight: normal}
.java.source-java .kw4 {color: #7F0055; font-weight: bold;}
.java.source-java .co1 {color: #3F7F5F; font-style: italic;}
.java.source-java .co2 {color: #3F7F5F;}
.java.source-java .co3 {color: #3F7F5F; font-style: italic; font-weight: bold;}
.java.source-java .coMULTI {color: #3F5FBF; font-style: italic;}
.java.source-java .es0 {color: #000000;}
.java.source-java .br0 {color: #000000;}
.java.source-java .sy0 {color: #000000;}
.java.source-java .st0 {color: #2A00ff;}
.java.source-java .nu0 {color: #000000;}
.java.source-java .me1 {color: #000000;}
.java.source-java .me2 {color: #000000;}
.java.source-java .ln-xtra, .java.source-java li.ln-xtra, .java.source-java div.ln-xtra {background-color: #ffc;}
.java.source-java span.xtra { display:block; }
/*]]>*/
</style><style type="text/css">/*<![CDATA[*/
.source-xml {line-height: normal;}
.source-xml li, .source-xml pre {
line-height: normal; border: 0px none white;
}
/**
* GeSHi Dynamically Generated Stylesheet
* --------------------------------------
* Dynamically generated stylesheet for xml
* CSS class: source-xml, CSS id:
* GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
* (http://qbnz.com/highlighter/ and http://geshi.org/)
* --------------------------------------
*/
.xml.source-xml .de1, .xml.source-xml .de2 {font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;}
.xml.source-xml {font-family:monospace;}
.xml.source-xml .imp {font-weight: bold; color: red;}
.xml.source-xml li, .xml.source-xml .li1 {font-weight: normal; vertical-align:top;}
.xml.source-xml .ln {width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;}
.xml.source-xml .li2 {font-weight: bold; vertical-align:top;}
.xml.source-xml .es0 {color: #000099; font-weight: bold;}
.xml.source-xml .br0 {color: #66cc66;}
.xml.source-xml .sy0 {color: #66cc66;}
.xml.source-xml .st0 {color: #ff0000;}
.xml.source-xml .nu0 {color: #cc66cc;}
.xml.source-xml .sc-1 {color: #808080; font-style: italic;}
.xml.source-xml .sc0 {color: #00bbdd;}
.xml.source-xml .sc1 {color: #ddbb00;}
.xml.source-xml .sc2 {color: #339933;}
.xml.source-xml .sc3 {color: #009900;}
.xml.source-xml .re0 {color: #000066;}
.xml.source-xml .re1 {color: #000000; font-weight: bold;}
.xml.source-xml .re2 {color: #000000; font-weight: bold;}
.xml.source-xml .ln-xtra, .xml.source-xml li.ln-xtra, .xml.source-xml div.ln-xtra {background-color: #ffc;}
.xml.source-xml span.xtra { display:block; }
/*]]>*/
</style><meta name="viewport" content="width=device-width, initial-scale=1.0"></head>
<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-SMILA_Documentation_HowTo_How_to_write_a_Pipelet skin-solstice action-view" id="solstice">
<a class="sr-only" href="How_to_write_a_Pipelet.html#content">Skip to main content</a>
<div class="thin-header">
<header role="banner" class="hidden-print noprint">
<div class="container-fluid">
<div id="row-logo-search">
<div id="header-left">
<div class="row">
<div class="hidden-xs col-sm-6 logo-container">
<a href="https://www.eclipse.org/" ><img class="logo-eclipse-default" src="http://wiki.eclipse.org/skins/solstice/public/images/logo/eclipse-800x188.png" alt="Eclipsepedia"></a>
</div>
<div class="navbar col-sm-18 yamm" id="main-menu">
<div class="navbar-collapse collapse" id="navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a target="_self" href="https://eclipse.org/downloads/">Download</a></li>
<li><a target="_self" href="https://eclipse.org/users/">Getting Started </a></li>
<li><a target="_self" href="https://eclipse.org/membership/">Members</a></li>
<li><a target="_self" href="https://eclipse.org/projects/">Projects</a></li>
<li class="dropdown visible-xs"><a class="dropdown-toggle" data-toggle="dropdown" href="How_to_write_a_Pipelet.html#">Community <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="http://marketplace.eclipse.org">Marketplace</a></li><li><a href="http://events.eclipse.org">Events</a></li><li><a href="http://www.planeteclipse.org/">Planet Eclipse</a></li><li><a href="https://eclipse.org/community/eclipse_newsletter/">Newsletter</a></li><li><a href="https://www.youtube.com/user/EclipseFdn">Videos</a></li></ul></li><li class="dropdown visible-xs"><a class="dropdown-toggle" data-toggle="dropdown" href="How_to_write_a_Pipelet.html#">Participate <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://bugs.eclipse.org/bugs/">Report a Bug</a></li><li><a href="https://eclipse.org/forums/">Forums</a></li><li><a href="https://eclipse.org/mail/">Mailing Lists</a></li><li><a href="https://wiki.eclipse.org/">Wiki</a></li><li><a href="https://wiki.eclipse.org/IRC">IRC</a></li><li><a href="https://eclipse.org/contribute/">How to Contribute</a></li></ul></li><li class="dropdown visible-xs"><a class="dropdown-toggle" data-toggle="dropdown" href="How_to_write_a_Pipelet.html#">Working Groups <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="http://wiki.eclipse.org/Auto_IWG">Automotive</a></li><li><a href="http://iot.eclipse.org">Internet of Things</a></li><li><a href="http://locationtech.org">LocationTech</a></li><li><a href="http://lts.eclipse.org">Long-Term Support</a></li><li><a href="http://polarsys.org">PolarSys</a></li><li><a href="http://science.eclipse.org">Science</a></li><li><a href="http://openmdm.org">OpenMDM</a></li></ul></li><!-- More -->
<li class="dropdown hidden-xs"><a class="dropdown-toggle" data-toggle="dropdown">More<b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<!-- Content container to add padding -->
<div class="yamm-content">
<div class="row">
<ul class="col-sm-8 list-unstyled"><li><p><strong>Community</strong></p></li><li><a href="http://marketplace.eclipse.org">Marketplace</a></li><li><a href="http://events.eclipse.org">Events</a></li><li><a href="http://www.planeteclipse.org/">Planet Eclipse</a></li><li><a href="https://eclipse.org/community/eclipse_newsletter/">Newsletter</a></li><li><a href="https://www.youtube.com/user/EclipseFdn">Videos</a></li></ul><ul class="col-sm-8 list-unstyled"><li><p><strong>Participate</strong></p></li><li><a href="https://bugs.eclipse.org/bugs/">Report a Bug</a></li><li><a href="https://eclipse.org/forums/">Forums</a></li><li><a href="https://eclipse.org/mail/">Mailing Lists</a></li><li><a href="https://wiki.eclipse.org/">Wiki</a></li><li><a href="https://wiki.eclipse.org/IRC">IRC</a></li><li><a href="https://eclipse.org/contribute/">How to Contribute</a></li></ul><ul class="col-sm-8 list-unstyled"><li><p><strong>Working Groups</strong></p></li><li><a href="http://wiki.eclipse.org/Auto_IWG">Automotive</a></li><li><a href="http://iot.eclipse.org">Internet of Things</a></li><li><a href="http://locationtech.org">LocationTech</a></li><li><a href="http://lts.eclipse.org">Long-Term Support</a></li><li><a href="http://polarsys.org">PolarSys</a></li><li><a href="http://science.eclipse.org">Science</a></li><li><a href="http://openmdm.org">OpenMDM</a></li></ul> </div>
</div>
</li>
</ul>
</li>
</ul>
</div>
<div class="navbar-header">
<button data-target="#navbar-collapse-1" data-toggle="collapse" class="navbar-toggle" type="button">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="https://www.eclipse.org/" class="visible-xs navbar-brand"><img class="logo-eclipse-default" src="http://wiki.eclipse.org/skins/solstice/public/images/logo/eclipse-800x188.png" alt="Eclipsepedia" width="174"></a>
</div>
</div>
</div>
</div>
</div>
</div>
</header>
<section class="defaut-breadcrumbs hidden-print noprint hidden-print clearfix" id="breadcrumb">
<div>
<ol class="breadcrumb">
<li><a href="https://www.eclipse.org/">Home</a></li>
<li><a href="http://wiki.eclipse.org/Main_Page">Eclipse Wiki</a></li>
<li class="active">SMILA/Documentation/HowTo/How to write a Pipelet</li></ol>
</div>
</section>
</div>
<div class="toolbar-menu breadcrumbs-offset noprint hidden-print margin-bottom-0 clearfix">
<div class="col-md-24">
<ol class="breadcrumb" role="navigation">
<li id="pt-login">
<a href="http://wiki.eclipse.org/index.php?title=Special:UserLogin&amp;returnto=SMILA%2FDocumentation%2FHowTo%2FHow+to+write+a+Pipelet">
<i class="fa fa-sign-in fa-fw orange"></i> Log in </a>
</li>
</ul>
</div>
</div>
<main role="main" class="background-grey">
<div class="container-full padding-top-25">
<!-- content -->
<section id="content" class="mw-body container-full clearfix 0">
<div id="mw-js-message" style="display:none;"></div>
<!-- bodyContent -->
<div id="bodyContent">
<!-- jumpto -->
<div id="jump-to-nav" class="mw-jump">
Jump to: <a href="How_to_write_a_Pipelet.html#mw-head">navigation</a>,
<a href="How_to_write_a_Pipelet.html#p-search">search</a>
</div>
<!-- /jumpto -->
<!-- leftcol -->
<aside class="col-md-4 noprint hidden-print" id="leftcol">
<form class="input-group" role="form" id="form-eclipse-search" action="http://wiki.eclipse.org/index.php" id="searchform">
<input id="searchInput" class="search-query form-control" type="search" accesskey="f" title="Special:Search" placeholder="Search" name="search" value="">
<span class="input-group-btn">
<button value="search" id="mw-searchButton" type="submit" class="btn btn-default" title="Search the pages for this text" name="fulltext">
<i class="fa fa-search"></i>
</button>
</span>
</form>
<select class="form-control margin-top-10 margin-bottom-10 visible-xs visible-sm" onchange="this.options[this.selectedIndex].value && (window.location = this.options[this.selectedIndex].value);"><option class="fw-700 "><span class="fw-700">---Navigation---</span></option><option value="/Main_Page">Main Page</option><option value="/Eclipsepedia:Community_portal">Community portal</option><option value="/Eclipsepedia:Current_events">Current events</option><option value="/Special:RecentChanges">Recent changes</option><option value="/Special:Random">Random page</option><option value="https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents">Help</option></select><ul class="ul-left-nav fa-ul hidden-print leftnav hidden-xs hidden-sm"><li class="separator"><span class="separator">Navigation</span></li> <li class=""><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/Main_Page" id="n-mainpage" title="Visit the main page [z]" accesskey="z">Main Page</a></li> <li class=""><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/Eclipsepedia:Community_portal" id="n-portal" title="About the project, what you can do, where to find things">Community portal</a></li> <li class=""><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/Eclipsepedia:Current_events" id="n-currentevents" title="Find background information on current events">Current events</a></li> <li class=""><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/Special:RecentChanges" id="n-recentchanges" title="A list of recent changes in the wiki [r]" accesskey="r">Recent changes</a></li> <li class=""><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/Special:Random" id="n-randompage" title="Load a random page [x]" accesskey="x">Random page</a></li> <li class=""><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents" id="n-help" title="The place to find out">Help</a></li></ul> <select class="form-control margin-top-10 margin-bottom-10 visible-xs visible-sm" onchange="this.options[this.selectedIndex].value && (window.location = this.options[this.selectedIndex].value);"><option class="fw-700 "><span class="fw-700">---Toolbox---</span></option><option value="/index.php?title=SMILA/Documentation/HowTo/How_to_write_a_Pipelet&amp;action=info">Page information</option><option value="/index.php?title=SMILA/Documentation/HowTo/How_to_write_a_Pipelet&amp;oldid=375644">Permanent link</option><option value="/index.php?title=SMILA/Documentation/HowTo/How_to_write_a_Pipelet&amp;printable=yes">Printable version</option><option value="/Special:SpecialPages">Special pages</option><option value="/Special:RecentChangesLinked/SMILA/Documentation/HowTo/How_to_write_a_Pipelet">Related changes</option><option value="/Special:WhatLinksHere/SMILA/Documentation/HowTo/How_to_write_a_Pipelet">What links here</option></select><ul class="ul-left-nav fa-ul hidden-print leftnav hidden-xs hidden-sm"><li class="separator"><span class="separator">Toolbox</span></li><li><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/HowTo/How_to_write_a_Pipelet&amp;action=info" id="t-info">Page information</a></li><li><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/HowTo/How_to_write_a_Pipelet&amp;oldid=375644" id="t-permalink" title="Permanent link to this revision of the page">Permanent link</a></li><li><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/HowTo/How_to_write_a_Pipelet&amp;printable=yes" id="t-print" rel="alternate" title="Printable version of this page [p]" accesskey="p">Printable version</a></li><li><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/Special:SpecialPages" id="t-specialpages" title="A list of all special pages [q]" accesskey="q">Special pages</a></li><li><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/Special:RecentChangesLinked/SMILA/Documentation/HowTo/How_to_write_a_Pipelet" id="t-recentchangeslinked" title="Recent changes in pages linked from this page [k]" accesskey="k">Related changes</a></li><li><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/Special:WhatLinksHere/SMILA/Documentation/HowTo/How_to_write_a_Pipelet" id="t-whatlinkshere" title="A list of all wiki pages that link here [j]" accesskey="j">What links here</a></li></ul> </aside>
<!-- /leftcol -->
<!-- mainContent -->
<div id="mainContent" class="col-md-20">
<ul class="nav nav-tabs noprint hidden-print" role="tablist">
<li id="ca-nstab-main" class="selected"><a href="../Documentation/HowTo/How_to_write_a_Pipelet.html" title="View the content page [c]" accesskey="c" tabindex="-1">Page</a></li>
<li id="ca-talk" class="new"><a href="http://wiki.eclipse.org/index.php?title=Talk:SMILA/Documentation/HowTo/How_to_write_a_Pipelet&amp;action=edit&amp;redlink=1" title="Discussion about the content page [t]" accesskey="t" tabindex="-1">Discussion</a></li>
<li id="ca-viewsource"><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/HowTo/How_to_write_a_Pipelet&amp;action=edit" title="This page is protected.&#10;You can view its source [e]" accesskey="e" tabindex="-1">View source</a></li>
<li id="ca-history" class="collapsible"><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/HowTo/How_to_write_a_Pipelet&amp;action=history" title="Past revisions of this page [h]" accesskey="h" tabindex="-1">History</a></li>
</ul> <div class="tab-content background-white">
<div id="tab-pane-main-page-content" class="tab-pane active">
<h1 id="firstHeading" class="firstHeading page-header">
<span dir="auto">SMILA/Documentation/HowTo/How to write a Pipelet</span>
</h1>
<div id="main-page-content">
<!-- subtitle -->
<div id="contentSub" class="alert alert-small alert-warning"><span class="subpages">&lt; <a href="../../SMILA.html" title="SMILA">SMILA</a>&lrm; | <a href="../Documentation.1.html" title="SMILA/Documentation">Documentation</a>&lrm; | <a href="../Documentation/HowTo.html" title="SMILA/Documentation/HowTo">HowTo</a></span>(Redirected from <a href="http://wiki.eclipse.org/index.php?title=SMILA/Development_Guidelines/How_to_write_a_Pipelet&amp;redirect=no" title="SMILA/Development Guidelines/How to write a Pipelet">SMILA/Development Guidelines/How to write a Pipelet</a>)</div>
<!-- /subtitle -->
<div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr"><p>This page describes how to implement and configure your own <a href="../Glossary.html#P" title="SMILA/Glossary">pipelet</a> in case you wish to <a href="../Howto_integrate_a_component_in_SMILA.html" title="SMILA/Howto integrate a component in SMILA" class="mw-redirect">add functionality</a> to SMILA.
</p>
<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
<ul>
<li class="toclevel-1 tocsection-1"><a href="How_to_write_a_Pipelet.html#What_are_pipelets.3F"><span class="tocnumber">1</span> <span class="toctext">What are pipelets?</span></a></li>
<li class="toclevel-1 tocsection-2"><a href="How_to_write_a_Pipelet.html#Project_template"><span class="tocnumber">2</span> <span class="toctext">Project template</span></a></li>
<li class="toclevel-1 tocsection-3"><a href="How_to_write_a_Pipelet.html#Implementation"><span class="tocnumber">3</span> <span class="toctext">Implementation</span></a>
<ul>
<li class="toclevel-2 tocsection-4"><a href="How_to_write_a_Pipelet.html#Further_reading"><span class="tocnumber">3.1</span> <span class="toctext">Further reading</span></a></li>
</ul>
</li>
<li class="toclevel-1 tocsection-5"><a href="How_to_write_a_Pipelet.html#Configuration"><span class="tocnumber">4</span> <span class="toctext">Configuration</span></a></li>
<li class="toclevel-1 tocsection-6"><a href="How_to_write_a_Pipelet.html#Integration"><span class="tocnumber">5</span> <span class="toctext">Integration</span></a></li>
<li class="toclevel-1 tocsection-7"><a href="How_to_write_a_Pipelet.html#Examples"><span class="tocnumber">6</span> <span class="toctext">Examples</span></a>
<ul>
<li class="toclevel-2 tocsection-8"><a href="How_to_write_a_Pipelet.html#Pipelet_Usage"><span class="tocnumber">6.1</span> <span class="toctext">Pipelet Usage</span></a></li>
<li class="toclevel-2 tocsection-9"><a href="How_to_write_a_Pipelet.html#Piplet_configuration_usage"><span class="tocnumber">6.2</span> <span class="toctext">Piplet configuration usage</span></a></li>
</ul>
</li>
</ul>
</div>
<h2><span class="mw-headline" id="What_are_pipelets.3F">What are pipelets?</span></h2>
<p>Pipelets are not standalone services, but their lifecycle and configuration is managed by the workflow engine. Each occurrence of a pipelet in a workflow uses a different pipelet instance. For more information take a look at <a href="../Documentation/Pipelets.html" title="SMILA/Documentation/Pipelets">Pipelets</a>.
</p>
<h2><span class="mw-headline" id="Project_template">Project template</span></h2>
<p>Before writing your own pipelet we recommend you to take a look at the <a rel="nofollow" class="external text" href="https://git.eclipse.org/c/smila/org.eclipse.smila.core.git/tree/examples/org.eclipse.smila.integration.pipelet/code/src/org/eclipse/smila/integration/pipelet/HelloWorldPipelet.java">HelloWorldPipelet.java</a>. This pipelet is an example of a very simple processing pipelet and can be used as a template for your pipelets. You can also get it by importing the bundles from the <tt>examples</tt> directory of <a rel="nofollow" class="external text" href="https://git.eclipse.org/c/smila/org.eclipse.smila.core.git/">SMILA's repository</a> into your workspace and use them as templates:
</p>
<ul>
<li> <a rel="nofollow" class="external text" href="https://git.eclipse.org/c/smila/org.eclipse.smila.core.git/tree/examples/org.eclipse.smila.integration.pipelet">org.eclipse.smila.integration.pipelet</a>: template bundle for pipelet development
</li>
</ul>
<p>You can also download these examples from the <a rel="nofollow" class="external text" href="http://www.eclipse.org/smila/downloads.php">release downloads</a> or the <a rel="nofollow" class="external text" href="http://build.eclipse.org/rt/smila/nightly/">nightly build downloads</a>. (SMILA-...-integrator-examples.zip)
</p>
<h2><span class="mw-headline" id="Implementation">Implementation</span></h2>
<p>Follow these instructions to implement a new pipelet in SMILA:
</p>
<ul>
<li> If needed, create a new plugin project. You can add multiple pipelets to a single project. See <a rel="nofollow" class="external text" href="../Development_Guidelines.1.html#Creation_of_bundles">Development Guidelines: Bundle creation</a> for details.
</li>
</ul>
<ul>
<li> In the MANIFEST.MF, add at least these as "Imported Packages" (of course, you will need more to develop your pipelet, depending on what you want to do):
<ul>
<li> <tt>org.eclipse.smila.blackboard</tt>
</li>
<li> <tt>org.eclipse.smila.datamodel</tt>
</li>
<li> <tt>org.eclipse.smila.processing</tt>
</li>
<li> <tt>org.eclipse.smila.utils</tt>
</li>
<li> <tt>org.eclipse.smila.processing.parameters</tt> (to use <tt>ParameterAccessor</tt>)
</li>
<li> <tt>org.eclipse.smila.processing.util</tt> (to use <tt>ResultCollector</tt>)
</li>
</ul>
</li>
</ul>
<ul>
<li> Create a class that implements the interface <tt>org.eclipse.smila.processing.Pipelet</tt> and make sure that the class has a public no-argument constructor (or none at all).
</li>
</ul>
<ul>
<li> Implement <tt>void configure(AnyMap configuration)</tt>. This method is called prior to process. Here you can read the configuration provided for the pipelet in the <a href="../Glossary.html#P" title="SMILA/Glossary">pipeline</a>. To share those properties store the whole configuration in a member variable or better check the configuration for validity and completeness and then store the settings in a member variable. You can later access the configuration with the ParameterAccessor (see code sample below). The advantage of using the parameter accessor is that you can also override your configuration with configuration parameters set in the single records (e.g. the task parameters are included in the record by <tt>PipelineProcessorWorker</tt>, so you could override the pipelets configuration with job parameters as long as you use the <tt>ParameterAccessor</tt> to access parameters in the <tt>process</tt> method).
</li>
</ul>
<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/File:Idea.png" class="image"><img alt="Idea.png" src="http://wiki.eclipse.org/images/a/a4/Idea.png" width="35" height="35" /></a></div>
<div><b>Do not access OSGi Services in configure()</b>
You should not try to use OSGi services in the <tt>configure()</tt> method, because during startup of SMILA <tt>configure()</tt> is called immediately during initialization of the BPEL engine, and it is easily possible that the required service has not been activated at that time, and if <tt>configure()</tt> throws an exception because it cannot lookup the required service, the pipeline will not be deployed and cannot be executed. It's better to lookup the services later in the <tt>process()</tt> method, because all services should be available then.<b><br /></div></b>
</div>
<ul>
<li> Implement <tt>String[] process(Blackboard blackboard, String[] recordIds)</tt>. Here you have to place the "business logic" of your pipelet. In most cases the result is the same as the input recordIDs. But it is possible to return another list of IDs as result. Use the <tt>ResultCollector.addResult(...)</tt> to collect the ids you want to return and <tt>ResultCollector.addFailedResult(...)</tt> to control the error handling behaviour of your pipelet. When creating the ResultCollector you have to determine if the Collector should drop the ids that caused errors from the result id list it creates (using <tt>resultCollector.getResultIds()</tt>)or if these ids should still be part of the result id set. The ResultCollector will also control exception handling for you when setting failed record ids (depending on the existence and value of the parameter <tt>_failOnError</tt>, default is <tt>false</tt>). If <tt>_failOnError</tt> is set to true the ResultCollector will throw a ProcessingException, if not, the error will just be logged (on how to use the ResultCollector see the code sample below).
</li>
<li> Create a pipelet description json file for your pipelet in the <tt>SMILA-INF</tt> folder of the providing bundle. The file name is arbitrary but must have ".json" extension and the file content must contain at least the class name of the pipelet (<tt>{"class"&#160;: "your.class.name.here"}</tt>). Then they can be detected by the <tt>PipeletTracker</tt> service. If you would like to register multiple classes, use one separate description file for each class. Don't forget to add the <tt>SMILA-INF</tt> folder to the <tt>bin.includes</tt> entry of the bundle's <tt>build.properties</tt> file.
</li>
</ul>
<ul>
<li> Consider thread-safe-ness. Because pipelets may be accessed by multiple threads, make sure that access to member variables (e.g. the configuration) is read-only. For best practices: use local variables instead of member variables if possible.
</li>
</ul>
<h3><span class="mw-headline" id="Further_reading">Further reading</span></h3>
<p>For more information on the <tt>ResultCollector</tt> see <a rel="nofollow" class="external text" href="http://build.eclipse.org/rt/smila/javadoc/current/org/eclipse/smila/processing/util/ResultCollector.html">JavaDoc</a>.
</p>
<h2><span class="mw-headline" id="Configuration">Configuration</span></h2>
<p>If your pipelet requires a configuration:
</p>
<ul>
<li> Add a <tt>&lt;configuration&gt;</tt> element to the <tt>&lt;extensionActivity&gt;</tt> section of your pipelet in the BPEL pipeline.
</li>
</ul>
<h2><span class="mw-headline" id="Integration">Integration</span></h2>
<p><b>Running/Debugging in eclipse IDE</b>
</p><p>Before running SMILA in eclipse with your new pipelets, you have to activate your bundle containing the pipelets:
</p>
<ul>
<li> Click on <i>Run configurations...</i>
</li>
<li> Select the <i>OSGi Framework</i>--&gt;<i>SMILA</i> configuration
</li>
<li> In the <i>Bundles</i> page, check the box before <tt>org.eclipse.smila.integration.pipelet</tt>, leave Start Level and Auto-Start on <tt>default</tt>
</li>
<li> Click <i>Apply</i>
</li>
<li> After starting SMILA in eclipse, you should find your pipelets via REST API: <a rel="nofollow" class="external free" href="http://localhost:8080/smila/pipelets">http://localhost:8080/smila/pipelets</a>
</li>
</ul>
<p><b>Deploy to SMILA installation</b>
</p><p>It's easy to export your pipelet bundle to a SMILA installation:
</p>
<ul>
<li> Select your bundle (e.g. <tt>org.eclipse.smila.integration.pipelet</tt>)
</li>
<li> Right-click on it and click on Export...
</li>
<li> Select Plug-in Development --&gt; Deployable plug-ins and fragments
</li>
<li> Next
</li>
<li> Select a destination folder
</li>
<li> Click Finish
</li>
</ul>
<p>After that you will find the plugin jar in your destination directory in a <tt>plugins</tt> folder. Copy the plugin jar to your SMILA installation's <tt>plugins</tt> folder. After (re-)starting SMILA, you should find your pipelets via REST API: <a rel="nofollow" class="external free" href="http://localhost:8080/smila/pipelets">http://localhost:8080/smila/pipelets</a>
</p>
<h2><span class="mw-headline" id="Examples">Examples</span></h2>
<h3><span class="mw-headline" id="Pipelet_Usage">Pipelet Usage</span></h3>
<p>This is a template for <tt>MyPipelet.java</tt>:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="java source-java"><pre class="de1"><span class="kw1">package</span> <span class="co2">org.eclipse.smila.mypackage</span>
<span class="co2">
import</span> <span class="co2">org.eclipse.smila.blackboard.Blackboard</span><span class="sy0">;</span>
<span class="kw1">import</span> <span class="co2">org.eclipse.smila.processing.ProcessingException</span><span class="sy0">;</span>
<span class="kw1">import</span> <span class="co2">org.eclipse.smila.processing.Pipelet</span><span class="sy0">;</span>
<span class="kw1">import</span> <span class="co2">org.eclipse.smila.datamodel.AnyMap</span><span class="sy0">;</span>
&#160;
<span class="kw1">public</span> <span class="kw1">class</span> MyPipelet <span class="kw1">implements</span> Pipelet <span class="br0">&#123;</span>
&#160;
<span class="kw1">public</span> <span class="kw4">void</span> configure<span class="br0">&#40;</span>AnyMap configuration<span class="br0">&#41;</span> <span class="kw1">throws</span> ProcessingException <span class="br0">&#123;</span>
<span class="co1">// read the configuration properties</span>
<span class="br0">&#125;</span>
&#160;
<span class="kw1">public</span> <span class="kw3">String</span><span class="br0">&#91;</span><span class="br0">&#93;</span> process<span class="br0">&#40;</span>Blackboard blackboard, <span class="kw3">String</span><span class="br0">&#91;</span><span class="br0">&#93;</span> recordIds<span class="br0">&#41;</span> <span class="kw1">throws</span> ProcessingException <span class="br0">&#123;</span>
<span class="co1">// process the records and create a result</span>
<span class="br0">&#125;</span>
<span class="br0">&#125;</span></pre></div></div>
<p>And this is how to register the pipelet class in the bundle:
Create a folder <tt>SMILA-INF</tt> in the bundle and add a file <tt>MyPipelet.json</tt> to this folder:
</p>
<pre>
{
&quot;class&quot;: &quot;org.eclipse.smila.mypackage.MyPipelet&quot;,
&quot;parameters&quot;: [
&lt;put your parameter descriptions here&gt;
],
&quot;description&quot;: &quot;The textual description of my pipelet. This is optional but good style.&quot;
}
</pre>
<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/File:Note.png" class="image"><img alt="Note.png" src="http://wiki.eclipse.org/images/c/cc/Note.png" width="35" height="35" /></a></div>
<div>
The description as well as the parameters section is optional but gives users a hint on which parameters you pipelet uses and what they mean as well as what your pipelet does. The parameters section follows the same restrictions as the workers' parameter descriptions, see <a href="../Documentation/ParameterDefinition.html" title="SMILA/Documentation/ParameterDefinition">SMILA/Documentation/ParameterDefinition</a> for details.<b><br /></div></b>
</div>
<p><br />
Now add the folder <tt>SMILA-INF</tt> to the build.properties (or just check it in the <tt>Build</tt> view of the <tt>MANIFEST.MF</tt> file in your IDE.
</p><p>And finally, this is a sample showing how a pipelet is invoked in the BPEL pipeline using an <tt>&lt;extensionActivity&gt;</tt>. It also shows how the pipelet is configured using a <tt>&lt;configuration&gt;</tt> section.
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="xml source-xml"><pre class="de1">...
<span class="sc3"><span class="re1">&lt;extensionActivity<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;proc:invokePipelet</span> <span class="re0">name</span>=<span class="st0">&quot;invokeMyPipelet&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:pipelet</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.mypackage.MyPipelet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:variables</span> <span class="re0">input</span>=<span class="st0">&quot;request&quot;</span> <span class="re0">output</span>=<span class="st0">&quot;request&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;aStringParam&quot;</span><span class="re2">&gt;</span></span>some value<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;aDateParam&quot;</span> <span class="re0">type</span>=<span class="st0">&quot;datetime&quot;</span><span class="re2">&gt;</span></span>2008-06-11T16:08:00.000+0200<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:invokePipelet<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/extensionActivity<span class="re2">&gt;</span></span></span>
...</pre></div></div>
<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/File:Note.png" class="image"><img alt="Note.png" src="http://wiki.eclipse.org/images/c/cc/Note.png" width="35" height="35" /></a></div>
<div>
You can also configure Pipelines with SMILA's BPEL designer. See <a href="../BPEL_Designer.html" title="SMILA/BPEL Designer">BPEL Designer</a> for more information and how to install it.<b><br /></div></b>
</div>
<p><br />
</p>
<h3><span class="mw-headline" id="Piplet_configuration_usage">Piplet configuration usage</span></h3>
<p>The following example shows the usage of multiple values for properties:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="xml source-xml"><pre class="de1">...
<span class="sc3"><span class="re1">&lt;extensionActivity<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;proc:invokePipelet</span> <span class="re0">name</span>=<span class="st0">&quot;addValuesToNonExistingAttribute&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:pipelet</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.processing.pipelets.AddValuesPipelet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:variables</span> <span class="re0">input</span>=<span class="st0">&quot;request&quot;</span> <span class="re0">output</span>=<span class="st0">&quot;request&quot;</span><span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val</span> <span class="re0">key</span>=<span class="st0">&quot;outputAttribute&quot;</span><span class="re2">&gt;</span></span>out<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Seq</span> <span class="re0">key</span>=<span class="st0">&quot;valuesToAdd&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;rec:Val<span class="re2">&gt;</span></span></span>value1<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Val<span class="re2">&gt;</span></span></span>value2<span class="sc3"><span class="re1">&lt;/rec:Val<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/rec:Seq<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:invokePipelet<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/extensionActivity<span class="re2">&gt;</span></span></span>
...</pre></div></div>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="java source-java"><pre class="de1"><span class="kw1">public</span> <span class="kw1">class</span> AddValuesPipelet <span class="kw1">implements</span> Pipelet <span class="br0">&#123;</span>
&#160;
<span class="co3">/** config property name for attribute name to add values to. */</span>
<span class="kw1">private</span> <span class="kw1">static</span> <span class="kw1">final</span> <span class="kw3">String</span> PARAM_ATTRIBUTE <span class="sy0">=</span> <span class="st0">&quot;outputAttribute&quot;</span><span class="sy0">;</span>
&#160;
<span class="co3">/** config property name for the values to add. */</span>
<span class="kw1">private</span> <span class="kw1">static</span> <span class="kw1">final</span> <span class="kw3">String</span> PARAM_VALUES <span class="sy0">=</span> <span class="st0">&quot;valuesToAdd&quot;</span><span class="sy0">;</span>
&#160;
<span class="co3">/** the pipelet's configuration. */</span>
<span class="kw1">private</span> AnyMap _config<span class="sy0">;</span>
&#160;
<span class="co3">/** local logger. */</span>
<span class="kw1">private</span> <span class="kw1">final</span> Log _log <span class="sy0">=</span> LogFactory.<span class="me1">getLog</span><span class="br0">&#40;</span>getClass<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&#160;
<span class="co3">/** add Any values to an attribute as described in pipelet config or parameters. */</span>
@Override
<span class="kw1">public</span> <span class="kw3">String</span><span class="br0">&#91;</span><span class="br0">&#93;</span> process<span class="br0">&#40;</span><span class="kw1">final</span> Blackboard blackboard, <span class="kw1">final</span> <span class="kw3">String</span><span class="br0">&#91;</span><span class="br0">&#93;</span> recordIds<span class="br0">&#41;</span> <span class="kw1">throws</span> ProcessingException <span class="br0">&#123;</span>
<span class="kw1">final</span> ParameterAccessor paramAccessor <span class="sy0">=</span> <span class="kw1">new</span> ParameterAccessor<span class="br0">&#40;</span>blackboard, _config<span class="br0">&#41;</span><span class="sy0">;</span>
<span class="kw1">final</span> ResultCollector resultCollector <span class="sy0">=</span>
<span class="kw1">new</span> ResultCollector<span class="br0">&#40;</span>paramAccessor, _log, ProcessingConstants.<span class="me1">DROP_ON_ERROR_DEFAULT</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw1">final</span> <span class="kw3">String</span> id <span class="sy0">:</span> recordIds<span class="br0">&#41;</span> <span class="br0">&#123;</span>
paramAccessor.<span class="me1">setCurrentRecord</span><span class="br0">&#40;</span>id<span class="br0">&#41;</span><span class="sy0">;</span>
<span class="co1">// the attribute to which to add the values.</span>
<span class="kw1">final</span> <span class="kw3">String</span> outputAttribute <span class="sy0">=</span> paramAccessor.<span class="me1">getParameter</span><span class="br0">&#40;</span>PARAM_ATTRIBUTE, <span class="kw2">null</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="co1">// the values to add.</span>
<span class="kw1">final</span> <span class="kw3">Any</span> values <span class="sy0">=</span> paramAccessor.<span class="me1">getParameterAny</span><span class="br0">&#40;</span>PARAM_VALUES<span class="br0">&#41;</span><span class="sy0">;</span>
<span class="kw1">if</span> <span class="br0">&#40;</span>values <span class="sy0">!=</span> <span class="kw2">null</span> <span class="sy0">&amp;&amp;</span> outputAttribute <span class="sy0">!=</span> <span class="kw2">null</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
<span class="kw1">try</span> <span class="br0">&#123;</span>
<span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw1">final</span> <span class="kw3">Any</span> value <span class="sy0">:</span> values<span class="br0">&#41;</span> <span class="br0">&#123;</span>
blackboard.<span class="me1">getMetadata</span><span class="br0">&#40;</span>id<span class="br0">&#41;</span>.<span class="me1">add</span><span class="br0">&#40;</span>outputAttribute, value<span class="br0">&#41;</span><span class="sy0">;</span>
<span class="br0">&#125;</span>
resultCollector.<span class="me1">addResult</span><span class="br0">&#40;</span>id<span class="br0">&#41;</span><span class="sy0">;</span>
<span class="br0">&#125;</span> <span class="kw1">catch</span> <span class="br0">&#40;</span><span class="kw1">final</span> <span class="kw3">Exception</span> ex<span class="br0">&#41;</span> <span class="br0">&#123;</span>
resultCollector.<span class="me1">addFailedResult</span><span class="br0">&#40;</span>id, ex<span class="br0">&#41;</span><span class="sy0">;</span>
<span class="br0">&#125;</span>
<span class="br0">&#125;</span>
<span class="br0">&#125;</span>
<span class="kw1">return</span> resultCollector.<span class="me1">getResultIds</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="br0">&#125;</span>
&#160;
<span class="co3">/** {@inheritDoc} */</span>
@Override
<span class="kw1">public</span> <span class="kw4">void</span> configure<span class="br0">&#40;</span><span class="kw1">final</span> AnyMap configuration<span class="br0">&#41;</span> <span class="kw1">throws</span> ProcessingException <span class="br0">&#123;</span>
_config <span class="sy0">=</span> configuration<span class="sy0">;</span>
<span class="br0">&#125;</span>
<span class="br0">&#125;</span></pre></div></div>
<!--
NewPP limit report
CPU time usage: 0.248 seconds
Real time usage: 0.501 seconds
Preprocessor visited node count: 175/1000000
Preprocessor generated node count: 467/1000000
Post‐expand include size: 4920/2097152 bytes
Template argument size: 3324/2097152 bytes
Highest expansion depth: 5/40
Expensive parser function count: 0/100
-->
<!-- Saved in parser cache with key my_wiki:pcache:idhash:15195-0!*!0!!en!2!* and timestamp 20150413170917 and revision id 375644
-->
</div>
<!-- catlinks -->
<div id='catlinks' class='catlinks'><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="http://wiki.eclipse.org/Special:Categories" title="Special:Categories">Category</a>: <ul><li><a href="http://wiki.eclipse.org/Category:SMILA" title="Category:SMILA">SMILA</a></li></ul></div></div> <!-- /catlinks -->
</div>
</div>
</div>
</div>
<!-- /maincontent -->
<!-- printfooter -->
<div class="printfooter">
Retrieved from "<a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/HowTo/How_to_write_a_Pipelet&amp;oldid=375644">http://wiki.eclipse.org/index.php?title=SMILA/Documentation/HowTo/How_to_write_a_Pipelet&amp;oldid=375644</a>" </div>
<!-- /printfooter -->
<!-- debughtml -->
<!-- /debughtml -->
</div>
<!-- /bodyContent -->
</section>
<!-- /content -->
<!-- footer -->
</div> <section id="footer-contribution-info" style="border-top:1px solid #ccc;" class="footer-offset background-white margin-top-25"><div class="container text-center padding-top-10 padding-bottom-10"><p id="footercredit">This page was last modified 05:30, 19 December 2014 by <a href="http://wiki.eclipse.org/User:Juergen.schumacher.empolis.com" title="User:Juergen.schumacher.empolis.com">Juergen Schumacher</a>. Based on work by <a href="http://wiki.eclipse.org/User:Andreas.weber.empolis.com" title="User:Andreas.weber.empolis.com">Andreas Weber</a>, <a href="http://wiki.eclipse.org/index.php?title=User:Juergen.schumacher.attensity.com&amp;action=edit&amp;redlink=1" class="new" title="User:Juergen.schumacher.attensity.com (page does not exist)">Juergen Schumacher</a> and <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/index.php?title=SMILA/Documentation/HowTo/How_to_write_a_Pipelet&amp;action=credits" title="SMILA/Documentation/HowTo/How to write a Pipelet">others</a>.</p><p id="footerviews">This page has been accessed 10,802 times.</p></div></section> </main> <!-- /#main-content-container-row -->
<p id="back-to-top" class="noprint hidden-print">
<a class="visible-xs" href="How_to_write_a_Pipelet.html#top">Back to the top</a>
</p>
<footer role="contentinfo" class="noprint hidden-print">
<div class="container">
<div class="row">
<section id="footer-eclipse-foundation" class="col-xs-offset-1 col-xs-11 col-sm-7 col-md-6 col-md-offset-0">
<h2 class="section-title">Eclipse Foundation</h2>
<ul class="nav">
<li><a href="https://eclipse.org/org/">About us</a></li>
<li><a href="https://eclipse.org/org/foundation/contact.php">Contact Us</a></li>
<li><a href="https://eclipse.org/donate">Donate</a></li>
<li><a href="https://eclipse.org/org/documents/">Governance</a></li>
<li><a href="https://eclipse.org/artwork/">Logo and Artwork</a></li>
<li><a href="https://eclipse.org/org/foundation/directors.php">Board of Directors</a></li>
</ul>
</section>
<section id="footer-legal" class="col-xs-offset-1 col-xs-11 col-sm-7 col-md-6 col-md-offset-0">
<h2 class="section-title">Legal</h2>
<ul class="nav">
<li><a href="https://eclipse.org/legal/privacy.php">Privacy Policy</a></li>
<li><a href="https://eclipse.org/legal/termsofuse.php">Terms of Use</a></li>
<li><a href="https://eclipse.org/legal/copyright.php">Copyright Agent</a></li>
<li><a href="https://eclipse.org/org/documents/epl-v10.php">Eclipse Public License </a></li>
<li><a href="https://eclipse.org/legal/">Legal Resources </a></li>
</ul>
</section>
<section id="footer-useful-links" class="col-xs-offset-1 col-xs-11 col-sm-7 col-md-6 col-md-offset-0">
<h2 class="section-title">Useful Links</h2>
<ul class="nav">
<li><a href="https://bugs.eclipse.org/bugs/">Report a Bug</a></li>
<li><a href="http://help.eclipse.org/">Documentation</a></li>
<li><a href="https://eclipse.org/contribute/">How to Contribute</a></li>
<li><a href="https://eclipse.org/mail/">Mailing Lists</a></li>
<li><a href="https://eclipse.org/forums/">Forums</a></li>
<li><a href="http://marketplace.eclipse.org/">Marketplace</a></li>
</ul>
</section>
<section id="footer-other" class="col-xs-offset-1 col-xs-11 col-sm-7 col-md-6 col-md-offset-0">
<h2 class="section-title">Other</h2>
<ul class="nav">
<li><a href="https://eclipse.org/ide/">IDE and Tools</a></li>
<li><a href="https://eclipse.org/projects">Community of Projects</a></li>
<li><a href="https://eclipse.org/org/workinggroups/">Working Groups</a></li>
</ul>
<ul class="list-inline social-media">
<li><a href="https://twitter.com/EclipseFdn"><i class="fa fa-twitter-square"></i></a></li>
<li><a href="https://plus.google.com/+Eclipse"><i class="fa fa-google-plus-square"></i></a></li>
<li><a href="https://www.facebook.com/eclipse.org"><i class="fa fa-facebook-square"></i> </a></li>
<li><a href="https://www.youtube.com/user/EclipseFdn"><i class="fa fa-youtube-square"></i></a></li>
</ul>
</section>
<div id="copyright" class="col-xs-offset-1 col-sm-14 col-md-24 col-md-offset-0">
<div>
<span><img src="http://eclipse.org/eclipse.org-common/themes/solstice/public/images/logo/eclipse-logo-bw-800x188.png" alt="Eclipse.org black and white logo" width="166" height="39" id="logo-eclipse-white"/></span>
<p id="copyright-text">Copyright &copy; 2014 The Eclipse Foundation. All Rights Reserved.</p>
</div>
</div>
<a href="How_to_write_a_Pipelet.html#" class="scrollup">Back to the top</a>
</div>
</div>
</footer>
<script src="http://wiki.eclipse.org/skins/solstice/public/javascript/main.min.js"></script>
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-910670-2']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script> <!-- /footer -->
<script>/*<![CDATA[*/window.jQuery && jQuery.ready();/*]]>*/</script><script>if(window.mw){
mw.loader.state({"skins.solstice":"loading","site":"ready","user":"ready","user.groups":"ready"});
}</script>
<script src="http://wiki.eclipse.org/load.php?debug=false&amp;lang=en&amp;modules=skins.solstice&amp;only=scripts&amp;skin=solstice&amp;*"></script>
<script>if(window.mw){
mw.loader.load(["mediawiki.action.view.postEdit","mediawiki.user","mediawiki.hidpi","mediawiki.page.ready","mediawiki.searchSuggest"],null,true);
}</script>
<script>if(window.mw){
mw.config.set({"wgBackendResponseTime":437});
}</script> </body>
</html>