# SFC aborts on first Action

**URL:** <https://forum.inductiveautomation.com/t/sfc-aborts-on-first-action/11982>\
**Category:** Ignition\
**Created:** [July 27, 2016, 7:14pm UTC](https://forum.inductiveautomation.com/t/sfc-aborts-on-first-action/11982 "2016-07-27T19:14:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![heybales](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/heybales/32/3358_2.png) [@heybales](https://forum.inductiveautomation.com/u/heybales)\
**Post date:** [July 27, 2016, 7:14pm UTC](https://forum.inductiveautomation.com/t/sfc-aborts-on-first-action/11982/1 "2016-07-27T19:14:23Z")

</div>

I’m getting the following error when trying to run a new SFC.

Note Init is the first step in the SFC. Debug mode behaves the same.

Any ideas?

12:08:01 PM ChartInstance Chart ‘WortPriority’ aborted in ‘Script[Step:Init]’

java.lang.Exception: function ‘onStart’ not defined.  
at com.inductiveautomation.sfc.elements.steps.StepScriptRunner.invoke(StepScriptRunner.java:42)  
at com.inductiveautomation.sfc.elements.steps.StepScriptRunner.invoke(StepScriptRunner.java:34)  
at com.inductiveautomation.sfc.elements.steps.action.ActionStep.activateStep(ActionStep.java:48)  
at com.inductiveautomation.sfc.elements.StepContainer.onActivateRequested(StepContainer.java:125)  
at com.inductiveautomation.sfc.fsm.element.ElementInactive.action(ElementInactive.java:33)  
at com.inductiveautomation.sfc.fsm.element.ElementInactive.action(ElementInactive.java:8)  
at com.inductiveautomation.sfc.fsm.StateContext.lambda$handleEvent$0(StateContext.java:52)  
at com.inductiveautomation.sfc.api.ExecutionQueue$ThrowableCatchingRunnable.run(ExecutionQueue.java:136)  
at com.inductiveautomation.sfc.api.ExecutionQueue$PollAndExecute.run(ExecutionQueue.java:111)  
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)  
at java.util.concurrent.FutureTask.run(FutureTask.java:266)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)  
at java.lang.Thread.run(Thread.java:745)  
less

---

<div class="post-metadata">

**Author:** ![heybales](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/heybales/32/3358_2.png) [@heybales](https://forum.inductiveautomation.com/u/heybales)\
**Post date:** [August 12, 2016, 5:40pm UTC](https://forum.inductiveautomation.com/t/sfc-aborts-on-first-action/11982/2 "2016-08-12T17:40:55Z")

</div>

this was my bad.

code was not indented properly.
