IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Developing business processes > (Deprecated) Routing with Selectors
Selectors
The selector editor is used to route an operation from a client component to one of several possible target components.
The IBM Integration Designer tools have been designed so that users can easily compose integrative business solutions without programming skills. To this end, you can use the intuitive graphical environment of the selector editor to choose what operation you want implemented, what component you want to do it, and when you want it to take place.
Selectors can only be deployed to the IBM BPM.
Here are some terms that have specific meanings when used in the context of the selector editor:
- operation
- When used with a selector, the operation is a business need or task in the client application.
- destination
- In this case, the destination is an implementation of the operation. It is usually one of several possibilities.
- algorithm
- This is the logic that specifies what situation or conditions must be in place for the implementation in question to run. You can use the provided date and time algorithms for scheduling, or you can compose your own custom algorithms for other situations.
There are several advantages to routing communication from the client and target applications through a selector:
- It decouples the client application from the target, so that the target can change over time without affecting the client.
- The implementation of the selector and the destination can be independent and as such, either can be changed as necessary without affecting the other.
- Target implementations can be added without changing the client or requiring a restart.
An example of a selector
Imagine a business solution that governs the business transactions between a customer and a vendor, where a small part of the solution gives customers different discounts at different times of the year. When the solution is first being programmed, there are certain things that are known ahead of time, and certain things that are not.
For example, the dates that the discounts will be in effect are known, but the amount of the discount, because it is tied directly to fluctuating business conditions, is not. As a result, it would be necessary to capture the business transaction in one part of the solution, and the discount in another. In this way, the transaction can run continuously without needing to be stopped and changed, and the discount can be calculated when necessary using the most up to date business logic.
This is where a selector comes in. In the runtime environment, certain dates will trigger the selector to forward an operation to the appropriate component that calculates and then returns the discount.
Types of selectors
Selectors can be classified into three groups:
- Generic date-range-based selectors
- These are selectors which make their invocation decision based on which range a date lies in. Extra ranges can be added in the runtime environment, targets can be changed, and the resulting modifications can be re-exported back to the tool.
- Generic non-date-range-based selectors
- These are selections that are based on other data types and conditions. Examples include StringSingleton (does an incoming string match a specific string) and IntegerRange (does an incoming integer fit into a particular range), and so on.
- Custom Selectors
- If the selectors described above do not meet your needs, then you can write your own algorithm.
Runtime dynamicity
As was mentioned above, IBM Integration Designer was designed specifically with users who had minimal programming skills in mind. To this end, the various components can be wired together without any real knowledge of the interfaces and references that they expose. However, if they are deployed as such, then their binding is static, and they cannot hope to compensate for situations where the target component suddenly becomes unavailable in a runtime environment. A selector solves this problem, because it allows this target component to be chosen dynamically.
For example, consider a business rule which invokes a service. Instead of wiring the rule to a specific implementation in the assembly editor, you can configure one or more potential targets in the definition of a selector. Then, your user can work with the administrative console in the runtime environment, either to add or change targets, or to configure effective date ranges.
(Deprecated) Routing with Selectors
Related tasks:
(Deprecated) Creating a selector