1-- example for system events processing from script 2initial state ignore_shutdown; 3 4transition "got USR1" ignore_shutdown - system(#type=="User1") / logParams(1) -> ignore_shutdown; 5transition "got USR2, quit on shutdown" ignore_shutdown - system(#type=="User2") / logParams(1) -> quit_shutdown; 6transition "got shutdown" ignore_shutdown - system(#type=="ServerShutdown") / { 7 logParams(1); 8 set(#processed="true"); 9} -> ignore_shutdown; 10 11 12state quit_shutdown; 13transition "got shutdown" quit_shutdown - system(#type=="ServerShutdown") / { 14 logParams(1); 15 -- send BYE and stop 16 stop(true); 17 set(#processed="true"); 18 -- or we could just not set #processed, then DSM would to it 19} -> end; 20 21state end; 22 23transition "hangup" (ignore_shutdown, quit_shutdown) - hangup / stop(false) -> end; 24