This is the latest release in the 6.x.x family. For EI 7.0.0, click here.

All docs This doc
Skip to end of metadata
Go to start of metadata

Let's take a simple scenario where a BPMN process reads some content (text message) that is stored in the product registry and passes the message to a target variable.

Before you begin,

  • Download the product installer from here, and run the installer.
    Let's call the installation location of your product the <EI_HOME> directory. This is located in a place specific to your OS as shown below:
    OSHome directory
    Mac OS/Library/WSO2/EnterpriseIntegrator/6.6.0
    WindowsC:\Program Files\WSO2\EnterpriseIntegrator\6.6.0\
  • Select the relevant WSO2 Integration Studio based on your operating system and download it from here.
    The path to this folder is referred to as <EI_TOOLING> throughout this tutorial.

    Getting an error message? See the troubleshooting tips given under Installing WSO2 Integration Studio.

Let's get started! This tutorial includes the following sections:

Creating the artifacts

Follow the steps below to create the requires artifacts.

Creating a registry resource

In this tutorial, the READ task will be configured to read content from a registry resource. See the instructions below to create a registry resource.

  1. Create a text file named TestBPMN.txt with the following text content: 'Sample content stored in the registry'
  2. Create a registry resource project:
    1. Open WSO2 Integration Studio and click Miscellaneous → Create New Registry Project  in the Getting Started view as shown below.
    2. In the dialog that opens, enter a name for the registry project.
    3. Click Finish and see that the project is now listed in the project explorer.
  3. Add the TestBPMN.txt file to the conf directory of the product registry:
    1. Right-click the registry resource project in the left navigation panel, click New, and then click Registry Resource. This will open the New Registry Resource window.  
    2. Select the Import from file system option as shown below and click Next.
    3. Click Browse file and select the TestBPMN.txt file that you created.
    4. In the Registry field, select conf as the registry directory. 
    5. In the Registry path to deploy field, set repository/ as the path.
    6. In the Save Resource in field, select the existing registry resource project.
    7. Click Finish.

Creating the BPMN artifacts

  1. Create a new BPMN project named ReadTaskBPMN. For instructions, see Creating a BPMN Project.
  2. Create a BPMN diagram named ReadTask.bpmn. For instructions, see Creating the BPMN Diagram.
  3. Click anywhere on the canvas, go to the Properties tab, and fill in the following details:

    NameRead Task Process
  4. To implement the process, drag and drop a Start Event element, a Read Task element, a User Task element, and an End Event element to the canvas. 

    You view the Create connection option when you hover the mouse pointer on an artifact. Click the arrow, drag it on the artifact to which you want to connect.

Configuring the Read task

Now, let's configure the READ task to read the content from the registry resource (TestBPMN resource) and write it to a specific target.

Select the READ task in the diagram, go to the Properties/Main Config tab, and enter the following configurations:


The descriptions of the properties are as follows:

ResourceThe name of the resource. If the resource is a registry resource, this should be resource path.

The origin or source of the resource. Supported sources:

  • REGISTRY: Fetch a value from the registry.
  • ENVIRONMENT: Fetch a value from an environment variable.
  • SYSTEM: Fetch a value from a system variable.
TargetThe target variable name that should be populated with the content that is read by the task.

The type of variable. The content read by this task will be parsed/converted to a given type. The supported types: string, integer, boolean, json, xml.

Configuring the User Task

Select the User task and apply property values:

  1. Go to the Properties/Main config tab and enter admin in the Assignee field.
  2. Go to the Properties/Form tab and enter the following configurations:


Deploying the artifacts

Follow the steps below to deploy the registry artifacts.

  1. Create a composite applicaition project (C-App project) to package the registry resource:
    1. Open the Getting Started  view and click  Miscellaneous → Create New Composite Application .

    2. In the  New Composite Application Project  dialog that opens, select the registry project and click Finish.
    1. In the Composite Application Project POM Editor that opens, under Dependencies, set the server role of the registry resource to Business Process Server as shown below.
  2. Export a CAR file of with the registry artifacts:
    1. Be sure the the registry resource is selected as a dependency in th C-App project.
    2. Right-click the C-App project and select Export Composite Application Project from the pop-up menu. Alternatively, open the pom.xml file in the Composite Application Project POM Editor and click the button for creating an archive in the upper-right corner.
    3. Specify a location to save the CAR file.
      You have now exported the registry resource into a single CAR file.
  3. Deploy the CAR file in the Business Process server of WSO2 EI:
    1. Start the Business Process profile.
    2. Open the management console of the Business Process profile.
    3. Go to Main → Carbon Applications → Add and select the CAR file.

Follow the steps below to deploy BPMN artifacts.

  1. See the instructions on creating the deployable archive for the BPMN artifacts.
  2. See the instructions on deploying BPMN artifacts.

Testing the output

Follow the steps below to test the output.

  1. Log into the BPMN-explorer at https://localhost:9445/bpmn-explorer using admin for both the username and password.
  2. Click PROCESSES in the top menu, and click the Start option of the Read Task process.

  3. Go to MONITORING → ADVANCED FILTERING. Then select the ReadTask process as the Process Definition ID and click Search to find the running process instance.

  4. Select your process instance to see details. Click the Variables tab and see that the content that you stored in the registry ('Sample content stored in the registry') has been written by the user task.
  • No labels