When using the Meet-in-the-middle development approach to build an assembly module, you will define the components for your application and then select existing implementations for the components.
For this type of development, the modeling of the application in the assembly diagram may progress in parallel with the creation of SCA implementations (such as business processes, state machines, and so forth) that provide the required services (business logic) for your application. You would wire all the components in the assembly diagram and then select the implementations to be used for the components. The assembly editor is not used to generate new implementations for the components in this scenario.
To illustrate the concepts covered in this topic, we will use a simple example of modeling a customer stock portfolio query application and then adding existing implementations to the assembly diagram. The sample application accepts a customer ID and returns the customer's portfolio information, as shown in the following diagram:
Three implementations will provide the required services:
The meet-in-the-middle development scenario deals with adding implementations to components so we are going to create a single module which will have the assembly diagram and all the implementations for the components.
This topic provides some general instructions on how you can use the assembly editor to model the integrated application. Detailed step-by-step instructions on how to use tools will not be covered but they are available from the related information at the end of this topic.
Here are the steps:
Create a module
Create a module, StockPortfolio, for the new application. We will assemble services and build the integrated application in its module assembly. All service implementations and resources will be stored in the module.
Edit the module assembly
Open the StockPortfolio module assembly with the assembly editor and start to model the integrated application.
Create components
Here is an example of the StockPortfolio module with the three components created in its module assembly:
Interfaces are ready to be added
The interfaces for the components are available in the module.
Add interfaces to components
The interfaces have been added to the components in the following assembly diagram:
Wire components
All the components are wired in the following assembly diagram:
Implementations are ready to be added
The implementations of the components are separately developed in the module or outside of the module and then imported.
Select implementations for components
For CustomerQuery, right-click and Select Implementation and pick the CustomerQuery process that is listed. Because CustomerQuery already has a process type, only existing processes in the module are listed for selection.
We now know that CustomerInfo is implemented as a state machine. For CustomerInfo, right-click to select
and pick the CustomerInfo state machine.For StockQuote, right-click to select
and pick the StockQuote human task.All three components now have implementations, as shown here:
We have finished using the meet-in-the-middle approach to build the application. If any one of the components in the assembly diagram has to be used outside of the module, then create an export for the component's interface.
If interfaces for the implementations are in a library, then you will need to open the module with the dependency editor and add a dependency on the library to use its resources.
Related information