best grammar app

Adapter - BPM Basics

Submitted by Abhishek on Tue, 2012-05-01 11:26
sxc.hu

Business Processes in BPM world often need a way to do some operations – internally or externally. For example, finding out the next set of performers from a routing table or sending a message to a third party trading system. “Adapters” is a term used commonly for such artifacts which allow you to execute custom code. Products like Savvion Business Manager, Bonitasoft, JBPM all have adapters. Terminology might be different – in general any machine specific task can be called an adapter.

 

How does an adapter work

An adapter works by providing an input and output interface. In terms of basic java an adapter which concats your firstname and lastname could look something like the code below

 

class MyNameAdapter{

private String firstName;

private String lastName;

private String fullName;

 

public void setFirstName(String firstName){

this.firstName=firstName;

}

 

public void setLastName(String lastName){

this.lastName=lastName;

}

 

public void concatNames(){

    this.fullName=this.firstName+” “+this.lastName;

}

 

public String getFullName(){

return this.fullName;

}

}

 

The execution of an adapter happens in three steps

  1. All the Setters are called on the adapter. This sets the value of various fields (in our example, the firstName and lastName). This way the calling logic is able to set data on the adapter

  2. The Worker method is called. Worker method can take care of your business logic. In our example this is the contactNames method which does the actual concatenation of firstName and lastName and then sets the field fullName

  3. The Getters are called. This way calling logic gets the output from the adapter

 

 

Things you can do with an adapter

There are a number of things you can do with an adapter. Here are some examples listed

  • Do some complex calculations and set the value to a particular dataslot. For example if you have logic which calculates the insurance premium based on user age, salary, number of family members and so on

  • Find out the routing logic. For example you could have an adapter just after the start step which determines the downstream performers (like Trade Support Group, Customer Support Group) based on an Account Number specified in the first step


Abhishek Mishra
Good experience in working with BPM technologies like Savvion, JBPM. Founder and Chief Editor of BPMGeek.com. Founder of Savvion Business Manager Mobility Framework Savmobify| View my BPMGeek Profile
|
best grammar app

About BPMGeek

BPMGeek is an initiative to collaborate and communicate with the growing Business process management community out there. The goal is to help developers connect with experts, ask questions, post their learning and get understanding of BPM Concepts. Often tool specific knowledge of niche areas end up developers perplexed and confused - especially when there are very less number of resources available. We will be coming up several several new features. Have a look at our Roadmap here

BPMGeek is an independent entity not associated with any Product. All BPM product professionals are invited to contribute. The Logos and Names used across the site belong to their respective owners. The viewpoints mentioned by Individual contributors are their own. BPMgeek cannot be held liable for any issues arising out of it.


BPMgeek is promoting the Nounshoun English Grammar App - developed by Constellation Software.