digraph G {
	node [fontname="Trebuchet MS"];
	fontname="Trebuchet MS";
	subgraph cluster_a
	{
		SNAPSHOT [shape=diamond fillcolor=lightgray style=filled label="START"];
		END [shape=diamond fillcolor=lightgray style=filled]
		SNAPSHOT -> begin_snapshot -> add -> add -> {exception;end_snapshot} -> END;
		begin_snapshot -> exception;
		SNAPSHOT -> exception;
		label = "Query Type: Snapshot";
		color=black;
	}
	subgraph cluster_live
	{
		label = "Query Type: Live";
		color=black;
		LIVE [shape=diamond fillcolor=lightgray style=filled label="START"];
		END2 [shape=diamond fillcolor=lightgray style=filled label="END"];
		begin_snapshot2 [label="begin_snapshot"];
		add2 [label="add"];
		end_snapshot2 [label="end_snapshot"];
		exception2 [label="exception"];
		addp [label="add,update,\nremove"];
		LIVE -> begin_snapshot2 -> add2 -> add2 -> {exception2;end_snapshot2};
		begin_snapshot2 -> exception2;
		LIVE -> exception2 -> END2;
		end_snapshot2 -> {heartbeat;addp} -> {exception2;heartbeat;addp;begin_snapshot2};
	}
	subgraph cluster_cont
	{
		label = "Query Type: Continuous";
		color=black;
		CONT [shape=diamond fillcolor=lightgray style=filled label="START"];
		END3 [shape=diamond fillcolor=lightgray style=filled label="END"];
		//begin_snapshot3 [label="* HA table\nfailover" shape=plaintext];
		addp3 [label="add,update,\nremove"];
		exception3 [label="exception"];
		heartbeat3 [label="heartbeat"];
		CONT -> {heartbeat3;addp3;};
//		begin_snapshot3 -> add3 -> add3 -> {exception3;end_snapshot3};
//		begin_snapshot3 -> exception3;
		CONT -> exception3 -> END3;
		//begin_snapshot3 -> 
		 {heartbeat3;addp3} -> {exception3;heartbeat3;addp3;}; /*begin_snapshot3*/
	}
}
