So, you have heard about OpenSpan and its capabilities to collect and manipulate events from the user's desktop. Well, some people have been asking me if there is any way to start playing with OpenSpan Events without building the whole infrastructure behind it. Short answer: Yes. Instead of waiting for someone to create a database, setup the tables, install OpenSpan Events Server, figure out the transport layer (HTTP/S, JMS, etc), take a look on this short tutorial to see how can you collect events locally to make sure you're getting the information you want before you hit the server...
1. Start OpenSpan Studio (Or MS-Visual Studio if you’re using the plugin)
2. Go to File > New > Project and Create a new Empty OpenSpan Project
3. Name your project “Local Events Demo” and leave all default information selected
4. You should end up with something similar to following picture:
5. Go to Project > Add New Item and select Windows Application. I’m using a sample Windows Application and I will name it MyCRM
6. Now you have to tell OpenSpan Studio where to look for that application. Go to Properties panel and select the Path to your application executable.
7. After you select the Path to the Windows Application executable, you are ready to start interrogating your application. Click on the Start Interrogation button on the application interrogation form. If you need / want more information about the OpenSpan interrogation process please take a look on the OpenSpan Online Help here or send me your questions.
8. If the interrogation process started successfully you should see your Windows application up and running. It’s now time to select the controls that you want to get events from. To do that, drag the bulls eye icon over the control you want and then release the mouse.
9. After the interrogation process you should see the controls of the Windows application (buttons, checkboxes, text fields, etc) displaying green checkmarks next to them on the Object Explorer panel. That means you have successfully interrogated that application and should be able to proceed.
Click on the Stop Interrogation button and save the project (File > Save All).
10. On the Object Explorer, click on the high level object and then go to the Properties panel. You’ll have to change two properties:
a. MonitoredEvents – That specifies which controls and events should be monitored.
Let’s select Button (Click)…
Check Box (CheckStateChanged)…
and Text Box (TextChanged, Cut, Copy and Paste).
b. MonitorEventsMode – Specifies the type of the event monitoring to perform. Set that to InterrogatedControls.
11. Go to Project menu item and then choose Add New Item again. Select Global Container and leave the default name.
12. Go to the OpenSpan Studio Toolbox and select SampleConnector from the Events section.
If the SampleConnector component is not available, you have to select Tools menu, Select Choose Toolbox Items and then select SampleConnector (HINT: you can use the Filter feature to the get faster results as you may have lots of items to add).
Drag and Drop the SampleConnector to the Global Container 1 canvas.
13. To configure the SampleConnector, highlight it and then go to the Properties panel.
Change the values to the following:
FileDelimiter – Comma
FilePath – C:\Temp\localEvents.csv
LogFileHandling – OverwriteExistingFile
LoggingEnabled – True
14. Save the project (File > Save All).
15. Run the project. Debug menu item and then Start Debug or simply hit the green arrow on the OpenSpan Studio icons menu.
16. Click on a few buttons, change the text of text fields, copy/paste text from different text fields, mark/unmark check boxes and then stop the project.
Here is a screenshot of my Windows application:
17. Go to the location you have setup the SampleConnector to record the events file and open the localEvents.csv file. You should see something similar to the following table (I’ve cleaned up the data because OpenSpan collects all events and that could be a lot ☺ ):
I hope this helps you to get started with OpenSpan Events...
Oh the joy of having a local development environment is priceless. For most cloud based solutions the story repeats itself being hard to tr...
Most of the projects I work on have some kind of database interaction and some of them require variables to be the passed to the queries at ...
On a recent discussion, a partner was trying to use Apache ActiveMQ HTTP Transport Connectors to receive HTTP requests from a non-JMS Web a...
Web Services are very important components of most (if not all) of the integration projects these days. The Web Services architecture make t...