This documentation is for WSO2 Enterprise Integrator version 6.4.0 . View documentation for the latest release in the 6.x.x family and the latest release in the 7.x.x family.
Configuring the Start Event to Submit Data - WSO2 Enterprise Integrator 6.4.0 - WSO2 Documentation

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

The following scenario simulates the first step of a business process, in which an employee fills a form and submits the leave request to the manager. You can implement this by configuring a Start Event in the BPMN Diagram.

Before you begin,

  • Install Oracle Java SE Development Kit (JDK) version 1.8.* and set the JAVA_HOME environment variable.
  • 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.4.0
    WindowsC:\Program Files\WSO2\EnterpriseIntegrator\6.4.0\
    Ubuntu/usr/lib/wso2/EnterpriseIntegrator/6.4.0
    CentOS/usr/lib64/EnterpriseIntegrator/6.4.0
  • Select and download the relevant Enterprise Integrator tooling ZIP file depending on your operating system from here, and then extract the ZIP file. The path to this folder will be referred to as <EI_TOOLING> throughout this tutorial.

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

Creating a BPMN Project

You will find a BPMN editor packaged along with the WSO2 EI tooling. This BPMN editor can be used to create a BPMN artifact easily.

Prerequisite

 To create a BPMN artifact you should have Eclipse setup with the WSO2 EI tooling pack. For more information, see Installing Enterprise Integrator Tooling.

  1. Start Eclipse and navigate to File → New → Other
  2. Search or scroll and find the BPMN category under the WSO2 folder, click BPMN Project, and click Next.
  3. Enter a project name (e.g., LeaveProcessBPMNand click Next.

  4. In the next window that appears, select any referenced projects and click Finish. You will now have a new BPMN project.

  5. Click Open Perspective on the below message, which pops up.

    You will not get this message if you are already in the Activiti perspective. You can view the current perspective from the below tab.


Creating the BPMN Diagram

After creating the BPMN project, follow the steps below to add a BPMN diagram to it. 

  1. Right-click on your BPMN project found on the left pane of your Eclipse window and select New → Other
  2. Search or scroll and find the BPMN category under the WSO2 folder, click BPMN Diagram, and click Next.

  3. Enter a file name (e.g., LeaveProcess.bpmn) and select the BPMNProject/src/main/resources/diagrams directory as the parent folder and click Next.

  4. Select a template diagram or create a new empty diagram and click Finish


    In the Project Explorer view, you view the BPMN diagram added under the project you specified and a new empty canvas will open up along with a PaletteYou can use the palette to drag and drop artifact symbols to create the desired diagram. 

  5. Click anywhere on the canvas, and click Process in the Properties tab, to change the ID, name and namespace of the process, which will be created once you deploy the BPMN Project.


  6. Press Ctrl+S to save both the BPMN Diagram and the BPMN Project you created.

Configuring the Start Event

  1. To implement the leave approval process, drag a Start Event  to the design canvas.  

    Every BPMN process should start with a Start Event and end with an End Event.

  2. To implement the scenario, in which the employee submits a leave application form, click Form in the Properties tab of the Start Event.
  3. To create the application form, click New and add a new entry for each of the following fields. 

    idNameTypeDate PatternReadableWritableRequired
    numberOfDaysNumber of dayslong-truetruetrue
    startDateFirst day of holiday (dd-MM-yyyy)stringdd-MM-yyyy hh:mmtruetruetrue
    vacationReasonReasonstring-truetruetrue
    employeeNameName of employeestring-truetruetrue

  4. To add an admin user as the initiator of the process, enter admin as the value of the Initiator field in the Main Config section of the Properties tab. 

  5. Add an End Event to the diagram and connect the Start Event to it.

Creating the deployable archive

  1. Press Ctrl+S to save all the artifacts, which you created in WSO2 EI Tooling.
  2. Right click on the name of the project in the Package Explorer window, and click Create deployment artifacts.

    If you do not have the Package Explorer view, click Window → Show View → Other, select Package Explorer and open it.

    This creates the BAR file under the deployment folder of the project. This archive file contains of all the artifacts of your BPMN project for you to deploy it in the Business Process profile of WSO2 EI.


Deploying BPMN artifacts

After you create the deployable archive, follow the steps below to deploy them.

  1. Start the Business Process profile of WSO2 EI.

    Open a terminal and execute the following command:

    wso2ei-6.4.0-business-process

    Go to Start Menu -> Programs -> WSO2 -> Enterprise Integrator 6.4.0 Business Process. This will open a terminal and start the business process profile.

  2. In a web browser, open the Management Console of the Business Process profile, and log in with the default credentials (username: admin and password: admin).

  3. Click Main → Manage → Processes → Add → BPMN, browse the BAR file of the BPMN Project and click Upload.

    If you are unable to locate the BAR file, right click on the name of the BAR file in the Package Explorer window and click Properties to find it as shown below.

    If you upload a package with an existing name, the processes in the package gets versioned. This retires all the old processes in the package and deploys the new version. Since only package-level versioning is available, the new package will include all the processes defined in the old package, even though you may only need to update a single process in that package. 

  4. Once you uploaded the artifacts successfully you will view the new processes added to the list as shown below. 

    If you do not view the new processes, refresh the browser or click MainManageProcessesListBPMN.

     Undeploying a BPMN Project

    If you want to undeploy a BPMN Project, there are two ways of doing it as follows.

    1. From the Management Console of the Business Process profile:
      1. Log in to Management Console, click Main → Manage → Processes →  List →  BPMN.
      2. Click the Package Name you want to undeploy.
      3. The Package Dashboard page appears. Click on the Undeploy link.
    2. By deleting the BPMN ZIP file from the file system. 
      1. Delete the BPMN package from <EI_HOME>/wso2/business-process/repository/deployment/server/bpmn directory.
     Suspending process instances

    In the Management Console, click Main → Manage → Instances →  BPMN to suspend a process instance that is created by a deployed process.

Testing the output

Follow the steps below to test the output.

  1. Log in to 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 Leave Approval Process.
  3. Initiate the process by filling the form and click Start.


    You view the following message.

  • No labels