When we will use State Record as a Derived record or SQL record and why ?
State Records can be used with record type as derived/record in Application Engine basing on the requirements.
Derived/Work record type means data will not get saved to database and hence lose its value when the application engine is restarted or after database commits steps in the Application Engine, while a table will not as data is committed to the database.
So if you are developing a restartable application engine program, the state record should be a record type SQL table (and built in the database).Since Derived/work state records can also lose information between commit steps in your application engine,its safest to use a SQL table as the default type for your state records.
Refer any of the Delivered Application Engine programs for the usage of State records
Let me know for any questions.