Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [smila-user] Managing a pipeline in a servlet

Hi Lorenzo,

I don't understand why you would need a special servlet. Why not just use POST /smila/pipeline/<yourPipeline>/process and put everything you want to do in pipelets. You could even create a second pipeline that does the input creation in a pipelet, calls the actual pipeline that does the work and converts the result using another pipelet, if you need to seperate the actual processing from the conversion stuff. 

Another way would be to create a RequestHandler like the org.eclipse.smila.processing.httphandler.PipelineProcessHandler that does the input creation and result conversion and calls the WorkflowProcessor service in between.

Sorry, we don't use Servlets in our daily work at all, so I don't have any good suggestions about them available.

Regards,
JÃŒrgen.

Am 15.07.2014, 11:19 Uhr, schrieb Lorenzo Eccher <leccher@xxxxxx>:

Hi smilaers.

I need to use a servlet to send some input to a pipeline and then get back its output and give it back to the requester as json string.
More or less what searchservlet does.

The input of my pipeline depends on some data stored in object store.

The pipeline I need to start accepts as input from the rest interface something like

{
    "field1": "value1",
    "field2": {
        "field21": "value21",
        "field22": "value22",
        "field23": "value23",
        "field24":[
              "value24a",
              "value24b"
        ],
        "field25":"value25"
    }
}

And gives back something like
{
    "field1": "value1",
    "field2": {
        "field21": "value21",
        "field22": "value22",
        "field23": "value23",
        "field24":[
              "value24a",
              "value24b"
        ],
        "field25":"value25"
    },
    "field3":
    [
        "value31",
        "value32",
        "value33"
    ]
}

As I said, I'd like to start that pipeline from a servlet and retrieve the result converting it in json format as it was given back from REST interface.

Thanks for your help
Lorenzo

--

Lorenzo Eccher
lorenzo.eccher@xxxxxx
   (+39) 0461 312 306
Engineering Ingegneria informatica s.p.a
www.eng.it

ENGINEERING Society and Territory Trento Research Office
EIT-ITC Labs, Trento node

ESTRO Lab at FBK building
via Sommarive, 18
Povo - 38123 Trento

  Le informazioni trasmesse sono destinate esclusivamente alla persona o alla società in indirizzo e sono da intendersi confidenziali e riservate. Ogni trasmissione, inoltro, diffusione o altro uso di queste informazioni a persone o società differenti dal destinatario Ú proibita. Se ricevete questa comunicazione per errore, contattate il mittente e cancellate le informazioni da ogni computer.
  The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
  Die Informationen in dieser E-Mail-Mitteilung sind vertraulich und deren Verbreitung in jeglicher Art oder Form ist untersagt. Sollten Sie diese Nachricht irrtÃŒmlich erhalten haben, ersuchen wir Sie, sofort den Absender darÃŒber zu informieren und die Mail zu löschen.




--
Erstellt mit Operas revolutionÀrem E-Mail-Modul: http://www.opera.com/mail/

Back to the top