<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2016 Groupon, Inc
~ Copyright 2016 The Billing Project, LLC
~
~ The Billing Project licenses this file to you under the Apache License, version 2.0
~ (the "License"); you may not use this file except in compliance with the
~ License. You may obtain a copy of the License at:
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
~ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
~ License for the specific language governing permissions and limitations
~ under the License.
-->
<stateMachineConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="StateMachineConfig.xsd">
<stateMachines>
<stateMachine name="BIG_BANG">
<states>
<state name="BIG_BANG_INIT"/>
</states>
<transitions>
<transition>
<initialState>BIG_BANG_INIT</initialState>
<operation>OP_DUMMY</operation>
<operationResult>SUCCESS</operationResult>
<finalState>BIG_BANG_INIT</finalState>
</transition>
</transitions>
<operations>
<operation name="OP_DUMMY"/>
</operations>
</stateMachine>
<stateMachine name="AUTHORIZE">
<states>
<state name="AUTH_INIT"/>
<state name="AUTH_SUCCESS"/>
<state name="AUTH_FAILED"/>
<state name="AUTH_ERRORED"/>
</states>
<transitions>
<transition>
<initialState>AUTH_INIT</initialState>
<operation>OP_AUTHORIZE</operation>
<operationResult>SUCCESS</operationResult>
<finalState>AUTH_SUCCESS</finalState>
</transition>
<transition>
<initialState>AUTH_INIT</initialState>
<operation>OP_AUTHORIZE</operation>
<operationResult>FAILURE</operationResult>
<finalState>AUTH_FAILED</finalState>
</transition>
<transition>
<initialState>AUTH_INIT</initialState>
<operation>OP_AUTHORIZE</operation>
<operationResult>EXCEPTION</operationResult>
<finalState>AUTH_ERRORED</finalState>
</transition>
</transitions>
<operations>
<operation name="OP_AUTHORIZE"/>
</operations>
</stateMachine>
</stateMachines>
<linkStateMachines>
<linkStateMachine>
<initialStateMachine>BIG_BANG</initialStateMachine>
<initialState>BIG_BANG_INIT</initialState>
<finalStateMachine>AUTHORIZE</finalStateMachine>
<finalState>AUTH_INIT</finalState>
</linkStateMachine>
</linkStateMachines>
</stateMachineConfig>