[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [smila-user] SMILA vs Human Computing

The problem is that the BPEL processor cannot find the pipelet class. There are a lot of reasons why this can happen,

please check http://wiki.eclipse.org/SMILA/Documentation/HowTo/How_to_write_a_Pipelet#Implementation

(especially the part about the pipelet description file in the “SMILA-INF” directory). Note that the pipelet class name

must be used strictly case-sensitive in the description file and the pipeline.

Finally make sure that your pipelet bundle is checked in the SMILA launch configuration so that it is available for SMILA.





From: smila-user-bounces@xxxxxxxxxxx [mailto:smila-user-bounces@xxxxxxxxxxx] On Behalf Of Ilio Catallo
Sent: Tuesday, February 28, 2012 11:35 AM
To: Smila project user mailing list
Subject: Re: [smila-user] SMILA vs Human Computing


Hi Juergen,


we're having some troubles in getting the pipeline work properly. In particular, while executing the "job 1", once the first pipelet is called we get the following error in SMILA.log:


org.eclipse.smila.processing.ProcessingException: Error processing BPEL workflow RetrieveLogoInstancesPipeline: Invocation of pipeline element RetrieveLogoInstancesPipeline/RetrieveLogoInstancesFromGooglePipelet@36 failed due to pipelet error: Pipelet of class it.polimi.RetrieveLogoInstance.RetrieveLogoInstancesFromGooglePipelet for activity RetrieveLogoInstancesPipeline/RetrieveLogoInstancesFromGooglePipelet@36 is not yet instantiated.


Our .bpel definition for the pipeline is the following:


<process name="RetrieveLogoInstancesPipeline" targetNamespace="http://www.eclipse.org/smila/processor"


  <import location="processor.wsdl" namespace="http://www.eclipse.org/smila/processor"

    importType="http://schemas.xmlsoap.org/wsdl/" />



    <partnerLink name="Pipeline" partnerLinkType="proc:ProcessorPartnerLinkType" myRole="service" />




    <extension namespace="http://www.eclipse.org/smila/processor" mustUnderstand="no" />




    <variable name="request" messageType="proc:ProcessorMessage" />



  <sequence name="RetrieveLogoInstancesPipeline">

    <receive name="start" partnerLink="Pipeline" portType="proc:ProcessorPortType"

      operation="process" variable="request" createInstance="yes" />



             <proc:invokePipelet name="RetrieveLogoInstancesFromGooglePipelet">

               <proc:pipelet class="it.polimi.RetrieveLogoInstance.RetrieveLogoInstancesFromGooglePipelet" />

               <proc:variables input="request" output="request" />

               <proc:configuration />




    <reply name="end" partnerLink="Pipeline" portType="proc:ProcessorPortType" operation="process"

      variable="request" />

    <exit />




deploy.xml should be fine:


  <process name="proc:RetrieveLogoInstancesPipeline">


    <provide partnerLink="Pipeline">

      <service name="proc:RetrieveLogoInstancesPipeline" port="ProcessorPort" />





We're wondering which is the problem that doesn't allow us to invoke the pipeline. 






Il giorno 28/feb/2012, alle ore 08:57, Jürgen Schumacher ha scritto:

From: smila-user-bounces@xxxxxxxxxxx [mailto:smila-user-bounces@xxxxxxxxxxx] On Behalf Of Ilio Catallo
Sent: Monday, February 27, 2012 5:35 PM
To: Smila project user mailing list
Subject: Re: [smila-user] SMILA vs Human Computing

Hi Juergen,

our workflows.json is completely equivalent to yours (the only difference is that the startAction is

associated to the bulkbuilder worker).  

Yes, of course. I left this out intentionally (;

Our proof-of-concept retrieveLogoInstancesPipelet.process()

implementation is the following:

[... snip ...]

The questions are: 

. We tried to link the output of the bulkbuilder to the input of the pipeline. This input is supposed to

contain the  name of the logos that you want to retrieve. Using the above instruction, can we assure to

find into the variable logoName the expected input value coming from the input records? 

If the attribute "logoName" of the records you push to the bulkbuilder contains a single string value
(like { ..., "logoName": "SMILA", ... }): yes, you will get this value with the code above.
If you have multiple values in there (like { ..., "logoName": ["Eclipse", "SMILA"]} ), you should do

 AnySeq logoNames = blackboard.getMetadata(id).getSeq("logoName");

and then you can iterate over logoNames to get the single values in there.

How is it possible to save the variable record in the object store associated to the output bucket?

It's usually not necessary to access the ObjectStore yourself. For each record ID returned by the pipeline
(i.e. by the final pipelet in the pipeline, usually), the PipelineProcessor writes these records from
the blackboard to the output bulk and you are done. So basically, your pipelet must return the IDs of the
records you want to write to the output bulk, and you must add your newly created records to the blackboard.
I would propose something like this:

List<String> logoRecordIds = new ArrayList<String>();
for (String id:recordIds) {
 String logoId = createSomeUniqueID(logoName);
 Record logoRecord = blackboard.getRecord(logoId, Get.NEW);
 logoRecord.getMetadata().put("URL", "URL_1");
return logoRecordIds.toArray();

And you should be done. However, if for each input record just one logo record is created, it's probably
easier to just modify the metadata of the input records and return the original record IDs.

smila-user mailing list