The IBM implementation of SCA provides a graphical representation of how components are associated with each other, as illustrated in below Figure.
With SCA, the only concern is with the interface. This means that it is easy to add to or change the diagram without affecting the rest of the picture, as shown in below Figure.
Note: Figures 1 and 2 represent how components are joined together; they should not be viewed as flow from one side to the other or top to bottom.
Figure 2 shows how the components are connected, so beginning on the left, the required components are invoked in a call/return style, then the flow is exited the same way it was entered. The components in the diagram are SCA components. The simple representation in Figure 2 shows:
Ø On the left, a call from a Business Process Manager Standard component (this is an Advanced Integration Service (AIS) Import component).
Ø In the middle, a BPEL process component and a mediation component.
Ø On the right, calls to a database (JDBCImport is a call to a database using the JDBC adapter) and a web service call (WSImport1).
The available component types are processes, human tasks, Java™, rule groups, state machines and mediations.
To communicate with an SCA assembly, there is a set of exports and imports, three of which are shown above. These provide support for HTTP, JMS, generic JMS (enables the use of non-J2EE Connector Architecture (JCA) 1.5 Java Message Service (JMS) providers), WebSphere MQ, MQ over JMS, web services (SOAP 1.2, SOAP 1.1, SOAP 1.1 using JAX-RPC, SOAP 1.1/JMS), Enterprise Java Bean (EJB) and business process diagram (BPD) (to invoke a Business Process Manager Standard component), AIS (to enable invocation from a Business Process Manager Standard Component), IBM Case Manager and an optimized, internal SCA binding. Some of the advantages of these exports and imports are as follows:
Ø No programming is required, which makes it simple to use a target connection style by simply performing some configuration. In the WebSphere MQ example shown in Figure 3 all that is required is to complete the MQ server and queue name information (or use JNDI) and, in some cases, configure the data handler.
This means connectivity can be implemented rapidly without any coding, and connection/session pooling are all handled under the covers.
Ø The imports and the exports all interchangeable. This makes it straightforward and non-disruptive, for example, to switch from a web service call to a JMS call.
Ø You can add components to the diagram without affecting the existing components (though you may have to match up interfaces). This is similar to the way that you build BPDs in Business Process Manager Standard.
Ø There is built-in support for different standards and capabilities, many of which are not supported in Business Process Manager Standard, such as different levels of SOAP support, web services security and many more.
Adapters
Many application environments provide simple, well documented interfaces to enable other components to access their capabilities. However, some popular applications have complex interfaces and arcane interaction styles. Others make it straightforward to pass information to an application but not so easy to get information out of it. IBM Business Process Manager Advanced provides the following set of inbound and outbound adapters to ease the challenges of accessing some of the more popular application environments:
Ø CICS (outbound)
Ø IBM Enterprise Content Management (inbound and outbound)
Ø IMS (outbound)
Ø Oracle JD Edwards EnterpriseOne (inbound and outbound)
Ø Lotus® Domino (inbound and outbound)
Ø Oracle eBusiness Suite (inbound and outbound)
Ø PeopleSoft™ (inbound and outbound)
Ø SAP® (inbound and outbound)
Ø Siebel® (inbound and outbound)
As well as adapters for applications, there are also adapters that help in connecting to the following common technology infrastructures:
Ø Email (inbound and outbound)
Ø Flat files (inbound and outbound)
Ø FTP (inbound and outbound)
Ø iSeries (inbound and outbound)
Ø JDBC Databases (inbound and outbound)
These standards-based adapters all conform to the J2C specification and are all available as SCA components, which means that they be integrated with other components using SCA. The JDBC adapter in the SCA diagram in Figure 1 illustrates this. All of the requirements for connecting to the target environment and exchanging data with it are encapsulated into each adapter.
Adapters make it much simpler to connect to resources and applications. For example, Figure 4 shows the required configuration to receive input from a file.
Each adapter will have its own target-specific configuration. The file adapter configuration shown in Figure 4 is probably the most basic.
Integrated ESB
One of the common ways of connecting components is to use the capabilities of an ESB. An ESB can be used in conjunction with an SCA environment, shown as mediation in Figure 2, or it can be used standalone. An ESB provides the following primary capabilities:
Ø Connectivity - Integration of different transports; for example, where one system uses JMS messaging and another uses WSDL/HTTP.
Ø Endpoint virtualization - The ESB is aware of the actual endpoints that should be used rather than requiring the caller to know. This is especially useful when there are choices of endpoints or the endpoints change frequently.
Ø Data mediation/transformation - A particular system represents data in one way and another represents the same data in a different way.
Ø Data encapsulation - Minimizes the data exposed to processes. Some systems, especially those that support standard data formats (such as EDI) require large, often sparse data structures as input and output. To avoid the need for a process to handle these data structures, the ESB does it instead.
Ø Data enrichment - Adding additional data fields to a message.
Ø IBM Business Process Manager Advanced includes WebSphere ESB. WebSphere ESB is a good option for an ESB, but it is not a required component. Many customers will choose to use WebSphere Message Broker, Data Power XI50/52 or even another vendor's ESB. All of these are valid choices. However, using the embedded WebSphere ESB has several advantages over a separate component:
Ø Same tooling, same component model, less to learn.
Ø The ability to use Process Center and its management and governance capabilities.
Ø Transaction propagation.
Ø The possibility of co-location when performance requirements demand such a pattern.
Ø Error handling policies such as time-out and retry count specification.
When faced with process integration challenges, it's tempting to think that Business Process Manager Standard and an ESB are sufficient. This configuration will certainly handle some challenges, most notably connecting to other systems, but there are other aspects of process integration that this combination cannot address. The next section describes these aspects.
Distributed transactions
The word transaction means different things to different people. In the context of this discussion, a transaction is an interaction with a system in which that interaction has ACID (Atomic, Consistent, Isolation, and Durable) properties. As described in the IBM CICS Information Center, this means the following:
Ø Atomicity
All changes to data are performed as if they are a single operation. That is, all the changes are performed or none of them are.
For example, in an application that transfers funds from one account to another, the atomicity property ensures that, if a debit is made successfully from one account, the corresponding credit is made to the other account. A more romantic example is a wedding. There is no point at which only one of the parties is married – they're either both married or both not (yet) married!
Ø Consistency
Data is in a consistent state when a transaction starts and when it ends.
For example, in an application that transfers funds from one account to another, the consistency property ensures that the total value of funds in both the accounts is the same at the start and end of each transaction.
Ø Isolation
The intermediate state of a transaction is invisible to other transactions. As a result, transactions that run concurrently appear to be serialized.
For example, in an application that transfers funds from one account to another, the isolation property ensures that another transaction sees the transferred funds in one account or the other, but not in both, nor in neither.
Ø Durability
After a transaction successfully completes, changes to data persist and are not undone, even in the event of a system failure. For example, in an application that transfers funds from one account to another, the durability property ensures that the changes made to each account will not be reversed.
What does this mean to non-techies? If something is a part of a transaction, then it happens reliably and consistently, and in an automated, recoverable way. This is not as straightforward as it sounds; when all of the systems and services are on the same server things are not so difficult, but consider what happens when the process engine is on one server and the target service is on some other server. Let's make things even more difficult; let's suppose that you have multiple services or applications all on separate servers, some fairly local, some very remote, and you have to have a single ACID transaction that spans them all! Further, if there's a failure in one of these systems, the transaction must be suspended and then recovered when the systems comes back, ensuring that all resources are properly synchronized.
This is the sort of capability that IBM has been supporting since the 1960s. In fact, this capability has been around for so long that many of our clients take it for granted, assuming that these capabilities are available in all systems. Well, they're not. When it comes to transactional integrity IBM rules the roost and – from a BPM viewpoint - IBM Business Process Manager Advanced is where this capability is supported.
In fact, the capabilities in Business Process Manager Advanced go beyond what's described above. The implementer of the process gets to control which systems are involved in which distributed transactions so that when discrete control is needed, it is there to be used. For example, as shown in Figure 5, in IBM Integration Designer, a developer may select how transactions will be handled using a graphical editor (a broken green line indicates that a transaction might be joined or propagated but the system cannot confirm that will happen).
One last note on transactions. All systems will suffer failures at some point in their lives; the issue really is how well the system deals with the failure. One of the distinguishing characteristics of Business Process Manager Advanced is that it can deal with transaction recovery in an automated style – no human intervention is needed to figure out what went wrong and how to make it right. It's not enough to collect log entries and other information that enables things to be fixed, but the capability to recover automatically, rather than requiring manual intervention that distinguishes Business Process Manager Advanced. Just consider the amount of activity that a system processing 1000 transactions a second generates when one of its component parts fails and the advantages of automated recovery become very clear.
Compensation
As powerful as distributed transactions are, they don't cover all of the bases. There are two main scenarios that cause problems for distributed transactions:
Ø As suggested above, the ACID properties of transactions require holding onto, or locking, resources until everything in the transaction scope has been carried out, then commit everything at once. This locking means that no other processes can see the data. This is the all or nothing aspect of transactions. This is fine in the world of sub-second interactions, but it doesn't work so well in the world of business processes that can execute over an extended time period - even a minute or so is an eternity for today's processors. For this reason, for long-running processes it's generally not practical to include multiple services in a single transaction and so, in this long-running environment, services are committed on an individual basis. This is a somewhat optimistic model, though a necessary one. It works well if the process runs successfully to completion, but there are some challenges if that's not that case.
Ø Not all services and systems support the protocols that are necessary for distributed ACID transactions. For example, a file system is not transactional, so if a file (for example, an Excel spreadsheet) is involved in a business process, it cannot be a part of a distributed transaction.
There is a second class of this scenario. There are some activities that are both non-transactional and irreversible. The simplest example of this is probably printing a letter that is destined for a customer. Once a print request has been fulfilled, there is no reverse action for the request, whereas for a file, you could consider removing the "offending" file, file insert, and so on.
When these kinds of activities are involved in a business process, transactions don't fulfill all of the requirements and you another set of capabilities called compensation. Compensation provides the ability to undo the actions carried out in a business process in an ordered, automated style. It includes the following capabilities:
Ø Undo actions that correspond to the entire do ((forward) actions in a process. Very often, the undo action for a do action is easy to figure out. A delete corresponds to an insert/append for a database. If you added something to a database or file, you can delete it. If you deleted something, you can add it back (though you need to make sure to retain a copy of the deleted data just in case it's required.) Sometimes, though it is not so simple. Take the print request describe earlier. There is no "unprint," so instead an undo action might be to print some form of retraction or apology.
Ø The subtlety to consider here is this: transactions and simple undo logic for a database are technical IT activities, but printing a second letter for a customer is a business-driven activity rather than an IT-driven activity. Further, based on business considerations you might choose to have a much more sophisticated undo action, such as print the apology but if this is a gold customer, also call them or send them a text message.
Ø A compensation manager watches every instance of every process and notes all do actions and the order in which they were executed. There could be multiple paths in a business process, so this is not as straightforward as it might first appear.
There must be an activity to cause compensation to take place. In some cases, compensation might be driven by an IT-level failure in the process. In other cases, the decision to abandon this process instance (thus driving compensation) might be business-driven, for instance, based on a customer decision.
The compensation capabilities of Business Process Manager enable you to undo the previous actions of a process instance, some of which might have been transactional in nature. In addition, the compensation process is fully automated. You don't need to write reams of code to make this happen, because compensation is a core component of Business Process Manager Advanced. In some cases, you may still need to provide undo actions that are not provided by the service, or when the undo action is non-intuitive, as in the printing example.
Figure 6 shows a (BPEL) process flow on the left and two examples of compensation functions on the right. The top one, labeled "Global process fault handler," is for handling of general, usually unexpected faults. The lower one, labeled "Compensation handler to undo service that is not transactional," is specific to a particular situation, that is, where a non-transactional update has been performed.
Failed events management
There are some kinds of process failures that neither transactions nor compensation can help out with. For example:
Ø A target service is not available or is failing.
Ø The process is not capable of handling the business data; for example, a field is unexpectedly out of bounds or is not present at all. This can often impact decision nodes or endpoint services. This situation often happens when a service is updated without the process being aware of it.
Ø The target for a JMS or WebSphere MQ message is not available. This can occur on inbound messages when the target component is unavailable or on output when the target JMS destination is unavailable.
Very often, the only available action when these situations occur is to abandon the process and restart it when the endpoint services are available, or with better or more complete data. This is time consuming, repetitive, and expensive. However, it's possible to configure a process to be suspended, rather than terminated, and to issue a failed event in situations like these. The failed event can then be manually processed. Business Process Manager Advanced provides a failed event manager to enable these events to be processed. Depending on the specific event type, events can be deleted, resubmitted or modified, or an internal trace can be activated for further diagnosis.
The failed event manager has a feature called Store and Forward. Using this feature, if one of the components in the SCA assembly model is accessed asynchronously (by some form of messaging), and that component becomes unavailable, a failed event is generated and all subsequent messages destined for that unavailable component are stored inside the process engine database until the target component is available again. Once the component is available the stored messages are then forwarded to the component. The benefit of this is that you don't raise multiple failed events when a component becomes unavailable.
Event sequencing
There are many scenarios in which processing of information in strict order are of paramount importance to the integrity of the environment. For example:
Ø An accountCreation event is created and sent for processing. This is followed by an accountCredit event. Clearly, the accountCredit event cannot be processed before the accountCreation event. If this does happen, then at best there will be a confusing "unknown account" message and, at worst, a lost credit.
Ø An erroneous addressUpdate event is created and is followed by a corrected addressUpdate event. If these are processed out of order, then the erroneous event will be the final version.
Ø Your account has 10 Euros in it. You deposit a check for 100 Euros into your account. You then withdraw 50 Euros. If the withdrawal transaction is processed first, you would get an "insufficient funds" error (and possibly a large fee from your bank).
In order to accommodate challenges like this, Business Process Manager Advanced provides event sequencing. This enables events for the same key (accountNumber, customerId, and so on) to be sequenced, while other activities can be processed in the order of their arrival.
In order to provide this capability, it's necessary to verify that there is no overlapping work already in the system, so this capability is computationally intense. Because of this, it is recommended that you use it sparingly.
Endpoint retry and reselection
One of the core capabilities of Business Process Manager Advanced is the orchestration of endpoint services. One of the challenges with this orchestration is taking care of situations in which an endpoint is unavailable or in which there is a choice of endpoints depending upon cost, speed, capability, and so on. Through the underlying WebSphere ESB component, Business Process Manager Advanced has the ability to dynamically select or reselect an endpoint. This is generally provided in concert with some form of service registry and repository, such as WebSphere Service Registry and Repository that has the list of alternate services. The ESB can access this list and then automatically, based on configuration, retry failed service calls, select alternate service endpoints, or choose from a set of service endpoints based on some classification of the set of service endpoints.
This capability prevents needless failure scenarios when services are not available and enables a single ESB mediation to call different services depending on circumstances.
Tools support for SOA integration with IBM Integration Designer
Above and beyond the functional capabilities provided by Business Process Manager Advanced, Business Process Manager Advanced also provides graphical tooling that makes building solutions straightforward for the IT developer. One of the key points about developing solutions in a complex, interconnected IT environment is that solution development needs to be made as straightforward as it can be. IBM Integration Designer provides graphical tools support for all of the capabilities described in previous sections, including all of those provided by IBM Business Process Manager Advanced, WebSphere Adapters (and Adapter Toolkit) and WebSphere ESB. It also supports WebSphere Data Power, which is not discussed in this article. Integration Designer is supported on all Windows® operating systems and some Linux® operating systems, providing a choice of target platform.
Integration Designer has basic features, which are described in the following sections: Eclipse integration, visual tooling, refactoring, testing, and integration.
Eclipse integration
Integration Designer is based on Eclipse and a subset of Rational® Application Developer, as shown in Figure 7.
Eclipse is familiar to the J2EE development community and a widely adopted IDE. The Eclipse plug-in architecture enables Integration Designer to leverage third-party tool plug-ins. For example, Eclipse plug-ins is available for most key source code management software, such as CVS and IBM Rational Team Concert.
Visual tooling
Integration Designer inherits graphical tools from Eclipse and Rational Application Developer, and provides specific tools for advanced Business Process Manager Requirements, such as SCA and BPEL. Each visual tool is adapted to the particular requirements of the development challenge being addressed, as shown in the Figures 8 and 9,
Figure 8 shows the Java development environment inherited from Eclipse.
Figure 9 shows the EJB development environment inherited from Rational Application Developer.
Some of the Rational Application Developer tools available in Integration Designer are: XML tools, J2EE tools, web services tools, web development tools, and many others.
Integration Designer provides visual editors for the entire SCA component types mentioned previously. Figure 10 and 11 show examples of these editors.
For all of these component types, Integration Designer provides a highly productive, codeless, user-friendly, visual, drag-and-drop development environment that supports the SCA and J2EE programming models underlying the Business Process Manager Advanced capabilities discussed earlier.
Refactoring support
It's a fact of life that all projects change. They do this as they grow into a production implementation and when subsequent rounds of modifications take place. Changes to projects can involve restructuring of business objects, modification of components, and so on. If a business object or component is reused in multiple other components, a simple change can quickly become difficult and error prone. The ability to manage these sorts of changes is known as refactoring, and Integration Designer provides rich refactoring and search facilities to facilitate frequent code and design changes, as shown in Figure 12.
Component testing
A Process Server instance is built into Integration Designer to facilitate testing of components. Integration Designer provides the capability to test at various levels from individual components to entire applications. The J2EE artifacts generated by the visual editors can be deployed to the test Process Server for testing and debugging, as shown in Figure 13.
Once the generated code is deployed to the test Process Server, integration developers can use the graphical test client to unit test their integrations. Connected components that are not yet integrated can be scaffolded so that their absence does not affect the component under test. The test client displays the component invocation tree along with the input and output data at each execution step, as shown in Figure 14.
All visual component editors in Integration Designer provide component debuggers. You can set breakpoints for the various artifacts and then use the provided Debug perspective to step through the code, examine and change variables, and resolve issues, as shown in Figure 15.
Individual test cases can be grouped together in test suites. The test suite editor is used to create both test cases and test suites. When the expected results don't match the output data at runtime, a test case is marked as failed. Test suites can be run either in Integration Designer, from Ant scripts, or from scripts that are a part of server deploy tasks.
Integration with IBM Process Center and Process Designer