Extend the BizTalk integration stack using GrabCaster

BTSandGC

During the last two weeks I worked around a new GrabCaster feature, the embedded version, essentially I’m thinking to the possibility to embed the GrabCaster features inside the applications and components, for example to extend another framework as BizTalk or SharePoint or to provide integration capabilities to custom applications or particular application as Windows Word or Excel and more.

Because with GrabCaster I’m able to create a new trigger and integrate any king of technology in fast way, why not extend this potential to BizTalk?

Last evening I release the embedded version which is a interface component provided by GrabCaster to embed its features inside any application or component.

Embed GrabCaster is very simple and you can find an example in the GrabCaster Code, the sample name is GrabCaster.Laboratory.ConsoleEmbedded.

I create a simple console application and I added these two references:

  • GrabCaster.Framework.Library
    • This library contain what we need to embed the engine.
  • GrabCaster.Framework.Contracts
    • This library contains the GrabCaster objects types.

The code is very simple as below.

Declare a simple delegate which will use to receive the GrabCaster events from the internal engine.

emb1

Create the event as below.

embed3

Where IEventType is the event received by the internal GrabCaster engine and EventActionContext is the GrabCaster event data context.
All the GrabCaster events data are managed in bytes and we can find the content in the eventType.DataContext, because in this sample I’m going to receive data as string I will encode the content to it using the Encoding.UTF8.GetString(….)

The void Main console will execute three simple steps:

embed32

  1. Set the delegate to the event
  2. Pass our delegate to the GrabCaster engine
  3. Execute the GrabCaster engine

To execute our application as GrabCaster point we need to provide it the configuration file and the Bubbling Events directory.

Copy the directory Bubbling_GrabCaster and the GrabCaster configuration file in you application directory.
Because now your application is a real GrabCaster point you need to rename these into , GrabCaster_[YouExecutableName] and [YouExecutableName].cfg.

files
If you are hosting GrabCaster in a component then you will use GrabCaster_[YouComponentName] and not the executable.

Executing the console application the result is awesome, the console application is now a real GrabCaster point able to receive events and data from external triggers.

console

I tried a couple of more interesting demos like configure a trigger to receive data from the event viewer machine below the result:

event

Now I like the idea to create a BizTalk adapter  and embed GrabCaster inside it, BizTalk and GrabCaster  will be able to work together as a common extension that means we will be able to integrate any particular technology or device in very fast way and for any integration animal who would like to work on it I opened a new issue in GitHub regarding that.

You can find more information about GrabCaster in GrabCaster.io, in the next weeks I will make some videos to show how to use GrabCaster and some interesting samples.

 

 

Related blog posts