* Exiting -> Exiting (resend Exit)
* Ended -> Ended (send Fail)
*/
public void complete(final NotificationType complete, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
{
final State current ;
synchronized(this)
{
current = state ;
if (current == State.STATE_ACTIVE)
{
changeState(State.STATE_COMPLETING) ;
}
}
if (current == State.STATE_ACTIVE)
{
executeComplete() ;
}
else if (current == State.STATE_COMPLETED)
{
sendCompleted() ;
}
else if ((current == State.STATE_FAILING_ACTIVE) || (current == State.STATE_FAILING_CANCELING) ||
(current == State.STATE_FAILING_COMPLETING) || (current == State.STATE_ENDED))
{
sendFail(current.getValue()) ;
}
else if (current == State.STATE_NOT_COMPLETING)
{
sendCannotComplete() ;
}