Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[smila-user] Call workflow (descrbed in workflows.json) via socket interface (http://localhost/SMILA/customservlet)

Hallo,
I created my own servlet copying and modifying SMILASearchServlet.

I am able to call a BPEL pipeline (FetchGoogleImagesPipeline in my sample) but I need to call a workflow (CrowdGoogleImagesWorkflow) added in workflow.json.

Where can I found a sample of code to interact with job manager and say it to use my specific workflow?

Thanks

Following my json added lines in workflows.json e workers.json:

workflows.json
,
    {
      "name" : "CrowdGoogleImagesWorkflow",
      "startAction":
      {
        "worker" : "bulkbuilder",
        "output" :
        {
            "insertedRecords" : "bucket"
        }
      },
      "actions": [
        {
          "worker": "pipelineProcessor",
          "parameters":
          {
              "pipelineName": "FetchGoogleImagesPipeline"
          },
          "input":
          {
              "input": "bucket"
          },
          "output":
          {
              "output": "bucket"
          }
        },
        {
          "worker": "CrowdImagesWorker",
          "parameters":
          {
              "imageFolder": "C:\\temp\\logos",
              "db.srv": "myserver",
              "db.drv": "com.mysql.jdbc.Driver",
              "db.url": "jdbc:mysql://mysqerver:3306/CBRK_LOGO_DETECTION",
              "db.usr": "myusr",
              "db.pwd": "mypwd"
          },
          "input":
          {
              "inputRecords": "bucket"
          },
          "output":
          {
              "outputRecords": "bucket"
          }
        }
      ]
    }


workers.json
,
      {
        "name": "CrowdImagesWorker",
        "parameters":
            [
                {
                "name":"imageFolder",
                "optional":false,
                "description":"The folder where images are saved"
                },
                {
                "name":"db.srv",
                "optional":false,
                "description":"The DB server"
                },
                {
                "name":"db.drv",
                "optional":false,
                "description":"The driver to use"
                },
                {
                "name":"db.url",
                "optional":false,
                "description":"The url of DB"
                },
                {
                "name":"db.usr",
                "optional":false,
                "description":"The user used to access DB"
                },
                {
                "name":"db.pwd",
                "optional":false,
                "description":"The password of user used to access DB"
                }
            ],
        "input":
            [
                {
                "name": "inputRecords",
                "type": "recordBulks"
                }
            ],
        "output":
            [
                {
                "name": "outputRecords",
                "type": "recordBulks"
                }
            ]
        }


--

Lorenzo Eccher
lorenzo.eccher@xxxxxx

Research & Development Laboratory

Engineering Ingegneria informatica s.p.a

EngiWeb Security srl
Via Solteri, 38 - 38100 Trento
Tel. +39-0461.1822110
Fax. +39-0461.1822199
www.eng.it

  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.


Back to the top