Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page describes how to create artifacts for an Analytics project. It contains the following sections:

...

Info

The Anaytics plug-in currently works only for WSO2 Complex Event Processor artifacts such as event stream, event publisher, event receiver and execution-plan. In the future, the functionality will include WSO2 Data Analytics Server artifacts as well.

Creating an Analytics

...

project

You can create an Analytics project to save all your Analytics related atifacts such as execution-plans, streams, publishers and receivers.

...

  1. Open the Developer Studio Dashboard (click Developer Studio > Open Dashboard) and click Analytics Project in the Analytics category. 

  2. If you want to create this Analytics project using artifacts from the deployment server, select the New Analytics Project By Artifacts in Deployment Server (<CARBON_HOME>/repository/deployment/server/) option. Otherwise, leave the Create New Analytics Project option selected. Click Next.


     
  3. Do the following:
    1. Type a unique name for the project.

    2. Optionally specify the working set, if any, that you want to include in this project.

    3. Optionally specify the location where you want to save the project (or leave the default location specified).

    4. If you selected the New Analytics Project By Artifacts in Deployment Server option in the previous step, click Browse and navigate to the <PRODUCT_HOME>/repository/deployment/server folder containing the artifact file folders.

  4. A Maven POM file will be generated automatically for this project. If you want to include parent POM information in the file from another project in this workspace, click Next, click the Specify Parent from Workspace check box, and then select the parent project.
  5. Click Finish.
  6. If you specified a deployment server folder containing artifact file folders, specify whether you want to open those files now.

...

  1. Open the Developer Studio Dashboard (click Developer Studio > Open Dashboard) and click Stream in the Analytics category.
  2. Select Create New Stream and click Next.
  3. Type a unique name for the stream.
  4. Do one of the following:
    • To save the stream in an existing Analytics project in your workspace, click Browse
  5.   and
    •  and select that project.
    • To save the stream in a new Analytics project, click Create new Project and create the new project.
  6.  
  7. Click Click Finish. The stream is created in the stream folder under the Analytics project you specified, and the stream is open in the editor.

Importing a stream

Follow the steps below to import an existing stream from a .json file into an Analytics project. Alternatively, you can create a new stream.

...

WSO2 CEP uses execution-plans to store event processing logic. An execution-plan is bound to an instance of the Siddhi complex event processing runtime, which is responsible for the actual processing of the events. The event processor allows users to configure multiple execution-plans by providing multiple isolated event processing environments per execution-plan. A typical execution-plan consists of a set of queries and related input and output event streams. Definitions of the event streams are stored in .siddhiql files as deployable artifacts in the <PRODUCT _HOME>/repository/deployment/server/executionplans directory. For more information, see Creating a Standalone Execution Plan.

Creating a new execution-plan

...

  1. Open the Developer Studio Dashboard (click Developer Studio > Open Dashboard) and click Execution-plan in the Analytics category.
  2. Select Create New Execution-plan and click Next.
  3. Type a unique name for the execution-plan.
  4. Do one of the following:
    • To save the execution-plan in an existing Analytics project in your workspace, click Browse and select that project.
    • To save the execution-plan in a new Analytics project, click Create new Project and create the new project.
       
  5. Click Finish. The execution-plan is created in the execution-plan folder under the Analytics project you specified, and the execution-plan is open in the editor.

...

  1. Open the Developer Studio Dashboard (click Developer Studio > Open Dashboard) and click Publisher in the Analytics category.
  2. Select Create New Publisher and click Next.
  3. Type a unique name for the publisher.
  4. Do one of the following:
    • To save the publisher in an existing Analytics project in your workspace,
  5. click
    • click Browse
  6. and
    •  and select that project.
    • To save the publisher in a new Analytics project,
  7. click
    • click Create new Project
  8. and
    •  and create the new project.

  9.  
  10. Click Finish. The publisher is created in the publisher folder under the Analytics project you specified, and the publisher is open in the editor.

Importing a publisher 

Follow the steps below to import an existing publisher from a .xml file into an Analytics project. Alternatively, you can create a new publisher.

  1. Open the Developer Studio Dashboard (click Developer Studio > Open Dashboard) and click Publisher in the Analytics category.
  2. Select Import Publisher and click Next.
  3. Type a unique name for the publisher.
  4. Specify the publisher file by typing its full path name or clicking Browse and navigating to the file.
  5. In the Save Publisher In field, specify an existing Analytics project in your workspace where you want to save the publisher, or click Create new Project to create a new Analytics project and save the publisher there.
  6. Click Finish. The publisher is created in the publisher folder under the Analytics project you specified, and the publisher is open in the editor.

...

Follow the steps below to create a new receiver. Alternatively, you can import an existing receiver.

  1. Open the Developer Studio Dashboard (click Developer Studio > Open Dashboard) and click Receiver in the Analytics category.
  2. Select Create New Receiver and click Next.
  3. Type a unique name for the receiver.
  4. Do one of the following:
    • To save the receiver in an existing Analytics project in your workspace,
  5. click
    • click Browse
  6. and
    •  and select that project.
    • To save the receiver in a new Analytics project,
  7. click
    • click Create new Project
  8. and
    •  and create the new project.

  9.  
  10. Click Finish. The receiver is created in the receiver folder under the Analytics project you specified, and the receiver is open in the editor.

...

Follow the steps below to import an existing receiver from a .xml file into an Analytics project. Alternatively, you can create a new receiver.

  1. Open the Developer Studio Dashboard (click Developer Studio > Open Dashboard) and click Receiver in the Analytics category.
  2. Select Import Receiver and click Next.
  3. Type a unique name for the receiver.
  4. Specify the receiver file by typing its full path name or clicking Browse and navigating to the file.
  5. In the Save Receiver In field, specify an existing Analytics project in your workspace where you want to save the receiver, or click Create new Project to create a new Analytics project and save the receiver there.
  6. Click Finish. The receiver is created in the receiver folder under the Analytics project you specified, and the receiver is open in the editor.

...