Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

A business process is typically a collection of related and structured activities or tasks, that depicts a business use case and produces a specific service or output. For example, a banking customer requesting a bank load and getting loan approval is a simple process. An instance of this process is a specific example of this process workflow. So, Mr. Smith requesting for 50,000 USD and getting approval for it is an instance of the "bank loan approval" process. Every time a banking customer makes a request for a loan, that request triggers a new process instance in the BPM system, which flows through the elements of the process workflow according to its design.

...

The first form just duplicates the default behavior; when nothing is specified in the deployment descriptor, all events are generated. The third form lets you define which types of events are generated. The possible types are: 

  • instanceLifecycle
  • activityLifecycle
  • dataHandling
  • scopeHandling
  • correlation

...

To create a listener, simply implement the org.apache.ode.bpel.iapi.BpelEventListener interface. Then add the implementation in the server's classpath ($CARBON_HOME/repository/components/lib) and add a property in bps.xml bye specifying your fully-qualified implementation class name:

...

Code Block
languagehtml/xml
<tns:WSO2BPSxmlns:tns="http://wso2.org/bps/config">
  ...
    <tns:EventListeners><tns:listenerclass="org.wso2.bps.samples.eventlistener.CustomEventListener"/></tns:EventListeners>
  ...
</tns:WSO2BPS>

...

You can try the sample event listener that is shipped with WSO2 BPS by adding the above configuration to the bps.xml and restarting the server. The source of the sample implementation of event listener can be found here.

...