Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
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/" />

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

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

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

  <sequence name="RetrieveLogoInstancesPipeline">
    <receive name="start" partnerLink="Pipeline" portType="proc:ProcessorPortType"
      operation="process" variable="request" createInstance="yes" />

    <extensionActivity>
      <proc:invokePipelet name="RetrieveLogoInstancesFromGooglePipelet">
        <proc:pipelet class="it.polimi.RetrieveLogoInstance.RetrieveLogoInstancesFromGooglePipelet" />
        <proc:variables input="request" output="request" />
        <proc:configuration />
      </proc:invokePipelet>
    </extensionActivity>

     

    <reply name="end" partnerLink="Pipeline" portType="proc:ProcessorPortType" operation="process"
      variable="request" />
    <exit />
  </sequence>
</process>

deploy.xml should be fine:

  <process name="proc:RetrieveLogoInstancesPipeline">
    <in-memory>true</in-memory>
    <provide partnerLink="Pipeline">
      <service name="proc:RetrieveLogoInstancesPipeline" port="ProcessorPort" />
    </provide>    
  </process>  
</deploy>

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

Thanks,
Cheers,
Ilio.

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");
 logoRecordIds.add(logoId);
}
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.

Cheers,
Jürgen.
_______________________________________________
smila-user mailing list
smila-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/smila-user


Back to the top