Skip to content

PhoneX rALF Code Generation Status

Robert Doczi edited this page Sep 17, 2015 · 19 revisions

Corrected in PhoneX model

  • PhoneXPort_In state machine's Call transition 9. line: where should signal be sent? to is missing, we use this: send new PhoneX::PhoneX::Implementation::PhoneXPort_Out::TerminateCall(UserID=> sigdata.CallerID) to PhoneXPort_Out::instances().one();)
  • PhoneXPort_In state machine's EndCall transition: Should not casting or instanceof be used instead of the association at subscriber? We use instanceof.

With the correct PhoneX model

Action code type Ok/Sum
Operation 6/8
State entry 34/34
State exit 0/0
Transition 20/21
Transition guard 0/0
SUM 60/63
UML fully qualified name and rALF code isOK Exception / C++ code
Operation: Call::CleanUp

NO rALF CODE
Operation: Service::GetServiceId

// select any service from instances of Service;
Service service = Service::instances().one();
// if empty service
if(service == null) {
// create object instance service of Service;
service = new Service();
// assign service.ServiceId = 0;
service.ServiceId = 0;
// end if;
}
// return service.ServiceId;
return service.ServiceId;
::std::list< ::PhoneX::PhoneX::Implementation::Service > __ralf__1__Service = ::PhoneX::PhoneX::Implementation::Service::_instances
::PhoneX::PhoneX::Implementation::Service* __ralf__0__service = ::xtuml::select_any(__ralf__1__Service);
bool __ralf__2__bool = __ralf__0__service == 0;
if (__ralf__2__bool) {
::PhoneX::PhoneX::Implementation::Service* __ralf__3__0__Service = new ::PhoneX::PhoneX::Implementation::Service();
service = __ralf__3__0__Service;
service->ServiceId = 0;
}
long __ralf__3__long = __ralf__0__service->ServiceId;
return __ralf__3__long;
Operation: Service::SetServiceId

// select any service from instances of Service;
Service service = Service::instances().one();
// if empty service
if(service == null) {
// create object instance service of Service;
service = new Service();
// end if;
}
// assign service.ServiceId = param.serviceId;
service.ServiceId = serviceId;
::std::list< ::PhoneX::PhoneX::Implementation::Service > __ralf__5__Service = ::PhoneX::PhoneX::Implementation::Service::_instances
::PhoneX::PhoneX::Implementation::Service* __ralf__4__service = ::xtuml::select_any(__ralf__5__Service);
bool __ralf__6__bool = __ralf__4__service == 0;
if (__ralf__6__bool) {
::PhoneX::PhoneX::Implementation::Service* __ralf__7__0__Service = new ::PhoneX::PhoneX::Implementation::Service();
service = __ralf__7__0__Service;
}
__ralf__4__service->ServiceId = serviceId;
Operation: TIM::timerCancel

null
There is no OpaqueBehavior with rALF language for timerCancel operation.
Operation: TRACE::traceError

std::out::println(value=>msg);
::std::cout << msg << ::std::endl;
Operation: TRACE::traceWarning

std::out::println(value=>msg);
::std::cout << msg << ::std::endl;
Operation: Test1::Test1

null
There is no OpaqueBehavior with rALF language for Test1 operation.
Operation: User::User

this.ID = UserId;
this.Busy=Busy;
this->ID = UserId;
this->Busy = Busy;
Entry of State: Call::CallStateMachine::DefaultRegion::CallInitiation

// select one caller related by self->Caller[R2];
Caller caller = this->caller;
// select one called related by self->Called[R3];
Called called = this->called;
// create event instance of ringing_expiration_event of Call8:'RingingTimerExpired' to self;
// !!! ALF does not allow pre-creation of events. Please update your model. Note, however that ALF code might still work if variable storing created event is not written by more than one event creation statement.
// assign self.RingingExpirationTimer = timer_start::Time(event_inst: ringing_expiration_event, microseconds: 20000000);
// this.ringingexpirationtimer = phonex.TIM.timerStart(ringingExpirationEvent, 20000000);
::PhoneX::PhoneX::Implementation::Caller* __ralf__7__caller = this->R2_caller;
::PhoneX::PhoneX::Implementation::Called* __ralf__8__called = this->R3_called;
Entry of State: Call::CallStateMachine::DefaultRegion::CallTermination

// select one called related by self->Called[R3];
Called called = this->'called';
// select one caller related by self->Caller[R2];
Caller caller = this->'caller';
//send PhoneXPort::TerminateCall(UserID: caller.PhoneNumber);
send new PhoneXPort_Out::TerminateCall(UserID=> caller.PhoneNumber) to PhoneXPort_Out::instances().one();
//send PhoneXPort::TerminateCall(UserID: called.PhoneNumber);
send new PhoneXPort_Out::TerminateCall(UserID=> called.PhoneNumber) to PhoneXPort_Out::instances().one();
// generate Subscriber8:'CallEnded' to caller;
send new Subscriber::Callended() to caller;
// generate Subscriber8:'CallEnded' to called;
send new Subscriber::Callended() to called;
::PhoneX::PhoneX::Implementation::Called* __ralf__9__called = this->R3_called;
::PhoneX::PhoneX::Implementation::Caller* __ralf__10__caller = this->R2_caller;
::std::list< ::PhoneX::PhoneX::Implementation::PhoneXPort_Out > __ralf__11__PhoneXPort_Out = ::PhoneX::PhoneX::Implementation::PhoneXPort_Out::_instances
::PhoneX::PhoneX::Implementation::PhoneXPort_Out::TerminateCall_event* __ralf__12__TerminateCall = new ::PhoneX::PhoneX::Implementation::PhoneXPort_Out::TerminateCall_event(false);
long __ralf__13__long = __ralf__10__caller->PhoneNumber;
__ralf__12__TerminateCall->UserID = __ralf__13__long;
::xtuml::select_any(__ralf__11__PhoneXPort_Out)->generate_event(__ralf__12__TerminateCall);
::std::list< ::PhoneX::PhoneX::Implementation::PhoneXPort_Out > __ralf__14__PhoneXPort_Out = ::PhoneX::PhoneX::Implementation::PhoneXPort_Out::_instances
::PhoneX::PhoneX::Implementation::PhoneXPort_Out::TerminateCall_event* __ralf__15__TerminateCall = new ::PhoneX::PhoneX::Implementation::PhoneXPort_Out::TerminateCall_event(false);
long __ralf__16__long = __ralf__9__called->PhoneNumber;
__ralf__15__TerminateCall->UserID = __ralf__16__long;
::xtuml::select_any(__ralf__14__PhoneXPort_Out)->generate_event(__ralf__15__TerminateCall);
::PhoneX::PhoneX::Implementation::Subscriber::Callended_event* __ralf__17__Callended = new ::PhoneX::PhoneX::Implementation::Subscriber::Callended_event(false);

__ralf__10__caller->generate_event(__ralf__17__Callended);
::PhoneX::PhoneX::Implementation::Subscriber::Callended_event* __ralf__18__Callended = new ::PhoneX::PhoneX::Implementation::Subscriber::Callended_event(false);

__ralf__9__called->generate_event(__ralf__18__Callended);
Entry of State: Call::CallStateMachine::DefaultRegion::HackingAttempt

//TRACE::traceWarn(msg=>"Hacking attempt - call by either unknown or busy subscriber has been attempted!");
TRACE::traceWarning(msg=>"Hacking attempt - call by either unknown or busy subscriber has been attempted!");
// select one caller related by self->Caller[R2];
Caller caller = this->'caller';
//send PhoneXPort::TerminateCall(UserID: caller.PhoneNumber);
send new PhoneXPort_Out::TerminateCall(UserID=> caller.PhoneNumber) to PhoneXPort_Out::instances().one();
::PhoneX::PhoneX::Implementation::TRACE::traceWarning("Hacking attempt - call by either unknown or busy subscriber has been attempted!");
::PhoneX::PhoneX::Implementation::Caller* __ralf__19__caller = this->R2_caller;
::std::list< ::PhoneX::PhoneX::Implementation::PhoneXPort_Out > __ralf__20__PhoneXPort_Out = ::PhoneX::PhoneX::Implementation::PhoneXPort_Out::_instances
::PhoneX::PhoneX::Implementation::PhoneXPort_Out::TerminateCall_event* __ralf__21__TerminateCall = new ::PhoneX::PhoneX::Implementation::PhoneXPort_Out::TerminateCall_event(false);
long __ralf__22__long = __ralf__19__caller->PhoneNumber;
__ralf__21__TerminateCall->UserID = __ralf__22__long;
::xtuml::select_any(__ralf__20__PhoneXPort_Out)->generate_event(__ralf__21__TerminateCall);
Entry of State: Call::CallStateMachine::DefaultRegion::InACall

// assign td = timer_cancel::Time(timer_inst_ref: self.RingingExpirationTimer);
Boolean td = TIM::timerCancel(timer_inst_ref=>this.'RingingExpirationTimer');
// select one called related by self->Called[R3];
Called called = this->'called';
// select one caller related by self->Caller[R2];
Caller caller = this->'caller';
// generate Subscriber7:'CallAccepted' to caller;
send new Subscriber::Callaccepted() to caller;
// generate Subscriber7:'CallAccepted' to called;
send new Subscriber::Callaccepted() to called;
long __ralf__24__long = this->RingingExpirationTimer;
bool __ralf__23__td = ::PhoneX::PhoneX::Implementation::TIM::timerCancel(__ralf__24__long);
::PhoneX::PhoneX::Implementation::Called* __ralf__25__called = this->R3_called;
::PhoneX::PhoneX::Implementation::Caller* __ralf__26__caller = this->R2_caller;
::PhoneX::PhoneX::Implementation::Subscriber::Callaccepted_event* __ralf__27__Callaccepted = new ::PhoneX::PhoneX::Implementation::Subscriber::Callaccepted_event(false);

__ralf__26__caller->generate_event(__ralf__27__Callaccepted);
::PhoneX::PhoneX::Implementation::Subscriber::Callaccepted_event* __ralf__28__Callaccepted = new ::PhoneX::PhoneX::Implementation::Subscriber::Callaccepted_event(false);

__ralf__25__called->generate_event(__ralf__28__Callaccepted);
Entry of State: Call::CallStateMachine::DefaultRegion::LineIsBusy

// select one caller related by self->Caller[R2];
Caller caller = this->'caller';
//send PhoneXPort::LineIsBusy(UserID: caller.PhoneNumber);
send new PhoneXPort_Out::LineIsBusy(UserID=> caller.PhoneNumber) to PhoneXPort_Out::instances().one();
// generate Subscriber8:'CallEnded' to caller;
send new Subscriber::Callended() to caller;
::PhoneX::PhoneX::Implementation::Caller* __ralf__29__caller = this->R2_caller;
::std::list< ::PhoneX::PhoneX::Implementation::PhoneXPort_Out > __ralf__30__PhoneXPort_Out = ::PhoneX::PhoneX::Implementation::PhoneXPort_Out::_instances
::PhoneX::PhoneX::Implementation::PhoneXPort_Out::LineIsBusy_event* __ralf__31__LineIsBusy = new ::PhoneX::PhoneX::Implementation::PhoneXPort_Out::LineIsBusy_event(false);
long __ralf__32__long = __ralf__29__caller->PhoneNumber;
__ralf__31__LineIsBusy->UserID = __ralf__32__long;
::xtuml::select_any(__ralf__30__PhoneXPort_Out)->generate_event(__ralf__31__LineIsBusy);
::PhoneX::PhoneX::Implementation::Subscriber::Callended_event* __ralf__33__Callended = new ::PhoneX::PhoneX::Implementation::Subscriber::Callended_event(false);

__ralf__29__caller->generate_event(__ralf__33__Callended);
Entry of State: Call::CallStateMachine::DefaultRegion::SessionTimeout

// generate Call7:'EndCallRcvd' to self;
send new Call::Endcallrcvd() to this;
::PhoneX::PhoneX::Implementation::Call::Endcallrcvd_event* __ralf__34__Endcallrcvd = new ::PhoneX::PhoneX::Implementation::Call::Endcallrcvd_event(false);

this->generate_event(__ralf__34__Endcallrcvd);
Entry of State: Call::CallStateMachine::DefaultRegion::Terminated

this.CleanUp();
// select one service related by self->Service[R6];
Service service = this->'service';
// relate self to service across R6;
R6::unlink('service'=>service,'call'=>this);
this->CleanUp();
::PhoneX::PhoneX::Implementation::Service* __ralf__35__service = this->R6_service;
::std::list< ::PhoneX::PhoneX::Implementation::Call > __ralf__37__Call = __ralf__35__service->R6_call;
__ralf__37__Call.remove(this);;
this->R6_service = NULL;
Entry of State: Call::CallStateMachine::DefaultRegion::UnknownNumber

// select one caller related by self->Caller[R2];
Caller caller = this->'caller';
//send PhoneXPort::UnknownNumber(UserID: caller.PhoneNumber);
send new PhoneXPort_Out::UnknownNumber(UserID=> caller.PhoneNumber) to PhoneXPort_Out::instances().one();
// generate Subscriber8:'CallEnded' to caller;
send new Subscriber::Callended() to caller;
::PhoneX::PhoneX::Implementation::Caller* __ralf__37__caller = this->R2_caller;
::std::list< ::PhoneX::PhoneX::Implementation::PhoneXPort_Out > __ralf__38__PhoneXPort_Out = ::PhoneX::PhoneX::Implementation::PhoneXPort_Out::_instances
::PhoneX::PhoneX::Implementation::PhoneXPort_Out::UnknownNumber_event* __ralf__39__UnknownNumber = new ::PhoneX::PhoneX::Implementation::PhoneXPort_Out::UnknownNumber_event(false);
long __ralf__40__long = __ralf__37__caller->PhoneNumber;
__ralf__39__UnknownNumber->UserID = __ralf__40__long;
::xtuml::select_any(__ralf__38__PhoneXPort_Out)->generate_event(__ralf__39__UnknownNumber);
::PhoneX::PhoneX::Implementation::Subscriber::Callended_event* __ralf__41__Callended = new ::PhoneX::PhoneX::Implementation::Subscriber::Callended_event(false);

__ralf__37__caller->generate_event(__ralf__41__Callended);
Entry of State: Call::CallStateMachine::DefaultRegion::VerifyingCalled

// select one called related by self->Called[R3];
Called called = this->'called';
// if empty called
if(called == null) {
// return;
return;
// end if;
}
// generate Subscriber9:'StartVerification' to called;
send new Subscriber::Startverification() to called;
::PhoneX::PhoneX::Implementation::Called* __ralf__42__called = this->R3_called;
bool __ralf__43__bool = __ralf__42__called == 0;
if (__ralf__43__bool) {
return;
}
::PhoneX::PhoneX::Implementation::Subscriber::Startverification_event* __ralf__44__Startverification = new ::PhoneX::PhoneX::Implementation::Subscriber::Startverification_event(false);

__ralf__42__called->generate_event(__ralf__44__Startverification);
Entry of State: Call::CallStateMachine::DefaultRegion::VerifyingCaller

// select one caller related by self->Caller[R2];
Caller caller = this->'caller';
// if empty caller
if(caller == null) {
// return;
return;
// end if;
}
// generate Subscriber9:'StartVerification' to caller;
send new Subscriber::Startverification() to caller;
::PhoneX::PhoneX::Implementation::Caller* __ralf__45__caller = this->R2_caller;
bool __ralf__46__bool = __ralf__45__caller == 0;
if (__ralf__46__bool) {
return;
}
::PhoneX::PhoneX::Implementation::Subscriber::Startverification_event* __ralf__47__Startverification = new ::PhoneX::PhoneX::Implementation::Subscriber::Startverification_event(false);

__ralf__45__caller->generate_event(__ralf__47__Startverification);
Entry of State: Called::CalledStateMachine::DefaultRegion::Free

send new DBPort_Out::SetUserStatus(ServiceId=>Service::GetServiceId(), UserId=>this.PhoneNumber,isBusy=> true, isRemovingNow=> false) to DBPort_Out::instances().one();
::std::list< ::PhoneX::PhoneX::Implementation::DBPort_Out > __ralf__48__DBPort_Out = ::PhoneX::PhoneX::Implementation::DBPort_Out::_instances
::PhoneX::PhoneX::Implementation::DBPort_Out::SetUserStatus_event* __ralf__49__SetUserStatus = new ::PhoneX::PhoneX::Implementation::DBPort_Out::SetUserStatus_event(false);
long __ralf__50__long = ::PhoneX::PhoneX::Implementation::Service::GetServiceId();
long __ralf__51__long = this->PhoneNumber;
__ralf__49__SetUserStatus->ServiceId = __ralf__50__long;
__ralf__49__SetUserStatus->UserId = __ralf__51__long;
__ralf__49__SetUserStatus->isBusy = true;
__ralf__49__SetUserStatus->isRemovingNow = false;
::xtuml::select_any(__ralf__48__DBPort_Out)->generate_event(__ralf__49__SetUserStatus);
Entry of State: Called::CalledStateMachine::DefaultRegion::LineIsBusy

// select one call related by self->Call[R3];
Call call = this->call;
// generate Call5:'CalledBusy' to call;
send new Call::Calledbusy() to call;
::PhoneX::PhoneX::Implementation::Call* __ralf__52__call = this->R3_call;
::PhoneX::PhoneX::Implementation::Call::Calledbusy_event* __ralf__53__Calledbusy = new ::PhoneX::PhoneX::Implementation::Call::Calledbusy_event(false);

__ralf__52__call->generate_event(__ralf__53__Calledbusy);
Entry of State: Called::CalledStateMachine::DefaultRegion::ReceivingCallRequest

// select one call related by self->Call[R3];
Call call = this->call;
// generate Call4:'CalledVerifiedAndSynced' to call;
send new Call::Calledverifiedandsynced() to call;
::PhoneX::PhoneX::Implementation::Call* __ralf__54__call = this->R3_call;
::PhoneX::PhoneX::Implementation::Call::Calledverifiedandsynced_event* __ralf__55__Calledverifiedandsynced = new ::PhoneX::PhoneX::Implementation::Call::Calledverifiedandsynced_event(false);

__ralf__54__call->generate_event(__ralf__55__Calledverifiedandsynced);
Entry of State: Called::CalledStateMachine::DefaultRegion::StatusUpdateFailed

TRACE::traceError(msg=> "Update of the user status to DB failed!");
// select one call related by self->Call[R3];
Call call = this->call;
// generate Call7:'EndCallRcvd' to call;
send new Call::Endcallrcvd() to call;
::PhoneX::PhoneX::Implementation::TRACE::traceError("Update of the user status to DB failed!");
::PhoneX::PhoneX::Implementation::Call* __ralf__56__call = this->R3_call;
::PhoneX::PhoneX::Implementation::Call::Endcallrcvd_event* __ralf__57__Endcallrcvd = new ::PhoneX::PhoneX::Implementation::Call::Endcallrcvd_event(false);

__ralf__56__call->generate_event(__ralf__57__Endcallrcvd);
Entry of State: Called::CalledStateMachine::DefaultRegion::Terminated

// select one call related by self->Call[R3];
Call call = this->call;
// generate Call4:'CalledVerifiedAndSynced' to call;
send new Call::Calledverifiedandsynced() to call;
::PhoneX::PhoneX::Implementation::Call* __ralf__58__call = this->R3_call;
::PhoneX::PhoneX::Implementation::Call::Calledverifiedandsynced_event* __ralf__59__Calledverifiedandsynced = new ::PhoneX::PhoneX::Implementation::Call::Calledverifiedandsynced_event(false);

__ralf__58__call->generate_event(__ralf__59__Calledverifiedandsynced);
Entry of State: Called::CalledStateMachine::DefaultRegion::TerminatingCall

send new DBPort_Out::SetUserStatus(ServiceId=> Service::GetServiceId(), UserId=>this.PhoneNumber, isBusy=> false, isRemovingNow=> false) to DBPort_Out::instances().one();
::std::list< ::PhoneX::PhoneX::Implementation::DBPort_Out > __ralf__60__DBPort_Out = ::PhoneX::PhoneX::Implementation::DBPort_Out::_instances
::PhoneX::PhoneX::Implementation::DBPort_Out::SetUserStatus_event* __ralf__61__SetUserStatus = new ::PhoneX::PhoneX::Implementation::DBPort_Out::SetUserStatus_event(false);
long __ralf__62__long = ::PhoneX::PhoneX::Implementation::Service::GetServiceId();
long __ralf__63__long = this->PhoneNumber;
__ralf__61__SetUserStatus->ServiceId = __ralf__62__long;
__ralf__61__SetUserStatus->UserId = __ralf__63__long;
__ralf__61__SetUserStatus->isBusy = false;
__ralf__61__SetUserStatus->isRemovingNow = false;
::xtuml::select_any(__ralf__60__DBPort_Out)->generate_event(__ralf__61__SetUserStatus);
Entry of State: Called::CalledStateMachine::DefaultRegion::Unchecked

send new DBPort_Out::GetUserStatus(ServiceId=>Service::GetServiceId(), UserId=>this.PhoneNumber) to DBPort_Out::instances().one();
::std::list< ::PhoneX::PhoneX::Implementation::DBPort_Out > __ralf__64__DBPort_Out = ::PhoneX::PhoneX::Implementation::DBPort_Out::_instances
::PhoneX::PhoneX::Implementation::DBPort_Out::GetUserStatus_event* __ralf__65__GetUserStatus = new ::PhoneX::PhoneX::Implementation::DBPort_Out::GetUserStatus_event(false);
long __ralf__66__long = ::PhoneX::PhoneX::Implementation::Service::GetServiceId();
long __ralf__67__long = this->PhoneNumber;
__ralf__65__GetUserStatus->ServiceId = __ralf__66__long;
__ralf__65__GetUserStatus->UserId = __ralf__67__long;
::xtuml::select_any(__ralf__64__DBPort_Out)->generate_event(__ralf__65__GetUserStatus);
Entry of State: Called::CalledStateMachine::DefaultRegion::UnknownNumber

// select one call related by self->Call[R3];
Call call = this->call;
// generate Call6:'CalledUnknown' to call;
send new Call::Calledunknown() to call;
::PhoneX::PhoneX::Implementation::Call* __ralf__68__call = this->R3_call;
::PhoneX::PhoneX::Implementation::Call::Calledunknown_event* __ralf__69__Calledunknown = new ::PhoneX::PhoneX::Implementation::Call::Calledunknown_event(false);

__ralf__68__call->generate_event(__ralf__69__Calledunknown);
Entry of State: Caller::CallerStateMachine::DefaultRegion::AlreadyBusy

// select one call related by self->Call[R2];
Call call = this->'call';
// generate Call2:'CallerBusyOrUnknown' to call;
send new Call::Callerbusyorunknown() to call;
::PhoneX::PhoneX::Implementation::Call* __ralf__70__call = this->R2_call;
::PhoneX::PhoneX::Implementation::Call::Callerbusyorunknown_event* __ralf__71__Callerbusyorunknown = new ::PhoneX::PhoneX::Implementation::Call::Callerbusyorunknown_event(false);

__ralf__70__call->generate_event(__ralf__71__Callerbusyorunknown);
Entry of State: Caller::CallerStateMachine::DefaultRegion::Free

//send DBPort_Out::SetUserStatus(ServiceId: Service::GetServiceId(), UserId: self.PhoneNumber, isBusy: true, isRemovingNow: false);
send new DBPort_Out::SetUserStatus(ServiceId=> Service::GetServiceId(), UserId=> this.PhoneNumber, isBusy=> true, isRemovingNow=> false) to DBPort_Out::instances().one();
::std::list< ::PhoneX::PhoneX::Implementation::DBPort_Out > __ralf__72__DBPort_Out = ::PhoneX::PhoneX::Implementation::DBPort_Out::_instances
::PhoneX::PhoneX::Implementation::DBPort_Out::SetUserStatus_event* __ralf__73__SetUserStatus = new ::PhoneX::PhoneX::Implementation::DBPort_Out::SetUserStatus_event(false);
long __ralf__74__long = ::PhoneX::PhoneX::Implementation::Service::GetServiceId();
long __ralf__75__long = this->PhoneNumber;
__ralf__73__SetUserStatus->ServiceId = __ralf__74__long;
__ralf__73__SetUserStatus->UserId = __ralf__75__long;
__ralf__73__SetUserStatus->isBusy = true;
__ralf__73__SetUserStatus->isRemovingNow = false;
::xtuml::select_any(__ralf__72__DBPort_Out)->generate_event(__ralf__73__SetUserStatus);
Entry of State: Caller::CallerStateMachine::DefaultRegion::ReadyToInitiateCall

// select one call related by self->Call[R2];
Call call = this->'call';
// generate Call3:'CallerVerifiedAndSynced' to call;
send new Call::Callerverifiedandsynced() to call;
::PhoneX::PhoneX::Implementation::Call* __ralf__76__call = this->R2_call;
::PhoneX::PhoneX::Implementation::Call::Callerverifiedandsynced_event* __ralf__77__Callerverifiedandsynced = new ::PhoneX::PhoneX::Implementation::Call::Callerverifiedandsynced_event(false);

__ralf__76__call->generate_event(__ralf__77__Callerverifiedandsynced);
Entry of State: Caller::CallerStateMachine::DefaultRegion::Terminated

// select one call related by self->Call[R2];
Call call = this->'call';
// generate Call3:'CallerVerifiedAndSynced' to call;
send new Call::Callerverifiedandsynced() to call;
::PhoneX::PhoneX::Implementation::Call* __ralf__78__call = this->R2_call;
::PhoneX::PhoneX::Implementation::Call::Callerverifiedandsynced_event* __ralf__79__Callerverifiedandsynced = new ::PhoneX::PhoneX::Implementation::Call::Callerverifiedandsynced_event(false);

__ralf__78__call->generate_event(__ralf__79__Callerverifiedandsynced);
Entry of State: Caller::CallerStateMachine::DefaultRegion::TerminatingCall

NO rALF CODE
Entry of State: Caller::CallerStateMachine::DefaultRegion::Unchecked

//send DBPort_Out::GetUserStatus(ServiceId: Service::GetServiceId(), UserId:self.PhoneNumber);
send new DBPort_Out::GetUserStatus(ServiceId=> Service::GetServiceId(), UserId=>this.PhoneNumber) to DBPort_Out::instances().one();
::std::list< ::PhoneX::PhoneX::Implementation::DBPort_Out > __ralf__80__DBPort_Out = ::PhoneX::PhoneX::Implementation::DBPort_Out::_instances
::PhoneX::PhoneX::Implementation::DBPort_Out::GetUserStatus_event* __ralf__81__GetUserStatus = new ::PhoneX::PhoneX::Implementation::DBPort_Out::GetUserStatus_event(false);
long __ralf__82__long = ::PhoneX::PhoneX::Implementation::Service::GetServiceId();
long __ralf__83__long = this->PhoneNumber;
__ralf__81__GetUserStatus->ServiceId = __ralf__82__long;
__ralf__81__GetUserStatus->UserId = __ralf__83__long;
::xtuml::select_any(__ralf__80__DBPort_Out)->generate_event(__ralf__81__GetUserStatus);
Entry of State: Caller::CallerStateMachine::DefaultRegion::Unknown

// select one call related by self->Call[R2];
Call call = this->'call';
// generate Call2:'CallerBusyOrUnknown' to call;
send new Call::Callerbusyorunknown() to call;
::PhoneX::PhoneX::Implementation::Call* __ralf__84__call = this->R2_call;
::PhoneX::PhoneX::Implementation::Call::Callerbusyorunknown_event* __ralf__85__Callerbusyorunknown = new ::PhoneX::PhoneX::Implementation::Call::Callerbusyorunknown_event(false);

__ralf__84__call->generate_event(__ralf__85__Callerbusyorunknown);
Entry of State: Caller::CallerStateMachine::DefaultRegion::UpdateStatusFailed-Hanging

// select one call related by self->Call[R2];
Call call = this->'call';
// generate Call7:'EndCallRcvd' to call;
send new Call::Endcallrcvd() to call;
::PhoneX::PhoneX::Implementation::Call* __ralf__86__call = this->R2_call;
::PhoneX::PhoneX::Implementation::Call::Endcallrcvd_event* __ralf__87__Endcallrcvd = new ::PhoneX::PhoneX::Implementation::Call::Endcallrcvd_event(false);

__ralf__86__call->generate_event(__ralf__87__Endcallrcvd);
Entry of State: RegistrationProcess::RegistrationProcessStateMachine::DefaultRegion::RegistrationFailed

// select one unregsub related by self->UnregisteredSubscriber[R4];
UnregisteredSubscriber unregsub = this->'unregisteredSubscriber';
//send PhoneXPort::RegistrationResult(UserID: unregsub.PhoneNumber, isSuccessfull: true);
send new PhoneXPort_Out::RegistrationResult(UserID=> unregsub.PhoneNumber, isSuccessfull=> false) to PhoneXPort_Out::instances().one();
// generate RegistrationProcess4:'TerminateCmd' to self;
send new RegistrationProcess::Terminatecmd() to this;
::PhoneX::PhoneX::Implementation::UnregisteredSubscriber* __ralf__88__unregsub = this->R4_unregisteredSubscriber;
::std::list< ::PhoneX::PhoneX::Implementation::PhoneXPort_Out > __ralf__89__PhoneXPort_Out = ::PhoneX::PhoneX::Implementation::PhoneXPort_Out::_instances
::PhoneX::PhoneX::Implementation::PhoneXPort_Out::RegistrationResult_event* __ralf__90__RegistrationResult = new ::PhoneX::PhoneX::Implementation::PhoneXPort_Out::RegistrationResult_event(false);
long __ralf__91__long = __ralf__88__unregsub->PhoneNumber;
__ralf__90__RegistrationResult->UserID = __ralf__91__long;
__ralf__90__RegistrationResult->isSuccessfull = false;
::xtuml::select_any(__ralf__89__PhoneXPort_Out)->generate_event(__ralf__90__RegistrationResult);
::PhoneX::PhoneX::Implementation::RegistrationProcess::Terminatecmd_event* __ralf__92__Terminatecmd = new ::PhoneX::PhoneX::Implementation::RegistrationProcess::Terminatecmd_event(false);

this->generate_event(__ralf__92__Terminatecmd);
Entry of State: RegistrationProcess::RegistrationProcessStateMachine::DefaultRegion::RegistrationStarted

// select one unregsub related by self->UnregisteredSubscriber[R4];
UnregisteredSubscriber unregsub = this->'unregisteredSubscriber';
//send DBPort_Out::AddUserIfNotExist(ServiceId: Service::GetServiceId(), UserId: unregsub.PhoneNumber );
send new DBPort_Out::AddUserIfNotExist(ServiceId=> Service::GetServiceId(), UserId=> unregsub.PhoneNumber ) to DBPort_Out::instances().one();
::PhoneX::PhoneX::Implementation::UnregisteredSubscriber* __ralf__93__unregsub = this->R4_unregisteredSubscriber;
::std::list< ::PhoneX::PhoneX::Implementation::DBPort_Out > __ralf__94__DBPort_Out = ::PhoneX::PhoneX::Implementation::DBPort_Out::_instances
::PhoneX::PhoneX::Implementation::DBPort_Out::AddUserIfNotExist_event* __ralf__95__AddUserIfNotExist = new ::PhoneX::PhoneX::Implementation::DBPort_Out::AddUserIfNotExist_event(false);
long __ralf__96__long = ::PhoneX::PhoneX::Implementation::Service::GetServiceId();
long __ralf__97__long = __ralf__93__unregsub->PhoneNumber;
__ralf__95__AddUserIfNotExist->ServiceId = __ralf__96__long;
__ralf__95__AddUserIfNotExist->UserId = __ralf__97__long;
::xtuml::select_any(__ralf__94__DBPort_Out)->generate_event(__ralf__95__AddUserIfNotExist);
Entry of State: RegistrationProcess::RegistrationProcessStateMachine::DefaultRegion::RegistrationSuccesfull

// select one unregsub related by self->UnregisteredSubscriber[R4];
UnregisteredSubscriber unregsub = this->'unregisteredSubscriber';
//send PhoneXPort::RegistrationResult(UserID: unregsub.PhoneNumber, isSuccessfull: true);
send new PhoneXPort_Out::RegistrationResult(UserID=> unregsub.PhoneNumber, isSuccessfull=> true) to PhoneXPort_Out::instances().one();
// generate RegistrationProcess4:'TerminateCmd' to self;
send new RegistrationProcess::Terminatecmd() to this;
::PhoneX::PhoneX::Implementation::UnregisteredSubscriber* __ralf__98__unregsub = this->R4_unregisteredSubscriber;
::std::list< ::PhoneX::PhoneX::Implementation::PhoneXPort_Out > __ralf__99__PhoneXPort_Out = ::PhoneX::PhoneX::Implementation::PhoneXPort_Out::_instances
::PhoneX::PhoneX::Implementation::PhoneXPort_Out::RegistrationResult_event* __ralf__100__RegistrationResult = new ::PhoneX::PhoneX::Implementation::PhoneXPort_Out::RegistrationResult_event(false);
long __ralf__101__long = __ralf__98__unregsub->PhoneNumber;
__ralf__100__RegistrationResult->UserID = __ralf__101__long;
__ralf__100__RegistrationResult->isSuccessfull = true;
::xtuml::select_any(__ralf__99__PhoneXPort_Out)->generate_event(__ralf__100__RegistrationResult);
::PhoneX::PhoneX::Implementation::RegistrationProcess::Terminatecmd_event* __ralf__102__Terminatecmd = new ::PhoneX::PhoneX::Implementation::RegistrationProcess::Terminatecmd_event(false);

this->generate_event(__ralf__102__Terminatecmd);
Entry of State: RegistrationProcess::RegistrationProcessStateMachine::DefaultRegion::Terminated

// select one unregsub related by self->UnregisteredSubscriber[R4];
UnregisteredSubscriber unregsub = this->'unregisteredSubscriber';
// relate unregsub to self across R4;
R4::unlink('registrationProcess'=>this,'unregisteredSubscriber'=>unregsub);
// delete object instance unregsub;
delete unregsub;
// select any service from instances of Service;
Service service = Service::instances().one();
// if not empty service
if((service != null)) {
// relate self to service across R7;
R7::unlink('service'=>service,'registrationProcess'=>this);
// end if;
}
::PhoneX::PhoneX::Implementation::UnregisteredSubscriber* __ralf__103__unregsub = this->R4_unregisteredSubscriber;
this->R4_unregisteredSubscriber = NULL;
::std::list< ::PhoneX::PhoneX::Implementation::RegistrationProcess > __ralf__105__RegistrationProcess = __ralf__103__unregsub->R4_registrationProcess;
__ralf__105__RegistrationProcess.remove(this);;
delete __ralf__103__unregsub;
::std::list< ::PhoneX::PhoneX::Implementation::Service > __ralf__106__Service = ::PhoneX::PhoneX::Implementation::Service::_instances
::PhoneX::PhoneX::Implementation::Service* __ralf__105__service = ::xtuml::select_any(__ralf__106__Service);
bool __ralf__107__bool = __ralf__105__service != 0;
if (__ralf__107__bool) {
::std::list< ::PhoneX::PhoneX::Implementation::RegistrationProcess > __ralf__108__1__RegistrationProcess = service->R7_registrationProcess;
__ralf__108__1__RegistrationProcess.remove(this);;
this->R7_service = NULL;
}
Entry of State: UnregistrationProcess::UnregistrationProcessStateMachine::DefaultRegion::Terminated

// select one regsub related by self->RegisteredSubscriber[R5];
RegisteredSubscriber regsub = this->'registeredSubscriber';
// relate regsub to self across R5;
R5::unlink('unregistrationProcess'=>this,'registeredSubscriber'=>regsub);
// delete object instance regsub;
delete regsub;
// select any service from instances of Service;
Service service = Service::instances().one();
// if not empty service
if((!(service == null))) {
// relate self to service across R8;
R8::unlink('service'=>service,'unregistrationProcess'=>this);
// end if;
}
::PhoneX::PhoneX::Implementation::RegisteredSubscriber* __ralf__108__regsub = this->R5_registeredSubscriber;
this->R5_registeredSubscriber = NULL;
__ralf__108__regsub->R5_unregistrationProcess = NULL;
delete __ralf__108__regsub;
::std::list< ::PhoneX::PhoneX::Implementation::Service > __ralf__110__Service = ::PhoneX::PhoneX::Implementation::Service::_instances
::PhoneX::PhoneX::Implementation::Service* __ralf__109__service = ::xtuml::select_any(__ralf__110__Service);
bool __ralf__111__bool = __ralf__109__service == 0;
bool __ralf__112__bool = !__ralf__111__bool;
if (__ralf__112__bool) {
::std::list< ::PhoneX::PhoneX::Implementation::UnregistrationProcess > __ralf__113__1__UnregistrationProcess = service->R8_unregistrationProcess;
__ralf__113__1__UnregistrationProcess.remove(this);;
this->R8_service = NULL;
}
Entry of State: UnregistrationProcess::UnregistrationProcessStateMachine::DefaultRegion::UnregistrationFailed

NO rALF CODE
Entry of State: UnregistrationProcess::UnregistrationProcessStateMachine::DefaultRegion::UnregistrationStarted

// select one regsub related by self->RegisteredSubscriber[R5];
RegisteredSubscriber regsub = this->'registeredSubscriber';
//send DBPort_Out::RemoveUserIfExist(ServiceId: Service::GetServiceId(), UserId: regsub.PhoneNumber );
send new DBPort_Out::RemoveUserIfExist(ServiceId=> Service::GetServiceId(), UserId=> regsub.PhoneNumber ) to DBPort_Out::instances().one();
::PhoneX::PhoneX::Implementation::RegisteredSubscriber* __ralf__113__regsub = this->R5_registeredSubscriber;
::std::list< ::PhoneX::PhoneX::Implementation::DBPort_Out > __ralf__114__DBPort_Out = ::PhoneX::PhoneX::Implementation::DBPort_Out::_instances
::PhoneX::PhoneX::Implementation::DBPort_Out::RemoveUserIfExist_event* __ralf__115__RemoveUserIfExist = new ::PhoneX::PhoneX::Implementation::DBPort_Out::RemoveUserIfExist_event(false);
long __ralf__116__long = ::PhoneX::PhoneX::Implementation::Service::GetServiceId();
long __ralf__117__long = __ralf__113__regsub->PhoneNumber;
__ralf__115__RemoveUserIfExist->ServiceId = __ralf__116__long;
__ralf__115__RemoveUserIfExist->UserId = __ralf__117__long;
::xtuml::select_any(__ralf__114__DBPort_Out)->generate_event(__ralf__115__RemoveUserIfExist);
Entry of State: UnregistrationProcess::UnregistrationProcessStateMachine::DefaultRegion::UnregistrationSuccessfull

// select one regsub related by self->RegisteredSubscriber[R5];
RegisteredSubscriber regsub = this->'registeredSubscriber';
//send PhoneXPort::UnregistrationResult(UserID: regsub.PhoneNumber, isSuccessfull: true);
send new PhoneXPort_Out::UnregistrationResult(UserID=> regsub.PhoneNumber, isSuccessfull=> true) to PhoneXPort_Out::instances().one();
// generate UnregistrationProcess4:'TerminateCmd' to self;
send new UnregistrationProcess::Terminatecmd() to this;
::PhoneX::PhoneX::Implementation::RegisteredSubscriber* __ralf__118__regsub = this->R5_registeredSubscriber;
::std::list< ::PhoneX::PhoneX::Implementation::PhoneXPort_Out > __ralf__119__PhoneXPort_Out = ::PhoneX::PhoneX::Implementation::PhoneXPort_Out::_instances
::PhoneX::PhoneX::Implementation::PhoneXPort_Out::UnregistrationResult_event* __ralf__120__UnregistrationResult = new ::PhoneX::PhoneX::Implementation::PhoneXPort_Out::UnregistrationResult_event(false);
long __ralf__121__long = __ralf__118__regsub->PhoneNumber;
__ralf__120__UnregistrationResult->UserID = __ralf__121__long;
__ralf__120__UnregistrationResult->isSuccessfull = true;
::xtuml::select_any(__ralf__119__PhoneXPort_Out)->generate_event(__ralf__120__UnregistrationResult);
::PhoneX::PhoneX::Implementation::UnregistrationProcess::Terminatecmd_event* __ralf__122__Terminatecmd = new ::PhoneX::PhoneX::Implementation::UnregistrationProcess::Terminatecmd_event(false);

this->generate_event(__ralf__122__Terminatecmd);
Effect of Transition: DBPort_In::DBPort_InSM::Region1::AddUserResponse

//check if it's mine ServiceID
if(sigdata.'ServiceId' != Service::GetServiceId() && (sigdata.'ServiceId' !=0) ){//this is not related to me
return;
}
UnregisteredSubscriber unregsub = UnregisteredSubscriber::instances().filter(selected: selected.PhoneNumber == sigdata.UserId).one();
if(unregsub==null){
TRACE::traceError(msg=>"PhoneX/DBPort/AddUserResponse - Registration result (AddUserResponse) received for unknown user");
return;
}
RegistrationProcess regproc = unregsub->registrationProcess.one();
if(sigdata.'isSuccessfull' == true){
send new RegistrationProcess::Registrationconfirmed() to regproc;
}
else {
send new RegistrationProcess::Registrationnotconfirmed() to regproc;
}
long __ralf__123__long = casted_const_event->ServiceId;
long __ralf__124__long = ::PhoneX::PhoneX::Implementation::Service::GetServiceId();
bool __ralf__125__bool = __ralf__123__long != __ralf__124__long;
long __ralf__126__long = casted_const_event->ServiceId;
bool __ralf__127__bool = __ralf__126__long != 0;
bool __ralf__128__bool = __ralf__125__bool && __ralf__127__bool;
if (__ralf__128__bool) {
return;
}
::std::list< ::PhoneX::PhoneX::Implementation::UnregisteredSubscriber > __ralf__134__UnregisteredSubscriber = ::PhoneX::PhoneX::Implementation::UnregisteredSubscriber::_instances
::PhoneX::PhoneX::Implementation::UnregisteredSubscriber* __ralf__129__unregsub = ::xtuml::select_any_where<::PhoneX::PhoneX::Implementation::UnregisteredSubscriber*>(__ralf__134__UnregisteredSubscriber, [&](::PhoneX::PhoneX::Implementation::UnregisteredSubscriber* selected) {
long __ralf__131__long = selected->PhoneNumber;
long __ralf__132__long = casted_const_event->UserId;
bool __ralf__133__bool = __ralf__131__long == __ralf__132__long;
return __ralf__133__bool;
});
bool __ralf__135__bool = __ralf__129__unregsub == 0;
if (__ralf__135__bool) {
::PhoneX::PhoneX::Implementation::TRACE::traceError("PhoneX/DBPort/AddUserResponse - Registration result (AddUserResponse) received for unknown user");
return;
}
::PhoneX::PhoneX::Implementation::RegistrationProcess* __ralf__136__regproc = ::xtuml::select_any(__ralf__129__unregsub->R4_registrationProcess);
bool __ralf__137__bool = casted_const_event->isSuccessfull;
bool __ralf__138__bool = __ralf__137__bool == true;
if (__ralf__138__bool) {
::PhoneX::PhoneX::Implementation::RegistrationProcess::Registrationconfirmed_event* __ralf__139__0__Registrationconfirmed = new ::PhoneX::PhoneX::Implementation::RegistrationProcess::Registrationconfirmed_event(false);

regproc->generate_event(__ralf__139__0__Registrationconfirmed);
} else {
::PhoneX::PhoneX::Implementation::RegistrationProcess::Registrationnotconfirmed_event* __ralf__139__0__Registrationnotconfirmed = new ::PhoneX::PhoneX::Implementation::RegistrationProcess::Registrationnotconfirmed_event(false);

regproc->generate_event(__ralf__139__0__Registrationnotconfirmed);
}
Effect of Transition: DBPort_In::DBPort_InSM::Region1::RemoveUserResponse

//check if it's mine ServiceID
if(sigdata.'ServiceId' != Service::GetServiceId() && (sigdata.'ServiceId' !=0) ){//this is not related to me
return;
}
UnregisteredSubscriber unregsub = UnregisteredSubscriber::instances().filter(selected : selected.PhoneNumber == sigdata.UserId).one();
if(unregsub==null){
TRACE::traceError(msg=>"PhoneX/DBPort/AddUserResponse - Registration result (AddUserResponse) received for unknown user");
return;
}
RegistrationProcess regproc = unregsub->registrationProcess.one();
if(sigdata.'isSuccessfull' == true){
send new RegistrationProcess::Registrationconfirmed() to regproc;
}
else {
send new RegistrationProcess::Registrationnotconfirmed() to regproc;
}
long __ralf__139__long = casted_const_event->ServiceId;
long __ralf__140__long = ::PhoneX::PhoneX::Implementation::Service::GetServiceId();
bool __ralf__141__bool = __ralf__139__long != __ralf__140__long;
long __ralf__142__long = casted_const_event->ServiceId;
bool __ralf__143__bool = __ralf__142__long != 0;
bool __ralf__144__bool = __ralf__141__bool && __ralf__143__bool;
if (__ralf__144__bool) {
return;
}
::std::list< ::PhoneX::PhoneX::Implementation::UnregisteredSubscriber > __ralf__150__UnregisteredSubscriber = ::PhoneX::PhoneX::Implementation::UnregisteredSubscriber::_instances
::PhoneX::PhoneX::Implementation::UnregisteredSubscriber* __ralf__145__unregsub = ::xtuml::select_any_where<::PhoneX::PhoneX::Implementation::UnregisteredSubscriber*>(__ralf__150__UnregisteredSubscriber, [&](::PhoneX::PhoneX::Implementation::UnregisteredSubscriber* selected) {
long __ralf__147__long = selected->PhoneNumber;
long __ralf__148__long = casted_const_event->UserId;
bool __ralf__149__bool = __ralf__147__long == __ralf__148__long;
return __ralf__149__bool;
});
bool __ralf__151__bool = __ralf__145__unregsub == 0;
if (__ralf__151__bool) {
::PhoneX::PhoneX::Implementation::TRACE::traceError("PhoneX/DBPort/AddUserResponse - Registration result (AddUserResponse) received for unknown user");
return;
}
::PhoneX::PhoneX::Implementation::RegistrationProcess* __ralf__152__regproc = ::xtuml::select_any(__ralf__145__unregsub->R4_registrationProcess);
bool __ralf__153__bool = casted_const_event->isSuccessfull;
bool __ralf__154__bool = __ralf__153__bool == true;
if (__ralf__154__bool) {
::PhoneX::PhoneX::Implementation::RegistrationProcess::Registrationconfirmed_event* __ralf__155__0__Registrationconfirmed = new ::PhoneX::PhoneX::Implementation::RegistrationProcess::Registrationconfirmed_event(false);

regproc->generate_event(__ralf__155__0__Registrationconfirmed);
} else {
::PhoneX::PhoneX::Implementation::RegistrationProcess::Registrationnotconfirmed_event* __ralf__155__0__Registrationnotconfirmed = new ::PhoneX::PhoneX::Implementation::RegistrationProcess::Registrationnotconfirmed_event(false);

regproc->generate_event(__ralf__155__0__Registrationnotconfirmed);
}
Effect of Transition: DBPort_In::DBPort_InSM::Region1::SetUserResponseStatus

if((sigdata.ServiceId != Service::GetServiceId()) && (sigdata.ServiceId !=0) ){//not for me
return;
}
Subscriber subscriber = Subscriber::instances().filter(selected:selected.PhoneNumber == sigdata.UserId).one();
if(subscriber == null){
TRACE::traceError(msg=> "PhoneX/DBPort/SetUserStatusResponse - UserStatus signal missrouted!");
return;//this is not good LOG this
}

if(sigdata.isSuccessfull==true){
send new Subscriber::Userupdatesuccess() to subscriber;
}
else{
send new Subscriber::Userupdatefail() to subscriber;
}
long __ralf__155__long = casted_const_event->ServiceId;
long __ralf__156__long = ::PhoneX::PhoneX::Implementation::Service::GetServiceId();
bool __ralf__157__bool = __ralf__155__long != __ralf__156__long;
long __ralf__158__long = casted_const_event->ServiceId;
bool __ralf__159__bool = __ralf__158__long != 0;
bool __ralf__160__bool = __ralf__157__bool && __ralf__159__bool;
if (__ralf__160__bool) {
return;
}
::std::list< ::PhoneX::PhoneX::Implementation::Subscriber > __ralf__166__Subscriber = ::PhoneX::PhoneX::Implementation::Subscriber::_instances
::PhoneX::PhoneX::Implementation::Subscriber* __ralf__161__subscriber = ::xtuml::select_any_where<::PhoneX::PhoneX::Implementation::Subscriber*>(__ralf__166__Subscriber, [&](::PhoneX::PhoneX::Implementation::Subscriber* selected) {
long __ralf__163__long = selected->PhoneNumber;
long __ralf__164__long = casted_const_event->UserId;
bool __ralf__165__bool = __ralf__163__long == __ralf__164__long;
return __ralf__165__bool;
});
bool __ralf__167__bool = __ralf__161__subscriber == 0;
if (__ralf__167__bool) {
::PhoneX::PhoneX::Implementation::TRACE::traceError("PhoneX/DBPort/SetUserStatusResponse - UserStatus signal missrouted!");
return;
}
bool __ralf__168__bool = casted_const_event->isSuccessfull;
bool __ralf__169__bool = __ralf__168__bool == true;
if (__ralf__169__bool) {
::PhoneX::PhoneX::Implementation::Subscriber::Userupdatesuccess_event* __ralf__170__0__Userupdatesuccess = new ::PhoneX::PhoneX::Implementation::Subscriber::Userupdatesuccess_event(false);

subscriber->generate_event(__ralf__170__0__Userupdatesuccess);
} else {
::PhoneX::PhoneX::Implementation::Subscriber::Userupdatefail_event* __ralf__170__0__Userupdatefail = new ::PhoneX::PhoneX::Implementation::Subscriber::Userupdatefail_event(false);

subscriber->generate_event(__ralf__170__0__Userupdatefail);
}
Effect of Transition: DBPort_In::DBPort_InSM::Region1::UserStatus

if((sigdata.'ServiceId' != Service::GetServiceId()) && (sigdata.'ServiceId' !=0) ){//not for me
return;
}
Subscriber subscriber = Subscriber::instances().filter(selected: selected.PhoneNumber == sigdata.UserId).one();
if(subscriber == null){
TRACE::traceError(msg=> "PhoneX/DBPort/UserStatus - UserStatus signal missrouted!");
return;//this is not good LOG this
}

if(sigdata.'isKnown' == false){
send new Subscriber::Userstatusunknown() to subscriber;
}
else if (sigdata.'isBusy' == false){
send new Subscriber::Userstatusfree() to subscriber;
}
else{
send new Subscriber::Userstatusbusy() to subscriber;
}
long __ralf__170__long = casted_const_event->ServiceId;
long __ralf__171__long = ::PhoneX::PhoneX::Implementation::Service::GetServiceId();
bool __ralf__172__bool = __ralf__170__long != __ralf__171__long;
long __ralf__173__long = casted_const_event->ServiceId;
bool __ralf__174__bool = __ralf__173__long != 0;
bool __ralf__175__bool = __ralf__172__bool && __ralf__174__bool;
if (__ralf__175__bool) {
return;
}
::std::list< ::PhoneX::PhoneX::Implementation::Subscriber > __ralf__181__Subscriber = ::PhoneX::PhoneX::Implementation::Subscriber::_instances
::PhoneX::PhoneX::Implementation::Subscriber* __ralf__176__subscriber = ::xtuml::select_any_where<::PhoneX::PhoneX::Implementation::Subscriber*>(__ralf__181__Subscriber, [&](::PhoneX::PhoneX::Implementation::Subscriber* selected) {
long __ralf__178__long = selected->PhoneNumber;
long __ralf__179__long = casted_const_event->UserId;
bool __ralf__180__bool = __ralf__178__long == __ralf__179__long;
return __ralf__180__bool;
});
bool __ralf__182__bool = __ralf__176__subscriber == 0;
if (__ralf__182__bool) {
::PhoneX::PhoneX::Implementation::TRACE::traceError("PhoneX/DBPort/UserStatus - UserStatus signal missrouted!");
return;
}
bool __ralf__183__bool = casted_const_event->isKnown;
bool __ralf__184__bool = __ralf__183__bool == false;
bool __ralf__185__bool = casted_const_event->isBusy;
bool __ralf__186__bool = __ralf__185__bool == false;
if (__ralf__184__bool) {
::PhoneX::PhoneX::Implementation::Subscriber::Userstatusunknown_event* __ralf__185__0__Userstatusunknown = new ::PhoneX::PhoneX::Implementation::Subscriber::Userstatusunknown_event(false);

subscriber->generate_event(__ralf__185__0__Userstatusunknown);
} else if (__ralf__186__bool) {
::PhoneX::PhoneX::Implementation::Subscriber::Userstatusfree_event* __ralf__187__0__Userstatusfree = new ::PhoneX::PhoneX::Implementation::Subscriber::Userstatusfree_event(false);

subscriber->generate_event(__ralf__187__0__Userstatusfree);
} else {
::PhoneX::PhoneX::Implementation::Subscriber::Userstatusbusy_event* __ralf__187__0__Userstatusbusy = new ::PhoneX::PhoneX::Implementation::Subscriber::Userstatusbusy_event(false);

subscriber->generate_event(__ralf__187__0__Userstatusbusy);
}
Effect of Transition: DBPort_Out::DBPort_InSM::Region1::AddUserIfNotExists

User user = User::instances().filter(selected: selected.ID == sigdata.UserId).one();
if( user ==null){ //add one, send back Success!
user = new User(UserId=>sigdata.UserId,Busy=>false);
send new DBPort_In::AddUserResponse(ServiceId=> sigdata.ServiceId, UserId=> user.ID, isSuccessfull=> true) to DBPort_In::instances().one();
}
else{
//not empty, already there, send back NoSuccess!
send new DBPort_In::AddUserResponse(ServiceId=> sigdata.ServiceId, UserId=> user.ID, isSuccessfull=> false) to DBPort_In::instances().one();
}
::std::list< ::PhoneX::PhoneX::Implementation::User > __ralf__192__User = ::PhoneX::PhoneX::Implementation::User::_instances
::PhoneX::PhoneX::Implementation::User* __ralf__187__user = ::xtuml::select_any_where<::PhoneX::PhoneX::Implementation::User*>(__ralf__192__User, [&](::PhoneX::PhoneX::Implementation::User* selected) {
long __ralf__189__long = selected->ID;
long __ralf__190__long = casted_const_event->UserId;
bool __ralf__191__bool = __ralf__189__long == __ralf__190__long;
return __ralf__191__bool;
});
bool __ralf__193__bool = __ralf__187__user == 0;
if (__ralf__193__bool) {
::PhoneX::PhoneX::Implementation::User* __ralf__194__0__User = new ::PhoneX::PhoneX::Implementation::User();
user = __ralf__194__0__User;
::std::list< ::PhoneX::PhoneX::Implementation::DBPort_In > __ralf__194__1__DBPort_In = ::PhoneX::PhoneX::Implementation::DBPort_In::_instances
::PhoneX::PhoneX::Implementation::DBPort_In::AddUserResponse_event* __ralf__194__2__AddUserResponse = new ::PhoneX::PhoneX::Implementation::DBPort_In::AddUserResponse_event(false);
long __ralf__194__3__long = casted_const_event->ServiceId;
long __ralf__194__4__long = user->ID;
__ralf__194__2__AddUserResponse->ServiceId = __ralf__194__3__long;
__ralf__194__2__AddUserResponse->UserId = __ralf__194__4__long;
__ralf__194__2__AddUserResponse->isSuccessfull = true;
::xtuml::select_any(__ralf__194__1__DBPort_In)->generate_event(__ralf__194__2__AddUserResponse);
} else {
::std::list< ::PhoneX::PhoneX::Implementation::DBPort_In > __ralf__194__0__DBPort_In = ::PhoneX::PhoneX::Implementation::DBPort_In::_instances
::PhoneX::PhoneX::Implementation::DBPort_In::AddUserResponse_event* __ralf__194__1__AddUserResponse = new ::PhoneX::PhoneX::Implementation::DBPort_In::AddUserResponse_event(false);
long __ralf__194__2__long = casted_const_event->ServiceId;
long __ralf__194__3__long = user->ID;
__ralf__194__1__AddUserResponse->ServiceId = __ralf__194__2__long;
__ralf__194__1__AddUserResponse->UserId = __ralf__194__3__long;
__ralf__194__1__AddUserResponse->isSuccessfull = false;
::xtuml::select_any(__ralf__194__0__DBPort_In)->generate_event(__ralf__194__1__AddUserResponse);
}
Effect of Transition: DBPort_Out::DBPort_InSM::Region1::GetUserStatus

User user = User::instances().filter(selected: selected.ID == sigdata.UserId).one();
if (user==null){ //no such user! FALSE
send new DBPort_In::UserStatus(ServiceId=> sigdata.ServiceId, UserId=> sigdata.UserId, isBusy=> false, isKnown=> false) to DBPort_In::instances().one();
}
else{
//USER - send UserStatus with what we have
send new DBPort_In::UserStatus(ServiceId=> sigdata.ServiceId, UserId=> user.ID, isBusy=> user.Busy, isKnown=> true) to DBPort_In::instances().one();
}
::std::list< ::PhoneX::PhoneX::Implementation::User > __ralf__199__User = ::PhoneX::PhoneX::Implementation::User::_instances
::PhoneX::PhoneX::Implementation::User* __ralf__194__user = ::xtuml::select_any_where<::PhoneX::PhoneX::Implementation::User*>(__ralf__199__User, [&](::PhoneX::PhoneX::Implementation::User* selected) {
long __ralf__196__long = selected->ID;
long __ralf__197__long = casted_const_event->UserId;
bool __ralf__198__bool = __ralf__196__long == __ralf__197__long;
return __ralf__198__bool;
});
bool __ralf__200__bool = __ralf__194__user == 0;
if (__ralf__200__bool) {
::std::list< ::PhoneX::PhoneX::Implementation::DBPort_In > __ralf__201__0__DBPort_In = ::PhoneX::PhoneX::Implementation::DBPort_In::_instances
::PhoneX::PhoneX::Implementation::DBPort_In::UserStatus_event* __ralf__201__1__UserStatus = new ::PhoneX::PhoneX::Implementation::DBPort_In::UserStatus_event(false);
long __ralf__201__2__long = casted_const_event->ServiceId;
long __ralf__201__3__long = casted_const_event->UserId;
__ralf__201__1__UserStatus->ServiceId = __ralf__201__2__long;
__ralf__201__1__UserStatus->UserId = __ralf__201__3__long;
__ralf__201__1__UserStatus->isBusy = false;
__ralf__201__1__UserStatus->isKnown = false;
::xtuml::select_any(__ralf__201__0__DBPort_In)->generate_event(__ralf__201__1__UserStatus);
} else {
::std::list< ::PhoneX::PhoneX::Implementation::DBPort_In > __ralf__201__0__DBPort_In = ::PhoneX::PhoneX::Implementation::DBPort_In::_instances
::PhoneX::PhoneX::Implementation::DBPort_In::UserStatus_event* __ralf__201__1__UserStatus = new ::PhoneX::PhoneX::Implementation::DBPort_In::UserStatus_event(false);
long __ralf__201__2__long = casted_const_event->ServiceId;
long __ralf__201__3__long = user->ID;
bool __ralf__201__4__bool = user->Busy;
__ralf__201__1__UserStatus->ServiceId = __ralf__201__2__long;
__ralf__201__1__UserStatus->UserId = __ralf__201__3__long;
__ralf__201__1__UserStatus->isBusy = __ralf__201__4__bool;
__ralf__201__1__UserStatus->isKnown = true;
::xtuml::select_any(__ralf__201__0__DBPort_In)->generate_event(__ralf__201__1__UserStatus);
}
Effect of Transition: DBPort_Out::DBPort_InSM::Region1::RemoveUserIfExists

User user = User::instances().filter(selected: selected.ID == sigdata.UserId).one();
if( user !=null){ //add one, send back Success!
send new DBPort_In::RemoveUserResponse(ServiceId=> sigdata.ServiceId, UserId=> user.ID, isSuccessfull=> true) to DBPort_In::instances().one();
delete user;
}
else{
//not empty, already there, send back NoSuccess!
send new DBPort_In::RemoveUserResponse(ServiceId=> sigdata.ServiceId, UserId=> sigdata.UserId, isSuccessfull=> false) to DBPort_In::instances().one();
}
::std::list< ::PhoneX::PhoneX::Implementation::User > __ralf__206__User = ::PhoneX::PhoneX::Implementation::User::_instances
::PhoneX::PhoneX::Implementation::User* __ralf__201__user = ::xtuml::select_any_where<::PhoneX::PhoneX::Implementation::User*>(__ralf__206__User, [&](::PhoneX::PhoneX::Implementation::User* selected) {
long __ralf__203__long = selected->ID;
long __ralf__204__long = casted_const_event->UserId;
bool __ralf__205__bool = __ralf__203__long == __ralf__204__long;
return __ralf__205__bool;
});
bool __ralf__207__bool = __ralf__201__user != 0;
if (__ralf__207__bool) {
::std::list< ::PhoneX::PhoneX::Implementation::DBPort_In > __ralf__208__0__DBPort_In = ::PhoneX::PhoneX::Implementation::DBPort_In::_instances
::PhoneX::PhoneX::Implementation::DBPort_In::RemoveUserResponse_event* __ralf__208__1__RemoveUserResponse = new ::PhoneX::PhoneX::Implementation::DBPort_In::RemoveUserResponse_event(false);
long __ralf__208__2__long = casted_const_event->ServiceId;
long __ralf__208__3__long = user->ID;
__ralf__208__1__RemoveUserResponse->ServiceId = __ralf__208__2__long;
__ralf__208__1__RemoveUserResponse->UserId = __ralf__208__3__long;
__ralf__208__1__RemoveUserResponse->isSuccessfull = true;
::xtuml::select_any(__ralf__208__0__DBPort_In)->generate_event(__ralf__208__1__RemoveUserResponse);
delete user;
} else {
::std::list< ::PhoneX::PhoneX::Implementation::DBPort_In > __ralf__208__0__DBPort_In = ::PhoneX::PhoneX::Implementation::DBPort_In::_instances
::PhoneX::PhoneX::Implementation::DBPort_In::RemoveUserResponse_event* __ralf__208__1__RemoveUserResponse = new ::PhoneX::PhoneX::Implementation::DBPort_In::RemoveUserResponse_event(false);
long __ralf__208__2__long = casted_const_event->ServiceId;
long __ralf__208__3__long = casted_const_event->UserId;
__ralf__208__1__RemoveUserResponse->ServiceId = __ralf__208__2__long;
__ralf__208__1__RemoveUserResponse->UserId = __ralf__208__3__long;
__ralf__208__1__RemoveUserResponse->isSuccessfull = false;
::xtuml::select_any(__ralf__208__0__DBPort_In)->generate_event(__ralf__208__1__RemoveUserResponse);
}
Effect of Transition: DBPort_Out::DBPort_InSM::Region1::SetUserStatus

User user = User::instances().filter(selected: selected.ID == sigdata.UserId).one();
if( user ==null){ //add one, send back Success!
send new DBPort_In::SetUserStatusResponse(ServiceId=> sigdata.ServiceId, UserId=> sigdata.UserId, isSuccessfull=> false) to DBPort_In::instances().one();
}
else{
user.Busy=sigdata.isBusy;
send new DBPort_In::SetUserStatusResponse(ServiceId=> sigdata.ServiceId, UserId=> user.ID, isSuccessfull=> true) to DBPort_In::instances().one();
}
::std::list< ::PhoneX::PhoneX::Implementation::User > __ralf__213__User = ::PhoneX::PhoneX::Implementation::User::_instances
::PhoneX::PhoneX::Implementation::User* __ralf__208__user = ::xtuml::select_any_where<::PhoneX::PhoneX::Implementation::User*>(__ralf__213__User, [&](::PhoneX::PhoneX::Implementation::User* selected) {
long __ralf__210__long = selected->ID;
long __ralf__211__long = casted_const_event->UserId;
bool __ralf__212__bool = __ralf__210__long == __ralf__211__long;
return __ralf__212__bool;
});
bool __ralf__214__bool = __ralf__208__user == 0;
if (__ralf__214__bool) {
::std::list< ::PhoneX::PhoneX::Implementation::DBPort_In > __ralf__215__0__DBPort_In = ::PhoneX::PhoneX::Implementation::DBPort_In::_instances
::PhoneX::PhoneX::Implementation::DBPort_In::SetUserStatusResponse_event* __ralf__215__1__SetUserStatusResponse = new ::PhoneX::PhoneX::Implementation::DBPort_In::SetUserStatusResponse_event(false);
long __ralf__215__2__long = casted_const_event->ServiceId;
long __ralf__215__3__long = casted_const_event->UserId;
__ralf__215__1__SetUserStatusResponse->ServiceId = __ralf__215__2__long;
__ralf__215__1__SetUserStatusResponse->UserId = __ralf__215__3__long;
__ralf__215__1__SetUserStatusResponse->isSuccessfull = false;
::xtuml::select_any(__ralf__215__0__DBPort_In)->generate_event(__ralf__215__1__SetUserStatusResponse);
} else {
bool __ralf__215__0__bool = casted_const_event->isBusy;
user->Busy = __ralf__215__0__bool;
::std::list< ::PhoneX::PhoneX::Implementation::DBPort_In > __ralf__215__1__DBPort_In = ::PhoneX::PhoneX::Implementation::DBPort_In::_instances
::PhoneX::PhoneX::Implementation::DBPort_In::SetUserStatusResponse_event* __ralf__215__2__SetUserStatusResponse = new ::PhoneX::PhoneX::Implementation::DBPort_In::SetUserStatusResponse_event(false);
long __ralf__215__3__long = casted_const_event->ServiceId;
long __ralf__215__4__long = user->ID;
__ralf__215__2__SetUserStatusResponse->ServiceId = __ralf__215__3__long;
__ralf__215__2__SetUserStatusResponse->UserId = __ralf__215__4__long;
__ralf__215__2__SetUserStatusResponse->isSuccessfull = true;
::xtuml::select_any(__ralf__215__1__DBPort_In)->generate_event(__ralf__215__2__SetUserStatusResponse);
}
Effect of Transition: PhoneXPort_In::PhoneXPort_InSM::Region1::AcceptCall

Called called = Called::instances().filter(selected:selected.PhoneNumber == sigdata.UserID).one();
if(called == null){
TRACE::traceError(msg=>"AcceptCall: no such called subscriber");
}
else{
PhoneX::PhoneX::Implementation::Call call = called->call;
send new PhoneX::PhoneX::Implementation::Call::Callrequestaccepted() to call;
}
::std::list< ::PhoneX::PhoneX::Implementation::Called > __ralf__220__Called = ::PhoneX::PhoneX::Implementation::Called::_instances
::PhoneX::PhoneX::Implementation::Called* __ralf__215__called = ::xtuml::select_any_where<::PhoneX::PhoneX::Implementation::Called*>(__ralf__220__Called, [&](::PhoneX::PhoneX::Implementation::Called* selected) {
long __ralf__217__long = selected->PhoneNumber;
long __ralf__218__long = casted_const_event->UserID;
bool __ralf__219__bool = __ralf__217__long == __ralf__218__long;
return __ralf__219__bool;
});
bool __ralf__221__bool = __ralf__215__called == 0;
if (__ralf__221__bool) {
::PhoneX::PhoneX::Implementation::TRACE::traceError("AcceptCall: no such called subscriber");
} else {
::PhoneX::PhoneX::Implementation::Call* __ralf__222__0__call = called->R3_call;
::PhoneX::PhoneX::Implementation::Call::Callrequestaccepted_event* __ralf__222__1__Callrequestaccepted = new ::PhoneX::PhoneX::Implementation::Call::Callrequestaccepted_event(false);

__ralf__222__0__call->generate_event(__ralf__222__1__Callrequestaccepted);
}
Effect of Transition: PhoneXPort_In::PhoneXPort_InSM::Region1::Call

Service::SetServiceId(serviceId=> sigdata.ServiceId);
//check if there are local caller or called
Subscriber subscriber = Subscriber::instances().filter(selected: selected.PhoneNumber==sigdata.CallerID || selected.PhoneNumber==sigdata.CalledID).one();
if(subscriber!=null){
send new PhoneXPort_Out::LineIsBusy(UserID=> sigdata.CallerID) to subscriber;
}
else{
if(sigdata.CallerID==sigdata.CalledID){
send new PhoneX::PhoneX::Implementation::PhoneXPort_Out::TerminateCall(UserID=> sigdata.CallerID) to PhoneXPort_Out::instances().one();
}
else{
Caller caller = new Caller();
caller.PhoneNumber=sigdata.CallerID;


Called called = new Called();
called.PhoneNumber=sigdata.CalledID;

PhoneX::PhoneX::Implementation::Call call = new PhoneX::PhoneX::Implementation::Call();
Service service = Service::instances().one();
if(service==null){
service = new Service();
service.ServiceId=0;
}
R6::link(call=>call,service=>service);
R2::link(call=>call,caller=>caller);
R3::link(call=>call,called=>called);

send new PhoneX::PhoneX::Implementation::Call::Callrcvd() to call;
}
}
long __ralf__222__long = casted_const_event->ServiceId;
::PhoneX::PhoneX::Implementation::Service::SetServiceId(__ralf__222__long);
::std::list< ::PhoneX::PhoneX::Implementation::Subscriber > __ralf__232__Subscriber = ::PhoneX::PhoneX::Implementation::Subscriber::_instances
::PhoneX::PhoneX::Implementation::Subscriber* __ralf__223__subscriber = ::xtuml::select_any_where<::PhoneX::PhoneX::Implementation::Subscriber*>(__ralf__232__Subscriber, [&](::PhoneX::PhoneX::Implementation::Subscriber* selected) {
long __ralf__225__long = selected->PhoneNumber;
long __ralf__226__long = casted_const_event->CallerID;
bool __ralf__227__bool = __ralf__225__long == __ralf__226__long;
long __ralf__228__long = selected->PhoneNumber;
long __ralf__229__long = casted_const_event->CalledID;
bool __ralf__230__bool = __ralf__228__long == __ralf__229__long;
bool __ralf__231__bool = __ralf__227__bool || __ralf__230__bool;
return __ralf__231__bool;
});
bool __ralf__233__bool = __ralf__223__subscriber != 0;
if (__ralf__233__bool) {
::PhoneX::PhoneX::Implementation::PhoneXPort_Out::LineIsBusy_event* __ralf__234__0__LineIsBusy = new ::PhoneX::PhoneX::Implementation::PhoneXPort_Out::LineIsBusy_event(false);
long __ralf__234__1__long = casted_const_event->CallerID;
__ralf__234__0__LineIsBusy->UserID = __ralf__234__1__long;
subscriber->generate_event(__ralf__234__0__LineIsBusy);
} else {
long __ralf__234__0__long = casted_const_event->CallerID;
long __ralf__234__1__long = casted_const_event->CalledID;
bool __ralf__234__2__bool = __ralf__234__0__long == __ralf__234__1__long;
if (__ralf__234__2__bool) {
::std::list< ::PhoneX::PhoneX::Implementation::PhoneXPort_Out > __ralf__234__3__0__PhoneXPort_Out = ::PhoneX::PhoneX::Implementation::PhoneXPort_Out::_instances
::PhoneX::PhoneX::Implementation::PhoneXPort_Out::TerminateCall_event* __ralf__234__3__1__TerminateCall = new ::PhoneX::PhoneX::Implementation::PhoneXPort_Out::TerminateCall_event(false);
long __ralf__234__3__2__long = casted_const_event->CallerID;
__ralf__234__3__1__TerminateCall->UserID = __ralf__234__3__2__long;
::xtuml::select_any(__ralf__234__3__0__PhoneXPort_Out)->generate_event(__ralf__234__3__1__TerminateCall);
} else {
::PhoneX::PhoneX::Implementation::Caller* __ralf__234__3__0__caller = new ::PhoneX::PhoneX::Implementation::Caller();
long __ralf__234__3__1__long = casted_const_event->CallerID;
__ralf__234__3__0__caller->PhoneNumber = __ralf__234__3__1__long;
::PhoneX::PhoneX::Implementation::Called* __ralf__234__3__2__called = new ::PhoneX::PhoneX::Implementation::Called();
long __ralf__234__3__3__long = casted_const_event->CalledID;
__ralf__234__3__2__called->PhoneNumber = __ralf__234__3__3__long;
::PhoneX::PhoneX::Implementation::Call* __ralf__234__3__4__call = new ::PhoneX::PhoneX::Implementation::Call();
::std::list< ::PhoneX::PhoneX::Implementation::Service > __ralf__234__3__6__Service = ::PhoneX::PhoneX::Implementation::Service::_instances
::PhoneX::PhoneX::Implementation::Service* __ralf__234__3__5__service = ::xtuml::select_any(__ralf__234__3__6__Service);
bool __ralf__234__3__7__bool = __ralf__234__3__5__service == 0;
if (__ralf__234__3__7__bool) {
::PhoneX::PhoneX::Implementation::Service* __ralf__234__3__8__0__Service = new ::PhoneX::PhoneX::Implementation::Service();
service = __ralf__234__3__8__0__Service;
service->ServiceId = 0;
}
__ralf__234__3__4__call->R6_service = __ralf__234__3__5__service;
::std::list< ::PhoneX::PhoneX::Implementation::Call > __ralf__234__3__9__Call = __ralf__234__3__5__service->R6_call;
__ralf__234__3__9__Call.push_back(__ralf__234__3__4__call);
bool __ralf__234__3__8__bool = true;;
__ralf__234__3__4__call->R2_caller = __ralf__234__3__0__caller;
__ralf__234__3__0__caller->R2_call = __ralf__234__3__4__call;
__ralf__234__3__4__call->R3_called = __ralf__234__3__2__called;
__ralf__234__3__2__called->R3_call = __ralf__234__3__4__call;
::PhoneX::PhoneX::Implementation::Call::Callrcvd_event* __ralf__234__3__9__Callrcvd = new ::PhoneX::PhoneX::Implementation::Call::Callrcvd_event(false);

__ralf__234__3__4__call->generate_event(__ralf__234__3__9__Callrcvd);
}
}
Effect of Transition: PhoneXPort_In::PhoneXPort_InSM::Region1::EndCall

Subscriber subscriber = Subscriber::instances().filter(selected: selected.PhoneNumber==sigdata.UserID).one();

if(subscriber==null){
TRACE::traceError(msg=>"EndCall: no such EndCall subscriber/UserId");
}
else{
if(subscriber instanceof Caller){
Caller caller = (Caller)subscriber;
PhoneX::PhoneX::Implementation::Call call = caller->call;
send new Call::Endcallrcvd() to call;
}
else {
Called called = (Called)subscriber;
PhoneX::PhoneX::Implementation::Call call = called->call;
send new Call::Endcallrcvd() to call;
}
}
Validation: ERROR:cannot find a rule for
Effect of Transition: PhoneXPort_In::PhoneXPort_InSM::Region1::RegisterUser

Service::SetServiceId(serviceId=> sigdata.ServiceId);

UnregisteredSubscriber unregsub = new UnregisteredSubscriber();
unregsub.PhoneNumber=sigdata.UserID;

RegistrationProcess regprocess = new RegistrationProcess();
Service service = Service::instances().one();
if(service == null){
service = new Service();
service.ServiceId=0;
}

R7::link(service=>service,registrationProcess=>regprocess);
R4::link(registrationProcess=>regprocess,unregisteredSubscriber=>unregsub);


send new RegistrationProcess::Registrationrequestrcvd() to regprocess;
long __ralf__234__long = casted_const_event->ServiceId;
::PhoneX::PhoneX::Implementation::Service::SetServiceId(__ralf__234__long);
::PhoneX::PhoneX::Implementation::UnregisteredSubscriber* __ralf__235__unregsub = new ::PhoneX::PhoneX::Implementation::UnregisteredSubscriber();
long __ralf__236__long = casted_const_event->UserID;
__ralf__235__unregsub->PhoneNumber = __ralf__236__long;
::PhoneX::PhoneX::Implementation::RegistrationProcess* __ralf__237__regprocess = new ::PhoneX::PhoneX::Implementation::RegistrationProcess();
::std::list< ::PhoneX::PhoneX::Implementation::Service > __ralf__239__Service = ::PhoneX::PhoneX::Implementation::Service::_instances
::PhoneX::PhoneX::Implementation::Service* __ralf__238__service = ::xtuml::select_any(__ralf__239__Service);
bool __ralf__240__bool = __ralf__238__service == 0;
if (__ralf__240__bool) {
::PhoneX::PhoneX::Implementation::Service* __ralf__241__0__Service = new ::PhoneX::PhoneX::Implementation::Service();
service = __ralf__241__0__Service;
service->ServiceId = 0;
}
::std::list< ::PhoneX::PhoneX::Implementation::RegistrationProcess > __ralf__242__RegistrationProcess = __ralf__238__service->R7_registrationProcess;
__ralf__242__RegistrationProcess.push_back(__ralf__237__regprocess);
bool __ralf__241__bool = true;;
__ralf__237__regprocess->R7_service = __ralf__238__service;
__ralf__237__regprocess->R4_unregisteredSubscriber = __ralf__235__unregsub;
::std::list< ::PhoneX::PhoneX::Implementation::RegistrationProcess > __ralf__243__RegistrationProcess = __ralf__235__unregsub->R4_registrationProcess;
__ralf__243__RegistrationProcess.push_back(__ralf__237__regprocess);
bool __ralf__242__bool = true;;
::PhoneX::PhoneX::Implementation::RegistrationProcess::Registrationrequestrcvd_event* __ralf__243__Registrationrequestrcvd = new ::PhoneX::PhoneX::Implementation::RegistrationProcess::Registrationrequestrcvd_event(false);

__ralf__237__regprocess->generate_event(__ralf__243__Registrationrequestrcvd);
Effect of Transition: PhoneXPort_In::PhoneXPort_InSM::Region1::UnregisterUser

Service::SetServiceId(serviceId=> sigdata.ServiceId);

RegisteredSubscriber regsub = new RegisteredSubscriber();
regsub.PhoneNumber=sigdata.UserID;

UnregistrationProcess unregprocess = new UnregistrationProcess();
Service service = Service::instances().one();
if(service == null){
service = new Service();
service.ServiceId=0;
}

R8::link(service=>service,unregistrationProcess=>unregprocess);
R5::link(unregistrationProcess=>unregprocess,registeredSubscriber=>regsub);


send new UnregistrationProcess::Unregistrationrequestrcvd() to unregprocess;
long __ralf__244__long = casted_const_event->ServiceId;
::PhoneX::PhoneX::Implementation::Service::SetServiceId(__ralf__244__long);
::PhoneX::PhoneX::Implementation::RegisteredSubscriber* __ralf__245__regsub = new ::PhoneX::PhoneX::Implementation::RegisteredSubscriber();
long __ralf__246__long = casted_const_event->UserID;
__ralf__245__regsub->PhoneNumber = __ralf__246__long;
::PhoneX::PhoneX::Implementation::UnregistrationProcess* __ralf__247__unregprocess = new ::PhoneX::PhoneX::Implementation::UnregistrationProcess();
::std::list< ::PhoneX::PhoneX::Implementation::Service > __ralf__249__Service = ::PhoneX::PhoneX::Implementation::Service::_instances
::PhoneX::PhoneX::Implementation::Service* __ralf__248__service = ::xtuml::select_any(__ralf__249__Service);
bool __ralf__250__bool = __ralf__248__service == 0;
if (__ralf__250__bool) {
::PhoneX::PhoneX::Implementation::Service* __ralf__251__0__Service = new ::PhoneX::PhoneX::Implementation::Service();
service = __ralf__251__0__Service;
service->ServiceId = 0;
}
::std::list< ::PhoneX::PhoneX::Implementation::UnregistrationProcess > __ralf__252__UnregistrationProcess = __ralf__248__service->R8_unregistrationProcess;
__ralf__252__UnregistrationProcess.push_back(__ralf__247__unregprocess);
bool __ralf__251__bool = true;;
__ralf__247__unregprocess->R8_service = __ralf__248__service;
__ralf__247__unregprocess->R5_registeredSubscriber = __ralf__245__regsub;
__ralf__245__regsub->R5_unregistrationProcess = __ralf__247__unregprocess;
::PhoneX::PhoneX::Implementation::UnregistrationProcess::Unregistrationrequestrcvd_event* __ralf__252__Unregistrationrequestrcvd = new ::PhoneX::PhoneX::Implementation::UnregistrationProcess::Unregistrationrequestrcvd_event(false);

__ralf__247__unregprocess->generate_event(__ralf__252__Unregistrationrequestrcvd);
Effect of Transition: PhoneXPort_Out::PhoneXPort_OutSM::Region1::AllUserUnregistered

if(this->test1!=null){
send sigdata to this->test1;
}
else if(this->test2!=null){
send sigdata to this->test2;
}
::PhoneX::PhoneX::Implementation::Test1* __ralf__253__Test1 = this->R100_test1;
bool __ralf__254__bool = __ralf__253__Test1 != 0;
::PhoneX::PhoneX::Implementation::Test2* __ralf__255__Test2 = this->R101_test2;
bool __ralf__256__bool = __ralf__255__Test2 != 0;
if (__ralf__254__bool) {
::PhoneX::PhoneX::Implementation::Test1* __ralf__255__0__Test1 = this->R100_test1;
::PhoneX::PhoneX::Implementation::PhoneXPort_Out::AllUserUnregistered_event* __ralf__255__1__AllUserUnregistered = casted_const_event->clone();
__ralf__255__0__Test1->generate_event(__ralf__255__1__AllUserUnregistered);
} else if (__ralf__256__bool) {
::PhoneX::PhoneX::Implementation::Test2* __ralf__257__0__Test2 = this->R101_test2;
::PhoneX::PhoneX::Implementation::PhoneXPort_Out::AllUserUnregistered_event* __ralf__257__1__AllUserUnregistered = casted_const_event->clone();
__ralf__257__0__Test2->generate_event(__ralf__257__1__AllUserUnregistered);
}
Effect of Transition: PhoneXPort_Out::PhoneXPort_OutSM::Region1::CalledBy

if(this->test1!=null){
send sigdata to this->test1;
}
else if(this->test2!=null){
send sigdata to this->test2;
}
::PhoneX::PhoneX::Implementation::Test1* __ralf__257__Test1 = this->R100_test1;
bool __ralf__258__bool = __ralf__257__Test1 != 0;
::PhoneX::PhoneX::Implementation::Test2* __ralf__259__Test2 = this->R101_test2;
bool __ralf__260__bool = __ralf__259__Test2 != 0;
if (__ralf__258__bool) {
::PhoneX::PhoneX::Implementation::Test1* __ralf__259__0__Test1 = this->R100_test1;
::PhoneX::PhoneX::Implementation::PhoneXPort_Out::CalledBy_event* __ralf__259__1__CalledBy = casted_const_event->clone();
__ralf__259__0__Test1->generate_event(__ralf__259__1__CalledBy);
} else if (__ralf__260__bool) {
::PhoneX::PhoneX::Implementation::Test2* __ralf__261__0__Test2 = this->R101_test2;
::PhoneX::PhoneX::Implementation::PhoneXPort_Out::CalledBy_event* __ralf__261__1__CalledBy = casted_const_event->clone();
__ralf__261__0__Test2->generate_event(__ralf__261__1__CalledBy);
}
Effect of Transition: PhoneXPort_Out::PhoneXPort_OutSM::Region1::InitiateCall

if(this->test1!=null){
send sigdata to this->test1;
}
else if(this->test2!=null){
send sigdata to this->test2;
}
::PhoneX::PhoneX::Implementation::Test1* __ralf__261__Test1 = this->R100_test1;
bool __ralf__262__bool = __ralf__261__Test1 != 0;
::PhoneX::PhoneX::Implementation::Test2* __ralf__263__Test2 = this->R101_test2;
bool __ralf__264__bool = __ralf__263__Test2 != 0;
if (__ralf__262__bool) {
::PhoneX::PhoneX::Implementation::Test1* __ralf__263__0__Test1 = this->R100_test1;
::PhoneX::PhoneX::Implementation::PhoneXPort_Out::InitiateCall_event* __ralf__263__1__InitiateCall = casted_const_event->clone();
__ralf__263__0__Test1->generate_event(__ralf__263__1__InitiateCall);
} else if (__ralf__264__bool) {
::PhoneX::PhoneX::Implementation::Test2* __ralf__265__0__Test2 = this->R101_test2;
::PhoneX::PhoneX::Implementation::PhoneXPort_Out::InitiateCall_event* __ralf__265__1__InitiateCall = casted_const_event->clone();
__ralf__265__0__Test2->generate_event(__ralf__265__1__InitiateCall);
}
Effect of Transition: PhoneXPort_Out::PhoneXPort_OutSM::Region1::LineIsBusy

if(this->test1!=null){
send sigdata to this->test1;
}
else if(this->test2!=null){
send sigdata to this->test2;
}
::PhoneX::PhoneX::Implementation::Test1* __ralf__265__Test1 = this->R100_test1;
bool __ralf__266__bool = __ralf__265__Test1 != 0;
::PhoneX::PhoneX::Implementation::Test2* __ralf__267__Test2 = this->R101_test2;
bool __ralf__268__bool = __ralf__267__Test2 != 0;
if (__ralf__266__bool) {
::PhoneX::PhoneX::Implementation::Test1* __ralf__267__0__Test1 = this->R100_test1;
::PhoneX::PhoneX::Implementation::PhoneXPort_Out::LineIsBusy_event* __ralf__267__1__LineIsBusy = casted_const_event->clone();
__ralf__267__0__Test1->generate_event(__ralf__267__1__LineIsBusy);
} else if (__ralf__268__bool) {
::PhoneX::PhoneX::Implementation::Test2* __ralf__269__0__Test2 = this->R101_test2;
::PhoneX::PhoneX::Implementation::PhoneXPort_Out::LineIsBusy_event* __ralf__269__1__LineIsBusy = casted_const_event->clone();
__ralf__269__0__Test2->generate_event(__ralf__269__1__LineIsBusy);
}
Effect of Transition: PhoneXPort_Out::PhoneXPort_OutSM::Region1::RegistrationResult

if(this->test1!=null){
send sigdata to this->test1;
}
else if(this->test2!=null){
send sigdata to this->test2;
}
::PhoneX::PhoneX::Implementation::Test1* __ralf__269__Test1 = this->R100_test1;
bool __ralf__270__bool = __ralf__269__Test1 != 0;
::PhoneX::PhoneX::Implementation::Test2* __ralf__271__Test2 = this->R101_test2;
bool __ralf__272__bool = __ralf__271__Test2 != 0;
if (__ralf__270__bool) {
::PhoneX::PhoneX::Implementation::Test1* __ralf__271__0__Test1 = this->R100_test1;
::PhoneX::PhoneX::Implementation::PhoneXPort_Out::RegistrationResult_event* __ralf__271__1__RegistrationResult = casted_const_event->clone();
__ralf__271__0__Test1->generate_event(__ralf__271__1__RegistrationResult);
} else if (__ralf__272__bool) {
::PhoneX::PhoneX::Implementation::Test2* __ralf__273__0__Test2 = this->R101_test2;
::PhoneX::PhoneX::Implementation::PhoneXPort_Out::RegistrationResult_event* __ralf__273__1__RegistrationResult = casted_const_event->clone();
__ralf__273__0__Test2->generate_event(__ralf__273__1__RegistrationResult);
}
Effect of Transition: PhoneXPort_Out::PhoneXPort_OutSM::Region1::TerminateCall

if(this->test1!=null){
send sigdata to this->test1;
}
else if(this->test2!=null){
send sigdata to this->test2;
}
::PhoneX::PhoneX::Implementation::Test1* __ralf__273__Test1 = this->R100_test1;
bool __ralf__274__bool = __ralf__273__Test1 != 0;
::PhoneX::PhoneX::Implementation::Test2* __ralf__275__Test2 = this->R101_test2;
bool __ralf__276__bool = __ralf__275__Test2 != 0;
if (__ralf__274__bool) {
::PhoneX::PhoneX::Implementation::Test1* __ralf__275__0__Test1 = this->R100_test1;
::PhoneX::PhoneX::Implementation::PhoneXPort_Out::TerminateCall_event* __ralf__275__1__TerminateCall = casted_const_event->clone();
__ralf__275__0__Test1->generate_event(__ralf__275__1__TerminateCall);
} else if (__ralf__276__bool) {
::PhoneX::PhoneX::Implementation::Test2* __ralf__277__0__Test2 = this->R101_test2;
::PhoneX::PhoneX::Implementation::PhoneXPort_Out::TerminateCall_event* __ralf__277__1__TerminateCall = casted_const_event->clone();
__ralf__277__0__Test2->generate_event(__ralf__277__1__TerminateCall);
}
Effect of Transition: PhoneXPort_Out::PhoneXPort_OutSM::Region1::UnknownNumber

if(this->test1!=null){
send new PhoneX::PhoneX::Implementation::PhoneXPort_Out::UnknownNumber(UserID=>sigdata.'UserID') to this->test1;
}
else if(this->test2!=null){
send new PhoneX::PhoneX::Implementation::PhoneXPort_Out::UnknownNumber(UserID=>sigdata.'UserID') to this->test2;
}
::PhoneX::PhoneX::Implementation::Test1* __ralf__277__Test1 = this->R100_test1;
bool __ralf__278__bool = __ralf__277__Test1 != 0;
::PhoneX::PhoneX::Implementation::Test2* __ralf__279__Test2 = this->R101_test2;
bool __ralf__280__bool = __ralf__279__Test2 != 0;
if (__ralf__278__bool) {
::PhoneX::PhoneX::Implementation::Test1* __ralf__279__0__Test1 = this->R100_test1;
::PhoneX::PhoneX::Implementation::PhoneXPort_Out::UnknownNumber_event* __ralf__279__1__UnknownNumber = new ::PhoneX::PhoneX::Implementation::PhoneXPort_Out::UnknownNumber_event(false);
long __ralf__279__2__long = casted_const_event->UserID;
__ralf__279__1__UnknownNumber->UserID = __ralf__279__2__long;
__ralf__279__0__Test1->generate_event(__ralf__279__1__UnknownNumber);
} else if (__ralf__280__bool) {
::PhoneX::PhoneX::Implementation::Test2* __ralf__281__0__Test2 = this->R101_test2;
::PhoneX::PhoneX::Implementation::PhoneXPort_Out::UnknownNumber_event* __ralf__281__1__UnknownNumber = new ::PhoneX::PhoneX::Implementation::PhoneXPort_Out::UnknownNumber_event(false);
long __ralf__281__2__long = casted_const_event->UserID;
__ralf__281__1__UnknownNumber->UserID = __ralf__281__2__long;
__ralf__281__0__Test2->generate_event(__ralf__281__1__UnknownNumber);
}
Effect of Transition: PhoneXPort_Out::PhoneXPort_OutSM::Region1::UnregistrationResult

if(this->test1!=null){
send sigdata to this->test1;
}
else if(this->test2!=null){
send sigdata to this->test2;
}
::PhoneX::PhoneX::Implementation::Test1* __ralf__281__Test1 = this->R100_test1;
bool __ralf__282__bool = __ralf__281__Test1 != 0;
::PhoneX::PhoneX::Implementation::Test2* __ralf__283__Test2 = this->R101_test2;
bool __ralf__284__bool = __ralf__283__Test2 != 0;
if (__ralf__282__bool) {
::PhoneX::PhoneX::Implementation::Test1* __ralf__283__0__Test1 = this->R100_test1;
::PhoneX::PhoneX::Implementation::PhoneXPort_Out::UnregistrationResult_event* __ralf__283__1__UnregistrationResult = casted_const_event->clone();
__ralf__283__0__Test1->generate_event(__ralf__283__1__UnregistrationResult);
} else if (__ralf__284__bool) {
::PhoneX::PhoneX::Implementation::Test2* __ralf__285__0__Test2 = this->R101_test2;
::PhoneX::PhoneX::Implementation::PhoneXPort_Out::UnregistrationResult_event* __ralf__285__1__UnregistrationResult = casted_const_event->clone();
__ralf__285__0__Test2->generate_event(__ralf__285__1__UnregistrationResult);
}
Clone this wiki locally