<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -16,17 +16,20 @@
 	
 	&lt;cffunction name=&quot;before&quot; returntype=&quot;boolean&quot; access=&quot;public&quot; output=&quot;false&quot;&gt;
 		&lt;cfargument name=&quot;obj&quot; required=&quot;true&quot; /&gt;
+		&lt;cfset invokeCallback('beforeAction', arguments.obj) /&gt;
 		&lt;cfreturn invokeCallback('before#getName()#Action', arguments.obj) /&gt;
 	&lt;/cffunction&gt;
 	
 	&lt;cffunction name=&quot;after&quot; returntype=&quot;void&quot; access=&quot;public&quot; output=&quot;false&quot;&gt;
-		&lt;cfargument name=&quot;obj&quot; required=&quot;true&quot; /&gt;
+		&lt;cfargument name=&quot;obj&quot; required=&quot;true&quot; /&gt;		
 		&lt;cfset invokeCallback('after#getName()#Action', arguments.obj) /&gt;
+		&lt;cfset invokeCallback('afterAction', arguments.obj) /&gt;
 	&lt;/cffunction&gt;	
 	
 	&lt;cffunction name=&quot;exit&quot; returntype=&quot;void&quot; access=&quot;public&quot; output=&quot;false&quot;&gt;
 		&lt;cfargument name=&quot;obj&quot; required=&quot;true&quot; /&gt;
 		&lt;cfset invokeCallback('exit#getName()#Action', arguments.obj) /&gt;
+		&lt;cfset invokeCallback('exitAction', arguments.obj) /&gt;
 	&lt;/cffunction&gt;
 	
 	&lt;cffunction name=&quot;invokeCallback&quot; returntype=&quot;boolean&quot; access=&quot;private&quot; output=&quot;false&quot;&gt;</diff>
      <filename>State.cfc</filename>
    </modified>
    <modified>
      <diff>@@ -3,6 +3,7 @@
 
 	&lt;cffunction name=&quot;init&quot; access=&quot;public&quot; returntype=&quot;any&quot; output=&quot;false&quot; hint=&quot;&quot;&gt;
 		&lt;cfset instance.state = '' /&gt;
+		&lt;cfset instance.beforeActionCount = 0 /&gt;
 		&lt;cfreturn this /&gt;
 	&lt;/cffunction&gt;
 		
@@ -88,5 +89,13 @@
 		&lt;cfargument name=&quot;value&quot; type=&quot;boolean&quot; required=&quot;true&quot; /&gt;
 		&lt;cfset instance.readExit = arguments.value /&gt;
 	&lt;/cffunction&gt;	
+	
+	&lt;cffunction name=&quot;incrementBeforeActionCount&quot; access=&quot;public&quot; returntype=&quot;void&quot; output=&quot;false&quot;&gt;
+		&lt;cfset instance.beforeActionCount = instance.beforeActionCount + 1 /&gt;
+	&lt;/cffunction&gt;	
+	
+	&lt;cffunction name=&quot;getBeforeActionCount&quot; access=&quot;public&quot; returntype=&quot;Numeric&quot; output=&quot;false&quot;&gt;
+		&lt;cfreturn instance.beforeActionCount /&gt;
+	&lt;/cffunction&gt;	
 
 &lt;/cfcomponent&gt;
\ No newline at end of file</diff>
      <filename>test/Conversation.cfc</filename>
    </modified>
    <modified>
      <diff>@@ -57,5 +57,9 @@
 	&lt;cffunction name=&quot;afterClosedAction&quot; access=&quot;public&quot; returntype=&quot;void&quot; output=&quot;false&quot;&gt;
 		&lt;cfset getOriginalObject().setClosedAfter(true) /&gt;
 	&lt;/cffunction&gt;
+	
+	&lt;cffunction name=&quot;beforeAction&quot; access=&quot;public&quot; returntype=&quot;void&quot; output=&quot;false&quot;&gt;
+		&lt;cfset getOriginalObject().incrementBeforeActionCount() /&gt;
+	&lt;/cffunction&gt;
 
 &lt;/cfcomponent&gt;
\ No newline at end of file</diff>
      <filename>test/ConversationState.cfc</filename>
    </modified>
    <modified>
      <diff>@@ -221,4 +221,15 @@
 		&lt;/cfscript&gt;
 	&lt;/cffunction&gt;
 	
+	&lt;cffunction name=&quot;testGlobalBeforeActionExecuted&quot; returntype=&quot;void&quot; access=&quot;public&quot; output=&quot;false&quot;&gt;
+		&lt;cfscript&gt;
+			// Should be 1 because it has to set the initial state
+			assertEquals(1, conversation.getBeforeActionCount());
+			conversation.view();
+			assertEquals(2, conversation.getBeforeActionCount());
+			conversation.reply();
+			assertEquals(3, conversation.getBeforeActionCount());
+		&lt;/cfscript&gt;
+	&lt;/cffunction&gt;
+	
 &lt;/cfcomponent&gt;
\ No newline at end of file</diff>
      <filename>test/StateMachineTest.cfc</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a0424f7ec70c1d1f8a0d8c1d83097ef9b5b92d1c</id>
    </parent>
  </parents>
  <author>
    <name>Ryan Wood</name>
    <email>ryan.wood@gmail.com</email>
  </author>
  <url>http://github.com/ryanwood/shade/commit/4c22d15ff9d74cfaf15153438ed0b4bb6ca7af08</url>
  <id>4c22d15ff9d74cfaf15153438ed0b4bb6ca7af08</id>
  <committed-date>2008-09-12T07:57:35-07:00</committed-date>
  <authored-date>2008-09-12T07:57:35-07:00</authored-date>
  <message>Added global event callbacks with tests</message>
  <tree>57a762ab00953a01ce374fadd3b4fccc495f933e</tree>
  <committer>
    <name>Ryan Wood</name>
    <email>ryan.wood@gmail.com</email>
  </committer>
</commit>
