WSO2 BPS 3.5
Partner Foundations Workshop
BPMN Chapter
Edgar Silva @jedgarsilva
Foundation
o WSO2 BPS 3.5 - BPMN Capabilities
o Summary:
o Rely on Apache project: Activiti BPMN
o Historical background:
o Tom Bayens (former jBPM founder/leader)
o Supported as well for other organzations
o Activiti on Steroids
o Multitenant
o Clustering
o Rich REST API
o etc
Installation
o As easy as any WSO2 Product
o Download
o Unzip
o Run (BPS_UNZIPED_FOLDER/bin/wso2server.sh)
Deployed applications
o Carbon (Management Console)
o Human Task Explorer
o BPMN Explorer
Deployed applications
o Carbon (Management Console)
Deployed applications
o Human Task Explorer -https://127.0.0.1:9443/humantask-explorer
Deployed applications
o BPMN Explorer : https://127.0.0.1:9443/bpmn-explorer
Deployed applications
o BPMN Explorer : https://127.0.0.1:9443/bpmn-explorer
Deployed applications
o BPMN Explorer : https://127.0.0.1:9443/bpmn-explorer
Creating your first workflow process
Before your start
o You must have the latest
Activiti Plugin installed into
your eclipse:
o http://activiti.org/designer/update/
Take a look on what we will do ….
A customer want to open a bank account
Fulfil
data
(Form)
check initial deposit
> amount X
Notify customer
Process Explanation 

(When process is well designed, that is useless)
o A customer want to open an account into our thin bank
o According the initial process, that customer will be
managed by a different customer level (platinum or
standard).
o In the end the customer will discover who is your account
manager, that will be the responsible for the whole
relationship
o That last step/interaction will be made via e-mail
Create a new project
1. Create an Activiti Project
called thinbank-bpm
2. Follow the basic
instructions for creating
the project (source
destination, package etc)
3. Create an Activiti Diagram
called open-
account.bpmn
18
Configuring Process default metadata
o Please click on the
diagram and set
the properties
according the
image on this slide.
19
Start Node
o That is the first step in the process.
o From the Palette, just add that start
node
o Click on the start node and set the
following properties
20
Start Node
o Now Click on the Form tab and add the following properties accordingly:
21
Checkpoint 1 : What had you made so far…
o You configured which will be the initial variables
available for instantiate a new process instance.
o Those variables will be presented into a form, that
can be rendered in WSO2 BPS 3.5.x
Basics : Process Instance
o Class vs Object
o Definition vs Instance
23
Process Definition
Process Instances
name: Jorge Santana
name: Elvis Presley
name: Mano Brown
Creating Sequence Flows
o Between each step in the
process, you will need a
sequence-flow (arrow)
representing the flow.
o It might be added from the
components palette
o or:
24
Creating Sequence Flows
o In the next step we will create
an exclusive gateway node.
o So click on exclusive and drag
to your right in the canvas.
25
Creating Exclusive Gateway
o Please add the
following properties
26
Creating Exclusive Gateway
o Please add the
following properties
27
Creating Exclusive Gateway
o An exclusive gateway defines the possible
next steps, according some variable or event.
o It is similar to a Case or IF according to the
scenarios
o In our sample, we will have 2 possible ways:
o A Human Task for Default Account
or
o If the Initial Deposit Amount is larger
than <A value> it goes to Premium
Account
o In that case we will 2 possible next steps
according a variable
28
Creating the Default Account Human Task
o Please fill the following
properties:
o Name: Default Account
o Click on Main Config tab and
add the following value on
Candidate Group: “default-
managers"
o Click on Form Tab and add the
the properties according next
slide
Add the following Form Properties
o Note: Just take a look on properties that are writable or not (read only
props), that ones were informed by the “customer" in previous step.
Now: Creating the Premium Account Human Task
o Name: Premium Account
o Candidate Group: premium-managers
o Here the form: 

From Exclusive Gateway, how the process knows to where
navigate?
o One of the sequence-
flows will be the default
one.
o And the other will be
activated/executed when
and just when the
(condition) variable
initialDeposit is greater
than 10,000
From Exclusive Gateway, how the process knows to where
navigate?
o One of the sequence-flows
will be the default one.
o And the other will be
activated/executed when
and just when the
(condition) variable
initialDeposit is greater
than 10,000
From Exclusive Gateway, how the process knows to where
navigate?
o In that sequence flow that
lands on Premium Account
Human Task, you will add
in the Main config tab the
following condition: 

${initialDeposit>10000}
o So based on the value on
the initialDeposit process
instance variable, we will
go to Premium or Default
Account.
Email Task
o The step before
finish that process
sample is to send
and email to the
customer.
Email Task
o The step before finish that
process sample is to send
and email to the customer.
o Keep in mind that you have
to configure BPS for
sending e-mails: https://
docs.wso2.com/display/
BPS351/Working+with+the
+Email+Task
Finish : End Node
Deploying Process
Exporting Process to an Archive (zip)
o It will generate a zip
file.
o After that rename
the file for .bar
Deploying Process in BPS Console
Process Instance
BPMN REST api
Accessing the whole process context via REST
Testing via Postman
https://192.168.1.135:9443/bpmn/runtime/process-instances
https://<SEU	IP>:<PORTA>/bpmn/runtime/process-instances		

Accessing the whole process context via REST
Testing via Postman
https://192.168.1.135:9443/bpmn/runtime/process-instances
https://<SEU	IP>:<PORTA>/bpmn/runtime/process-instances		

For more info on this
o See that reference:
o https://docs.wso2.com/display/BPS351/BPMN
+REST+API
Comments, questions: @jedgarsilva
More information: www.wso2.com

Workshop WSO2 BPS 3.5.x - BPMN

  • 1.
    WSO2 BPS 3.5 PartnerFoundations Workshop BPMN Chapter Edgar Silva @jedgarsilva
  • 2.
    Foundation o WSO2 BPS3.5 - BPMN Capabilities o Summary: o Rely on Apache project: Activiti BPMN o Historical background: o Tom Bayens (former jBPM founder/leader) o Supported as well for other organzations o Activiti on Steroids o Multitenant o Clustering o Rich REST API o etc
  • 3.
    Installation o As easyas any WSO2 Product o Download o Unzip o Run (BPS_UNZIPED_FOLDER/bin/wso2server.sh)
  • 6.
    Deployed applications o Carbon(Management Console) o Human Task Explorer o BPMN Explorer
  • 7.
    Deployed applications o Carbon(Management Console)
  • 8.
    Deployed applications o HumanTask Explorer -https://127.0.0.1:9443/humantask-explorer
  • 9.
    Deployed applications o BPMNExplorer : https://127.0.0.1:9443/bpmn-explorer
  • 10.
    Deployed applications o BPMNExplorer : https://127.0.0.1:9443/bpmn-explorer
  • 11.
    Deployed applications o BPMNExplorer : https://127.0.0.1:9443/bpmn-explorer
  • 12.
    Creating your firstworkflow process
  • 13.
    Before your start oYou must have the latest Activiti Plugin installed into your eclipse: o http://activiti.org/designer/update/
  • 14.
    Take a lookon what we will do ….
  • 16.
    A customer wantto open a bank account Fulfil data (Form) check initial deposit > amount X Notify customer
  • 17.
    Process Explanation 
 (Whenprocess is well designed, that is useless) o A customer want to open an account into our thin bank o According the initial process, that customer will be managed by a different customer level (platinum or standard). o In the end the customer will discover who is your account manager, that will be the responsible for the whole relationship o That last step/interaction will be made via e-mail
  • 18.
    Create a newproject 1. Create an Activiti Project called thinbank-bpm 2. Follow the basic instructions for creating the project (source destination, package etc) 3. Create an Activiti Diagram called open- account.bpmn 18
  • 19.
    Configuring Process defaultmetadata o Please click on the diagram and set the properties according the image on this slide. 19
  • 20.
    Start Node o Thatis the first step in the process. o From the Palette, just add that start node o Click on the start node and set the following properties 20
  • 21.
    Start Node o NowClick on the Form tab and add the following properties accordingly: 21
  • 22.
    Checkpoint 1 :What had you made so far… o You configured which will be the initial variables available for instantiate a new process instance. o Those variables will be presented into a form, that can be rendered in WSO2 BPS 3.5.x
  • 23.
    Basics : ProcessInstance o Class vs Object o Definition vs Instance 23 Process Definition Process Instances name: Jorge Santana name: Elvis Presley name: Mano Brown
  • 24.
    Creating Sequence Flows oBetween each step in the process, you will need a sequence-flow (arrow) representing the flow. o It might be added from the components palette o or: 24
  • 25.
    Creating Sequence Flows oIn the next step we will create an exclusive gateway node. o So click on exclusive and drag to your right in the canvas. 25
  • 26.
    Creating Exclusive Gateway oPlease add the following properties 26
  • 27.
    Creating Exclusive Gateway oPlease add the following properties 27
  • 28.
    Creating Exclusive Gateway oAn exclusive gateway defines the possible next steps, according some variable or event. o It is similar to a Case or IF according to the scenarios o In our sample, we will have 2 possible ways: o A Human Task for Default Account or o If the Initial Deposit Amount is larger than <A value> it goes to Premium Account o In that case we will 2 possible next steps according a variable 28
  • 29.
    Creating the DefaultAccount Human Task o Please fill the following properties: o Name: Default Account o Click on Main Config tab and add the following value on Candidate Group: “default- managers" o Click on Form Tab and add the the properties according next slide
  • 30.
    Add the followingForm Properties o Note: Just take a look on properties that are writable or not (read only props), that ones were informed by the “customer" in previous step.
  • 31.
    Now: Creating thePremium Account Human Task o Name: Premium Account o Candidate Group: premium-managers o Here the form: 

  • 32.
    From Exclusive Gateway,how the process knows to where navigate? o One of the sequence- flows will be the default one. o And the other will be activated/executed when and just when the (condition) variable initialDeposit is greater than 10,000
  • 33.
    From Exclusive Gateway,how the process knows to where navigate? o One of the sequence-flows will be the default one. o And the other will be activated/executed when and just when the (condition) variable initialDeposit is greater than 10,000
  • 34.
    From Exclusive Gateway,how the process knows to where navigate? o In that sequence flow that lands on Premium Account Human Task, you will add in the Main config tab the following condition: 
 ${initialDeposit>10000} o So based on the value on the initialDeposit process instance variable, we will go to Premium or Default Account.
  • 35.
    Email Task o Thestep before finish that process sample is to send and email to the customer.
  • 36.
    Email Task o Thestep before finish that process sample is to send and email to the customer. o Keep in mind that you have to configure BPS for sending e-mails: https:// docs.wso2.com/display/ BPS351/Working+with+the +Email+Task
  • 37.
  • 38.
  • 39.
    Exporting Process toan Archive (zip) o It will generate a zip file. o After that rename the file for .bar
  • 40.
  • 46.
  • 47.
  • 48.
    Accessing the wholeprocess context via REST Testing via Postman https://192.168.1.135:9443/bpmn/runtime/process-instances https://<SEU IP>:<PORTA>/bpmn/runtime/process-instances 

  • 49.
    Accessing the wholeprocess context via REST Testing via Postman https://192.168.1.135:9443/bpmn/runtime/process-instances https://<SEU IP>:<PORTA>/bpmn/runtime/process-instances 

  • 51.
    For more infoon this o See that reference: o https://docs.wso2.com/display/BPS351/BPMN +REST+API
  • 52.
    Comments, questions: @jedgarsilva Moreinformation: www.wso2.com