diff options
Diffstat (limited to 'test/samples/w3c/edit-profile-config.scxml')
-rw-r--r-- | test/samples/w3c/edit-profile-config.scxml | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/test/samples/w3c/edit-profile-config.scxml b/test/samples/w3c/edit-profile-config.scxml new file mode 100644 index 0000000..2f8753e --- /dev/null +++ b/test/samples/w3c/edit-profile-config.scxml @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Dialog definitions for Shale Use Cases Example Web Application + written out as SCXML to demonstrate use of Commons SCXML as one + of Shale's Dialog Manager implementations. + For details, see: http://shale.apache.org/shale-dialog-scxml/ +--> +<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:my="http://scxml.example.com/" + version="1.0" initial="edit" datamodel="el"> + + <state id="edit"> + <initial> + <transition target="setup"/> + </initial> + + <!-- global transitions (within state "edit") --> + <transition event="faces.outcome" cond="${outcome eq 'cancel'}" target="cancel"/> + <transition event="faces.outcome" cond="${outcome eq 'finish'}" target="finish"/> + + <state id="setup"> + <onentry> + <my:var name="setupOutcome" expr="#{profile$edit.setup}" /> + </onentry> + <transition cond="${setupOutcome eq 'success'}" target="page1"/> + </state> + + <state id="page1"> + <transition event="faces.outcome" cond="${outcome eq 'next'}" target="page2"/> + </state> + + <state id="page2"> + + <transition event="faces.outcome" cond="${outcome eq 'previous'}" target="page1"/> + <transition event="faces.outcome" cond="${outcome eq 'next'}" target="page3"/> + + </state> + + <state id="page3"> + <transition event="faces.outcome" cond="${outcome eq 'previous'}" target="page2"/> + <transition event="faces.outcome" cond="${outcome eq 'next'}" target="editExit"/> + </state> + + </state> + + <state id="cancel"> + + <onentry> + <my:var name="cancelOutcome" expr="#{profile$edit.cancel}" /> + </onentry> + <transition cond="${cancelOutcome eq 'success'}" target="editExit"> + <my:var name="outcome" expr="cancel"/> + </transition> + </state> + + <state id="finish"> + + <onentry> + <my:var name="finishOutcome" expr="#{profile$edit.finish}" /> + </onentry> + + <transition cond="${finishOutcome eq 'username'}" target="page1"/> + <transition cond="${finishOutcome eq 'password'}" target="page1"/> + <transition cond="${finishOutcome eq 'success'}" target="editExit"> + <my:var name="outcome" expr="success"/> + </transition> + </state> + + <final id="editExit"/> + +</scxml> |