You are here:
Workflow for Testing a State Model
Testing a State Model involves taking the "happy path" through the states, taking departures from this path, and testing every rule and action. If your State Model is especially complex, you can test it after creating all the rules, then test it again after creating the actions.
- Go over the State Model Completion Checklist.
- Select a test contact.
The Report Card State Model sends emails to the student. To test the delivery of these emails, create or select a Contact, make sure it's active, and give it your email address.
- Take a Representative Path.
- Choose Other Paths to Take.
After you have learned the basics of how to create a State Model, you can learn about additional State Model features and more complex industry-specific State Models.
-
More complex State Transition Rule examples — see State Transition Rule Examples.
-
How to use an On Creation Action if a State Model requires initialization when a new base object record is created — see Workflow for Using a Trigger and an On Creation Action.
-
How to automate a state transition and its action using a scheduled batch job — see Automatic State Model Transitions.
-
How to set up caching for State Model data — see Workflow for Setting Up Caching for State Models.
-
How to create a custom Apex class for State Transition Rule evaluation — see Custom Rule Evaluator Class.
- State Model Completion Checklist
Here is a checklist to help you ensure that your State Model is complete. - Take a Representative Path
If a State Model has no alternate states and no transitions with multiple independent rules, you can test it in one pass. For most State Models, you need multiple passes along multiple paths to test all states, rules, and actions. - Other Paths to Take
To perform other tests, change something, run the State Model again, and see if the results are what you expect. Here are some suggested changes and the expected results.

