State information includes an ID, a name, a revision number, and usage notes. The name and usage notes are metadata that the state editor shows in the Application Composer.
For a custom state, you can explain its purpose and functionality as state notes, which appear in the state editor.
@Override public String getStateNotes() { StringBuilder sb = new StringBuilder(); sb.append("A sample state. When executed, it checks for "); sb.append("an entered Postal/ZIP Code, and returns the "); sb.append("weather report for that area.\n\n); sb.append("Use the following follow up states:\n "); sb.append("- OK: Weather report for the area was found\n "); sb.append("- FAIL: Unexpected error\n "); sb.append("- Dyn -1: Area code entered was not valid\n "); sb.append("- Dyn -2: No weather report for the area\n "); return sb.toString(); }
@Override public String getRevisionString() { return "1.0.0"; }
private static long STATE_ID = 600000L; @Override public long getStateId() { return STATE_ID; }
For custom states, assign unique ID values between 600,000 and 999,999. Values between 0 and 599,999 are reserved.