* Exiting -> Exiting (resend Exit)
* Ended -> Ended (resend Cancelled)
*/
public void cancel(final NotificationType cancel, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
{
final State current ;
synchronized(this)
{
current = state ;
if (current == State.STATE_ACTIVE)
{
changeState(State.STATE_CANCELING) ;
}
}
if (current == State.STATE_ACTIVE)
{
executeCancel() ;
}
else if (current == State.STATE_COMPLETED)
{
sendCompleted() ;
}
else if ((current == State.STATE_FAILING_ACTIVE) || (current == State.STATE_FAILING_CANCELING))
{
sendFail(current.getValue()) ;
}
else if (current == State.STATE_NOT_COMPLETING)
{
sendCannotComplete() ;
}