1. Right-clicking the workflow project, will show the Add Adapter Service Reference… menu item.
2. This shows the familiar Add Adapter Service Reference dialog box. (Don’t you all agree this tool still looks too much of ‘Form1/Button1’ app? J). After selecting the sqlBinding and providing the ServerName and DataBaseName, the connection was made.
3. This showed all the available metadata for this connection. It is possible to select stored procedures or tables that will be used in the process.
4. Since the LoanRequest needs to be inserted in the database table, the Client contract type was specified and the correct table (LoanRequests) and operation (Insert) were selected.
Using the LOB activity.
1. After clicking OK and performing a rebuild on the project, a new custom activity was added to the Workflow Designer toolbox. Each operation (Insert, Update …) that was selected results in a specific activity that is part of a category with the database object name.
2. Dragging this activity on the canvas, shows that the following parameters can be specified on the shape.
3. I only declared the variable ‘saveLoanResult’ that represents the records that should be added to the database. This variable was linked with the Rows parameter of the InsertActivity shape and is an Array of LoanRequest objects.
4. The InsertResult parameter would return the result of the database activity, but this parameter is optional, so I did not link it with a variable here.
5. The BizTalk mapper activity was added right before the InsertActivity shape. Here, I defined a mapping between the loanRequest and the databaseInsert.
6. Compiling the project and executing the workflow, resulted in a new record in my database table.
The power of connectivity and adapter is now made available to the AppFabric platform in a standardized and user-friendly way. It is now also easy to connect to various LOB systems, databases and host systems (using the BizTalk Adapters for Host Systems).
What is not clear at this point is how the licensing will work for these AppFabric features. But more information about that can probably be expected by the time of the public release.