Triggering BPD | Various Methods
There are various methods to create initiate a BPD and create instance.The most popular methods are described below:
- Using the UCA to Start BPD
- Using WebAPI to Start BPD
- Using JMS to Stard BPD
- Using Portal to start BPD
Let us discuss one by one:
A Start Message Event with an Event Based UCA ( Click here to under stand UCA and how is it used) can be used in order to Start BPD. Below steps can be followed to create the such set up:
| |
Please go through the link to know understand back ground process when BPD is triggered using Message event.
Using WebAPI to Start BPD:
This according to me this is Best and easiest method to start a BPD programatically. 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 teh 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. For more information on the how to use this method and pass different types of variable click here.
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)
Other Methods would be :
Using Integration Designer JMS
Using Rest API start BPD
Hi,
ReplyDeleteHow to start BPD automatically?
I have requirement, where a BDP should run automatically everyday at 11PM, how do I achieve this, Please let me know the solution.
Thanks in advance
Hi Arif,
ReplyDeleteWith the help of time based UCA you can do this activity.
Hi Arif you can use a Time based UCA which invokes a service to startProcessByName.
ReplyDeleteyes,Its is possible watch this VDO "13. UCAs, Start and Intermediate Message Events".Copy past in google with double quotes.
Delete