You are on page 1of 41

Cognizant Technology Solutions

BPM Implementation Guide


webMethods 8.2 SP1
Monish Venu

12
Table of Contents
Objective & Scope ............................................................................... 3
Getting Started with BPM ................................................................... 3
Designer Configuration ....................................................................................................................... 3
Preferences ..................................................................................................................................... 3
Process Project ................................................................................................................................ 5
MWS Configuration............................................................................................................................. 6
Settings............................................................................................................................................ 6
IS Configuration................................................................................................................................... 6
Settings............................................................................................................................................ 6

BPM Samples ...................................................................................... 7


Event – Start Message......................................................................................................................... 7
Exercise 1: Start BPM ...................................................................................................................... 7
Activity – Service Task ....................................................................................................................... 10
Exercise 2A: Activity Step .............................................................................................................. 10
Exercise 2B: Activity Step With Retry............................................................................................ 12
Exercise 2C: Activity Step With Exceed Iteration .......................................................................... 13
Exercise 2D: Activity Step With Join.............................................................................................. 14
Activity – Recieve Task ...................................................................................................................... 16
Activity – Send Task .......................................................................................................................... 19
Activity – Sub Process ....................................................................................................................... 22
Activity – Call Activity ........................................................................................................................ 24
Exercise 1: Reference Process Type .............................................................................................. 24
Exercise 2: Reference Process Type – Escalate Failure ................................................................. 26
Exercise 3: Dynamic Reference Process ........................................................................................ 27
Exercise 4: BPMN Callable Type .................................................................................................... 28
Gateway – Types ............................................................................................................................... 30
Exercise 1: Exclusive (Unsyncronised OR Join) Gateway .............................................................. 30
Exercise 2: Inclusive (syncronised OR Join) Gateway.................................................................... 30
Exercise 3: Parallel Gateway (AND Join) ....................................................................................... 31
Exercise 4: Complex Gateway ....................................................................................................... 32
Intermediate Events.......................................................................................................................... 34
Exercise 1: Message Event ............................................................................................................ 34
Exercise 2: Boundary Error............................................................................................................ 36
Exercise 3: Boundary Timer .......................................................................................................... 37
Useful Tips & Tricks ........................................................................................................................... 38
Parallel Processing ........................................................................................................................ 38
Wait & Retry.................................................................................................................................. 39
References ........................................................................................................................................ 40
Objective & Scope
This document is a collection of POCs performed for webMethods BPM 8.2 SP1. This document can
be used as a reference guide for implementing various types of business steps such as activities,
events, gateways etc. Also, captures the advantages and limitations observed during the course of
implementation of different types of BPM steps.

The audience are expected to have knowledge of the previous versions of webMethods BPM and
also components such as integration servers, brokers etc. This document specifically covers only the
BPM implementations done using wM 8.2 SP1 versions.

Please refer to the below product documentations for detailed explanation for each of the step
types explained in the document.

 8-2-SP1_BPM_Process_Development_Help.pdf
 8-2-SP1_Administering_Process_Engine.pdf

Getting Started with BPM


Designer Configuration
Preferences
 In Designer go to Windows-> Preferences-> Software AG-> Process Development ->
Appearances for changing the default settings.
 Click on Software AG -> Integration Servers to configure one ore more IS you want to deploy
the process model and develop the services.

 Verify the process audit database connectivity from Designer. Go to Software AG -> Process
Development -> Process Audit Database -> Select IS and click on Test Connection
Process Project
 Go To File->New->Process Project

 Enter project name and click on Finish

 To create a process model click on File->New->process. Select project and click finish

.
MWS Configuration
Settings
 Login to MWS. Go to Applications->Administration->My webMethods-> System Settings-
>Servers . Add required IS details and click on check server status to verify connection.

IS Configuration
Settings
 Login to IS administrator . Go to Settings-> Extended and set the below property to point the
IS to MWS.

watt.server.auth.samlResolver=http://<MWS HOST>:<MWS PORT>/services/SAML

 Go to WmMonitor home page and configure the MWS details


BPM Samples

Please make sure you are using the Process Developer perspective and have enabled process
developer privilege for the design canvas. If you are in Business Analyst role you might not see many
options for the step properties.

Event – Start Message


Exercise 1: Start BPM
Requirements

1. Design a BPM process instance from a publishable broker document.


2. Establish a custom correlation id from the published document to the run time process
instance.
3. Log output to view from Monitor
4. Build and Upload the process model to IS. Verify model deployment from MWS & PRT.

Solution

 Create a publishable document for eg: POCanonical given below

 Drag and drop the canonical to the process design canvas in designer and add additional
steps if any.
 Click on the Start Message step ‘StartPOCanonical’ and right click to go to properties. Click
on LoggedFields and select the required fields from the canonical to be logged into process
audit db.

 Click on the properties Correlation to set the correlation service or field from the canonical
you want the PRT to recognize as correlation id. (Note – Correlation Id is required only if a
document is required to join a running process instance.)
 Build and deploy the process model to IS and verify the model is enabled from MWS( Go to
Administration -> Business process and verify model is enabled) & IS from WmPRT home.

MWS

wMPRT

 Publish the canonical and verify from MWS for the logged fields.
Activity – Service Task
Exercise 2A: Activity Step
Requirements

1. Create a simple process using the IS flow services.


2. Demonstrate use of internal and external pools.
3. Log input and output of the activity step to view from Monitor.
4. Enable activity step for manual resubmission from monitor.
5. Handle process wide Error.

Solution

 Create the process model from designer. (Note – you can create only 1 internal pool for a
process) Here the pool named as “webMethods” is the internal pool.

 Go to properties view for the activity steps and go to implementation tab and click on
Browse and select the services from IS. (You can also drag and drop the service from Package
Navigator to the canvas)
 Go to the properties view of the activity step and click on logged fields and select the
required fields.

 To add a process wide error handler, drag and drop a service task in the canvas and go the
process properties and select the required activity step as process wide error handler.
Exercise 2B: Activity Step With Retry
Requirements

1. Create a simple process diagram using the IS flow services developed.


2. Enable BPM steps retry for transient errors.
3. Handle process wide Timeout

Solution

 Refer to the BPM diagram in Exercise 2A. To set retry for the activity step “processPO” go to
the implementation properties and add retry count and interval.

 Implement the flow service in such a way that on transient errors you throw the exception
back to IS for retry. This will be automatically handled by PRT once you throw exception for
retry from the flow service.

 To implement a process wide timeout handler step, use an activity service step and set the
TimeOut property for the process in a similar manner as for the error handler step.
Exercise 2C: Activity Step With Exceed Iteration
Requirements

1. Create a simple process diagram using the IS flow services developed


2. Enable BPM steps retry for transient errors. Have a separate transition if step retry exceeds

Solution

 Refer to the BPM diagram in Exercise 2A. To have a transition for exceed iteration for the
activity step “processPO” draw a transition from the source step to the required
activity/event in the model.

 Go to the properties of “processPO” activity step or the properties of the transition line from
“processPO” to “processMaxIteration” and select the Transition Type as “Step Iterations
Exceeded”
 Set the retry count > 2 as per the previous exercise for “processPO” step and you will be able
to see at run time the PRT moves to the exceeds iteration step during scenarios where
“processPO” executes more than two times.

Exercise 2D: Activity Step With Join


Requirements

1. Create a simple process diagram using the IS flow services developed


2. Demonstrate split & join on activity step.

Solution

 The below process model takes different route based on the runtime message input and
joins on a common step “sendPO”
 To establish split from a source step(identifyPoType) draw separate transitions from the step
with a runtime condition for the incoming message. Go to transition properties and provide
the transition condition on which PRT identifies the path.

 Go to the join property of the target step(sendPO) to the required join type, in this example
“unsynchronised or”.

Notes – Types of Joins

 AND - The step processes the incoming data only when all incoming transitions are satisfied.
 OR - The step processes the incoming data when any incoming transition is satisfied. An
“OR” has the ability to create multiple tracks through a process for every true inbound
transition.
 Unsynchronized OR - The step processes the incoming data when any incoming transition is
satisfied. An “unsync OR” can take only one output track from an activity step.
 Complex - The step processes the incoming data according to the custom join logic you
create with a join condition editor. You can also set the join time out as a static value or
from a field value from the incoming canonical or as a business calendar value.
Activity – Recieve Task
Exercise 1

Requirements

1. Create a simple process diagram using multiple receive steps


2. Usage of receive step to start and not to start a process model.

Solution

 To start a process model using receive activity step please find the below process model.
 Set the property to allow the receive step to start the process model.

 You can also use multiple receive steps in the same process diagram to start the process
model. In that case use subscription filter to differentiate between the run time message
inputs if you are using the same document canonical otherwise you can also use two
different document canonicals. The below BPM uses same canonical document with
subscription filter.
 You can also use the receive step to receive an intermediate message into the BPM. In this
case disable (uncheck) the property not to start the process instance. Also please make sure
you set the correlation property of the receive step so that the PRT identifies which running
process instance the document can join.

*Notes – A receive step if not used for starting a process instance the initial pipeline will not be
available for the subsequent steps which follows the receive step or the path the receive step takes.
If you require the initial pipeline throughout your process model use the intermediate event features
to receive the intermediate message into the running process model.

The receive step generally is not used to start a new process instance but is used as a partner along
with a Send Task. Please see the Send Task exercise to understand the usage as a partner task.

Activity – Send Task


Requirements

1. Create a simple process diagram which demonstrates the use of send Task.
2. Use a receive task as partner step to receive the message to the BPM.

Solution

 The below BPM diagrams depicts the model which sends a message by using simple service
protocol using Send Task and receives the message back to process by using a Receive Task.
 Select the document from the implementation properties of “publishSendPoReq” activity.
Also, select the canonical document as input to the send Task so that the required mapping
to the publishable document can be performed inside the generated service.

 Select the same document from the receive task implementation property and set the
correlation field for the receive step.
 Build and deploy the model to the integration server. On the generated service for the send
task do the required mapping. A map step will be automatically created inside the generated
service but the required mapping the developer will have to be explicitly done.
 Trigger an instance and monitor the instance from MWS.

Activity – Sub Process


Requirements

1. Create a process having a sub process implementation.


2. Demonstrate the usage of loop for the sub process step.

Solution

 The below process diagram depicts the implementation of sub process step (validate).
 You can click and view the implementation inside the sub process step.

 Another feature of sub process is you can loop over a condition for a number of times. To
configure the feature, go to the loop properties of the sub process step. The condition can
be set to be checked before or after the sub process execution.

*Observations – Be careful in the implementation of sub process in case if there is a requirement to


resubmit any of the failed steps within sub process it is observed that the sub process is unable to join
the parent process.
Activity – Call Activity
Exercise 1: Reference Process Type
Requirements

1. Create a process having a reference process implementation.

Solution

 Implement the parent process having a call activity step as highlighted in the below image

 Select Type as webMethods Referenced Process for the activity step and select the required
referenced process from the workspace by clicking the browse button. Also add the required
Start/Return documents for your reference process.

 The referenced process is a standalone process by itself with a start message event. Any
process qualifying this criterion can be made to be reused from a another process
mentioned here as parent process. You can double click on the call activity step from
designer or run time monitor instance to view the referenced process.
 Optionally select the build and upload preferences from the designer preferences as shown
below to the behaviour you wish. Go to Windows->Preferences->Software AG->Process
Development->Build and Upload.

 After building and uploading the process models you can find the code generated in
developer for reference process.

 From the MWS monitor you can view the parent and reference process generated.

*Notes – Define the return documents in case if you want the child process to return any document
explicitly.
Exercise 2: Reference Process Type – Escalate Failure
Requirements

1. Implement error handling for manual resubmission of failed steps in reference process

Escalate Error -Reference Process

 Create an error handler step in the reference process

 You can use the prt.admin:changeProcessStatus to set the required status as per your
requirement. By default the error will be escalated to parent process. If you wish to keep
your reference process not to escalate the error set the field escalateFailure = false in the
changeProcessStatus service.

 You can find the parent process status is still started but the reference process is failed from
the MWS monitor. This new feature enables resubmission of reference process as the parent
process will wait if escalateFailure is set to false.

*Resubmission – Results Observed

 If you set the reference process instance status to any terminal status such as FAILED the
process iteration increments after each resubmission of the step on a failure scenario. If the
process iteration increases it is observed that the reference process is unable to join the
parent process although all steps are complete in reference process. The final status of
reference process is COMPLETE but the parent process still waits in STARTED status.

*The only workaround is not to set to a terminal status i.e you can set the status to eg:
SUSPENDED and resubmit the failed step so that it can join back the parent process.

Exercise 3: Dynamic Reference Process


Requirements

1. Create a process invoking dynamic reference process implementation.

Solution

 Implement a call activity in your parent process and select the below option to invoke one or
more reference process at runtime. Here you should make sure all the reference process are
already deployed into IS.

 You will have to map the required reference process details for the
pub.prt.SubprocessModel document list in the pipeline. Please go through Administering
Process Engine.pdf for further details. Provide the input document details in the
subProcessInstances list. If there are returnDocuments for the reference process
waitForSubProcess flag to be set as true and the required document names to be provided
else keep the flag as false.
 Execute the model and find the process instances generated from MWS. You can view the
parent and reference process created. In this example two child process are created
dynamically.

Exercise 4: BPMN Callable Type


Requirements

1. Create a process having a BPMN callable type implementation.

Solution

 Select Type of call activity step as BPMN Callable process and select the required process to
be configured as a callable process.

 To make a process model callable it has to have a start none event.


 Also you need to provide the global specification input outputs for the process model acting
as callable process model.

 Execute the model and view the results from MWS monitor.

*Notes – The limitation in using reference process while resubmitting a step from a terminal status
eg: FAILED which increases the increments iteration is fixed for callable process. You can now
resubmit a failed step and the reference process will join the parent process successfully.
Gateway – Types
A gateway should be used for merge or split in the BPM process. A gateway is having converging and
diverging behaviour.

Exercise 1: Exclusive (Unsyncronised OR Join) Gateway


Requirements

1. Create a process demonstrating an exclusive gateway features.

Solution

 In the below BPM process you are expecting only one inbound transition to reach the
exclusive gateway and only one outbound transition expected out of gateway. In such
scenarios you can implement exclusive gateway. The behaviour is same as unsynchronized
join.

 Execute the process model and you can find the unsynchronized behaviour of the incoming
and outgoing transition. Remember exclusive gateway takes only one outbound path which
is matching the condition or the default path is taken.

Exercise 2: Inclusive (syncronised OR Join) Gateway


Requirements

1. Create a process demonstrating an exclusive gateway features..

Solution
 In the below BPM process you are expecting both the inbound transition to reach the
inclusive gateway and both the outbound transitions expected out of gateway if condition
matches. In such scenarios you can implement inclusive gateway. The behaviour is same as
synchronized OR join.

 Execute the process and you will be able to find from incoming (converging) behaviour to
merge and outgoing(diverging) behaviour to split from the inclusive gateway.

Notes*: Let’s find the behaviour for the above scenario if used as an exclusive gateway. As
explained before exclusive gateway can take only one outbound path. You can find from the below
diagram for the AND condition on the Complete step will receive an unsatisfied join.

Exercise 3: Parallel Gateway (AND Join)


Requirements

1. Create a process which demonstrates parallel gateway behaviour.


Solution

 A parallel gateway exhibits the AND join behaviour. It waits for all the incoming transitions
and does an unconditional split for the out going transitions.

 Execute the model and find the behaviour of parallel gateway which waits for all(AND) and
splits to all the available outbound transitions.

Exercise 4: Complex Gateway


Requirements

1. Create a process demonstrates complex gateway behaviour.

Solution

 The complex gateway allows OR,AND, Unsyncronized OR, Complex joins for the incoming
transitions(converging) and outgoing will be based on the transitions matching the
condition. We have already seen the OR, AND and Unsyncronized joins for the previous
gateways explained. Now will see the use of complex join in complex gateway which splits
into many outbound paths. I want to implement a condition for eg: If a message is to be
broadcasted to all systems based on a field value then execute steps sendPOToA and
sendPOToB otherwise execute step processPO and the gateway should proceed if either of
this condition is successful.
 Use the complex editor for the join to write your expression from the available transitions as
shown below.

 Execute the process model for the broadcast all scenario and view the result from MWS.
Intermediate Events
Exercise 1: Message Event
Requirements

1. Create a process demonstrates the usage of intermediate message events.

Solution

 The intermediate message event waits for a document to join the process. An intermediate
step requires an input and output transition as shown in the below diagram. You can use the
message event step to throw or catch a document. In this example we will receive an
intermediate message into the running process.

 Provide the document which is to be received as intermediate message. Also configure the
correlation field for the intermediate message event step.
Note* - You might not be able to browse and select the document from designer. In that case
type the document name directly and save.
 Execute the BPM and you can find the process is waiting for the document to be received.
The step in waiting status for the message event.

 Publish the intermediate response document and you will be able to find the process model
is complete.
Exercise 2: Boundary Error
Requirements

1. Create a process demonstrates the usage of intermediate boundary error.

Solution

 The intermediate error event interrupts a normal flow of process from an activity step in
case it encounters any error. This is the default behaviour if used for an activity step. For a
sub process it is always non-interrupting.

 Execute the process model and on error on the configured step the process takes a different
transition to complete the model.
Exercise 3: Boundary Timer
Requirements

1. Create a process demonstrates usage of intermediate timer event.

Solution

 Intermediate boundary timer is used to interrupt or non interrupt an activity step if the
execution time taken is greater than the predefined timer value. For interrupting tick the
check box on the general properties of timer step. In this eg: the timer event interrupts the
normal flow of the BPM.( I have used a sleep service in the step to demonstrate the execution
time exceeding the configured value)

 Configure the timer conditions on the timer step properties. You can also provide a runtime
field value if you want to use a configurable field value for the execution timer step.

 Execute the process model and observe the results from MWS.
Useful Tips & Tricks
Parallel Processing
Consider the below scenario with parallel steps executing on a process. The process has 3 parallel
steps which send message and 3 intermediate message events to wait for the response.

Observations

1. All the 3 steps executes in parallel as expected. Even if one fails and the model is updated to
failed or suspended status the other threads executing for the remaining 2 steps continue to
execute and update the step status to complete as expected for the parallel steps.
2. Now consider one of the parallel steps failed and the process is updated to FAILED status. In
this case when the response comes back for the successful steps in the intermediate event
PRT rejects it saying process is already terminated.
3. Now consider one of the parallel steps failed and the process is updated to SUSPENDED
status. In this case when the response comes back for the successful steps in the
intermediate event PRT holds it temporarily. If you resume the process you can find the
documents joining the running process.

Wait & Retry


Consider the below scenario for which you have a need to retrigger the activity step in case a
negative response is received back. Also you need to wait for a predefined interval before retrying.

Implementation Steps

 Implement the wait and retry mechanism using an abstract activity step and a gateway with
AND join.
 Implement the transition from recieveA step for success and error cases.
 Implement join time out for the gateway step using the runtime field option for the interval
you want BPM to wait before retrying.
 Implement a transition for join timeout from the gateway step to the activity step you want
to retry. (Infact the transition from the dummy WAIT step will never come to gateway and
hence it will expire the time out condition)
 Optionally implement the maximum iteration exceeded transition from the activity step
retried.
References
1. 8-2-SP1_BPM_Process_Development_Help.pdf
2. 8-2-SP1_Administering_Process_Engine.pdf

You might also like