This section guides you through a tutorial of creating a BPMN process using the WSO2 Developer Studio and covers the following areas:
- Eclipse JavaEE luna with WSO2 Developer Studio ( 3.8.0 or later ) installed.
- Activiti Eclipse Designer plugin
- WSO2 Business Process Server 3.5.1 (As BPMN runtime.)
Creating the process and service task
- Install the Activiti Eclipse Designer plugin. For instructions on installation, see the Activiti user guide.
- Open Eclipse and go to File>New>Other and search for the Activiti project wizard to create a new Activiti project.
- Go to File>New>Other and search for the Activiti Diagram wizard to create a new Activiti diagram.
- Select the
<Activiti_Project>/src/main/resources/diagramsdirectory as the parent folder.
- Add a Start event, Service Task and End Event as seen below to create a basic process. Link each activity by hovering over the element, selecting the arrow sign and dragging it to the connecting element.
- Create a Java project for HelloWorld Service Task by navigating to File>New>Other and searching for the Java Project Wizard.
- Right-click on the project "HelloWorldServiceTask" and go to Build Path>Configure Build Path.
- Click on Add External JARs under the Libraries tab and add the
activiti-all_5.19.0.wso2v2.jarfile ( or later version ) found in the
- Go to File>New>Other and search for the Package wizard to create a Java package and name it "org.wso2.bpmn.helloworld.v1".
- Go to File>New>Class to create a Java Class for HelloWorld Service task implementation.
org.activiti.engine.delegate.JavaDelegateinterface to your class.
Implement HelloWorld Service Task following business logic in the
HelloWorldServiceTaskV1.javafile as seen below.
Configure HelloWorld Service Task Class name in properties.
Creating deployment artifacts
- Go to File>New>Other and search for the Java Library Project wizard to create a WSO2 Java Library project.
- Add the HelloWorldServiceTask Java project from the workspace and click Finish.
- Go to File>New>Composite Application Project to create a new Composite Application Project.
- Select HelloWorldServiceTask_Artifact as a dependency.
- Select Business Process Server as HelloWorldServiceTask_Artifact's server role.
- Right-click on the HelloWorldServiceTask_CAR project and select Export Composite Application Project. Select an export destination and click Finish.
- Right-click on the
HelloWorld.bpmnActiviti Diagram and select Export. Select Archive File under General to export the diagram as an archive file.
- Browse for an export location and rename the file extension as ".
bar". Select Create only selected directories and click Finish.
Deploying the process using WSO2 Business Process Server
- Log in the management console and navigate to Home>Manage>Carbon Applications>Add. Upload the
.CARfile to deploy it as seen below.
You will see the following logs in the terminal after successful deployment.
- In the management console, navigate to Home>Manage>Processes>Add>BPMN and upload the
HelloWorld.barfile to deploy it as seen below.
- Login to the BPMN-explorer using admin/admin credentials (default admin user credentials) and start the Hello World Process.
- In the terminal you will see the "Hello World ...!!!" string printed out.