# StateMachine on SFC or tag ValueChanged script?

**URL:** <https://forum.inductiveautomation.com/t/statemachine-on-sfc-or-tag-valuechanged-script/15028>\
**Category:** Ignition\
**Created:** [August 10, 2017, 9:55am UTC](https://forum.inductiveautomation.com/t/statemachine-on-sfc-or-tag-valuechanged-script/15028 "2017-08-10T09:55:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nanixu](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nanixu](https://forum.inductiveautomation.com/u/nanixu)\
**Post date:** [August 10, 2017, 9:55am UTC](https://forum.inductiveautomation.com/t/statemachine-on-sfc-or-tag-valuechanged-script/15028/1 "2017-08-10T09:55:51Z")

</div>

Hi there,

I need a statemachine , for example state change to “run” from “standby” depends on “start” input.  
A SFC with transition and action can do it.  
A tag with udt change scrpit can do it as well.  
Which way is better to implement it ?  
SFC seems to be the recommend solution for this case.  
But those gateway tag also visiable for all clients, and we can interact with database in scripts as well.  
Any suggestions?
