The basic idea is that I have a website and a workflow. I need to capture button clicks from aspx pages in my workflow.
I have a solution with a worflow project and a website project, and the web.config and global.asax have been set up to work with WF. Persistence services are also set up.
I have created a StateMachine workflow. There are several states (StateActivity) containing EventDrivenActivity instances, inside of which are HandleExternalEventActivity instances. To set up the latter correctly so the application could compile, I created an interface decorated with the ExternalDataExchange attribute, and exposing the necessary events. I then created a class that implemented this interface.
That's as far as I got. Now I need to connect the class to my aspx page; events on the page need to trigger the events in the class.
My code looks something like this:
<ExternalDataExchange()> _
Public Interface ICatWorkflow
Property RequestId() As Guid
...
Sub requestInfoEmail()
...
Event onReception(ByVal sender As Object, ByVal e As ExternalDataEventArgs)
End Interface
Class MyObject
Implements ICatWorkflow
Public Property RequestId() As Guid Implements ICatWorkflow.RequestId
...
End Property
Public Sub requestInfoEmail() Implements ICatWorkflow.onReception
...
End Sub
Event onReception(ByVal sender As Object, ByVal e As ExternalDataEventArgs)
end class
On my form.aspx âge, there is a button, and on form.aspx.vb page, there is a corresponding event handler:
Protected Sub btnReception_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Handles btnReception.Click
...
End Sub
Where to go from here?