Introduction
There are various methods to
create initiate a BPD and create instance or invoking BPD. The most popular
methods are described below:
v Using the UCA to Start BPD
v Using WebAPI to Start BPD
v Using JMS to Stard BPD
v Using Portal to start BPD
Overview
Using the UCA to Start BPD
A Start Message Event with an
Event Based UCA can be used in order to Start BPD. Below steps can be followed
to create such set up:
ü Create an Event Based UCA.
ü Attach this UCA to the "Invoke UCA"
Component in the service from which the BPD should be triggered.
ü Add a Start Message Event to the BPD and attach the
same UCA used above to this Start Message Event.
Using Web API to Start BPD
This according to me this is Best
and easiest method to start a BPD programmatically. Lombardi provides a JavaScript
API out of - box. A function "startProcessByName"
from the java script API can be used to trigger an instance for the BPD. Below
is the procedure is generic code snippet to achieve this:
tw.local.inputValues=new tw.object.Map();
tw.local.inputValues.put("<<Variable Name in
bpd>>", "<<Value to be passed in to BPD>>");
tw.system.startProcessByName("<<BPD Name>>",
tw.local.inputValues);
Using JMS to Start BPD
The other way to start the BPD
is, that the message to start the BPD can be posted directly to the event
Manager using Java Messaging Service (JMS).A specific format of the message
should be posted to Event Manager. The Message should be structured as below:
<eventmsg>
<!-- The process app acronym and event name are required: The snapshot
and UCA name are optional -->
<event
processApp="[acronym]" snapshot="[snapshot_name]"
ucaname="[UCA_name]">[event_name]</event>
<!--Optional: The name of the queue for the event to run in-->
<queue>[queue name]</queue>
<!--Any parameters the UCA may require--
<parameters>
<parameter>
<key>param1</key>
<value>![CDATA[value1]]</value>
</parameter>
</parameters>
</eventmsg>
If the Snapshot name is not
mentioned in the above message, the Event Manager considers the default
snapshot of the process App.
Also, if the value of the
<value> element contains XML elements or similar content, that value
should to be wrapped in a CDATA tag as shown in the preceding example.
Using Portal to start BPD
The other way to start a BPD
is to expose the BPD to start (BPD --> over view --> Exposing -->
Expose to Start) to a group of users. Once this is done, the BPD will be
visible in the process portal (Under New in the Tools Bar), to the Group of
users to whom this BPD is exposed.
This is method is particularly
used in a scenario where there is no need for any data at the beginning of an
instance. (For example: a complaint process where a user will be initiating the
instance on receiving the request from the client to create a complaint).
Download
File Name
|
Size
|
Download
|
IBM BPM - Various Methods of Triggering or Invoking BPD
|
460KB
|
0 comments :
Post a Comment