You are on page 1of 9

#=============================================================================# # # # Event : 90009 - Create/Modify VoIp Subscription # # # # Author : Saurav Sachdeva (THBS) # # # # Date : January 20,2009 # # # # Description : This

event introduced as a part of the CCA project creates a # # new VoIp subscription and also modifies/updates an # # existing VoIp subscription # # # #=============================================================================# # Change History # # =========================================================================== # # Date Who Incident/Project Comments # # --------------------------------------------------------------------------- # # 19/01/2009 Saurav (THBS) CCA Initial Version created # # Sachdeva # # ============================================================================# # FORMAT: # EventType(ExternalId) # FIELD(NAME(TagName), # REQUIRED(yes/no) # ADAPTORS(AdaptorName(TableName,ColumnName,all other params)) # ) # ---EventSource--# event 90009 - Create/Modify VoIp subscription EventType(90009) { FIELD(NAME(AccountId), REQUIRED(yes), PRIMARYKEY(yes), ADAPTORS(LongContentAdaptor(ACCOUNT,ACCNO), LongContentAdaptor(SUBSCRIPTION,ACCNO)) ) FIELD(NAME(SubscriptionId), REQUIRED(yes), PRIMARYKEY(no), ADAPTORS(LongContentAdaptor(SUBSCRIPTION,ORANGESUBID)) ) FIELD(NAME(SubscriptionStartDate), REQUIRED(yes), PRIMARYKEY(no), ADAPTORS(DateContentAdaptor(SUBSCRIPTION,SUBSCRIPTSTARTDATE,DATETIME)) ) FIELD(NAME(UserName), REQUIRED(no), PRIMARYKEY(no), ADAPTORS(StringContentAdaptor(SUBSCRIPTION,SUBUSERNAME)) ) FIELD(NAME(SubscriptionStatus), REQUIRED(yes), PRIMARYKEY(no), ADAPTORS(StringContentAdaptor(SUBSCRIPTION,SUBSCRIPTSTATUS)) ) FIELD(NAME(VOIPUserName), REQUIRED(yes), PRIMARYKEY(yes), ADAPTORS(StringContentAdaptor(VOIPSUBSCRIPTION,NODENAME)) ) FIELD(NAME(TeleServiceReference), REQUIRED(yes), PRIMARYKEY(yes),

ADAPTORS(StringContentAdaptor(VOIPSUBSCRIPTION,VOIPNUMBER)) ) FIELD(NAME(UserId), REQUIRED(no), PRIMARYKEY(no), ADAPTORS(StringContentAdaptor(SUBSCRIPTION,SYSUSERNAME)) ) FIELD(NAME(NewTeleServiceReference), REQUIRED(no), PRIMARYKEY(no), ADAPTORS(StringContentAdaptor(SERDUMMYFIELDS,STRING1)) ) FIELD(NAME(SubscriptionActivatedDate), REQUIRED(no), PRIMARYKEY(no), ADAPTORS(DateContentAdaptor(SERDUMMYFIELDS,LONG1,DATETIME)) ) FIELD(NAME(TeleServiceStartDate), REQUIRED(no), PRIMARYKEY(no), ADAPTORS(DateContentAdaptor(VOIPSUBSCRIPTION,VOIPNUMBERSTARTDATE,DATET IME)) ) FIELD(NAME(ServiceType), REQUIRED(no), PRIMARYKEY(no), ADAPTORS(IntegerContentAdaptor(SUBSCRIPTION,LINE)) ) FIELD(NAME(TelephonyType), REQUIRED(no), PRIMARYKEY(no), ADAPTORS(IntegerContentAdaptor(SUBSCRIPTION,LINESERVICE)) ) } # ---EventActions--SerActionSet(90009) { REQUIRED: BasicSERComposite() { # Assume that VOIPNUMBER is not present SetBoolVarAction(VOIP_EXISTS,0) # Assume that ORANGESUBID is not present SetBoolVarAction(ORANGESUBID_EXISTS,0) # Assume that REGISTRATIONDATE is present SetBoolVarAction(REGDATE_NULL,0) } NOT_REQUIRED: TransactionAction (RDBIMDBTransaction) { BasicSERComposite() { # Set the SUBSCRTYPE to Contract ValueProviderAction(SUBSCRIPTION,SUBSCRTYPE, STRING,Contract-Home,ON_CONFIG) # Checking whether the REGISTRATIONDATE is exsisting # for the given ORANGESUBID BasicDBAction (SUBSCRIPTION,ConfigurableLocator((ORANGESUBID,EQUALS) (SUBSCRTYPE,EQUALS)(REGISTRATIONDATE,IS_NULL)),SELECT_ONLY, 0)

# Set the Flag to 1 indicating REGISTRATIONDATE is NULL SetBoolVarAction (REGDATE_NULL,1) } } NOT_REQUIRED: TransactionAction (RDBIMDBTransaction) { BasicSERComposite() { # Checking whether the incoming VOIPNUMBER is already exsisting # in VOIPSUBSCRIPTION table BasicDBAction (VOIPSUBSCRIPTION,ConfigurableLocator((VOIPNUMBER ,EQU ALS)), SELECT_ONLY,0) # Store SubscriptId for use in next cycle ValueSnapshotAction(VOIPSUBSCRIPTION,SUBSCRIPTID,ON_EXECUTE,STORE) # Set the flag as 1 indicating that the NODENAME exists in the # VOIPSUBSCRIPTION table SetBoolVarAction (VOIP_EXISTS,1) } } NOT_REQUIRED: TransactionAction (RDBIMDBTransaction) { BasicSERComposite() { DecisionAction(CheckBoolVarDecision(VOIP_EXISTS,0)) { TRUE: BasicSERComposite() { # Set the SUBSCRTYPE to Contract ValueProviderAction(SUBSCRIPTION,SUBSCRTYPE, STRING,Contract-Home,ON_CONFIG) # Check whether the incoming ORANGESUBID is existing # and of SUBSCRTYPE Contract BasicDBAction (SUBSCRIPTION,ConfigurableLocator((ORANGES UBID,EQUALS)(SUBSCRTYPE,EQUALS)), SELECT_ONLY,0) # Store SubscriptId for use in next cycle ValueSnapshotAction(SUBSCRIPTION,SUBSCRIPTID,ON_EXECUTE, STORE) # Set the flag as 1 indicating that the ORANGESUBID exis ts in the # SUBSCRIPTION table SetBoolVarAction (ORANGESUBID_EXISTS,1) } FALSE: NullAction() } } } REQUIRED: TransactionAction (RDBIMDBTransaction) {

BasicSERComposite() { DecisionAction(CheckBoolVarDecision(VOIP_EXISTS,1)) { TRUE: BasicSERComposite() { # Retrieve the SubscriptId stored in the previous cycle ValueSnapshotAction(VOIPSUBSCRIPTION,SUBSCRIPTID, ON_CONFIG,RETRIEVE) # Link SUBSCRIPTID of VOIPSUBSCRIPTION to SUBSCRIPTID of # SUBSCRIPTION CollectionAdaptorAction ((ON_CONFIG,NO_HEADER, VOIPSUBSCRIPTION,SUBSCRIPTID, SUBSCRIPTION,SUBSCRIPTID)) # Check if the LONG1 Column in SERDUMMYFIELDS table is # populated or not DecisionAction(EDLContentDecision(SERDUMMYFIELDS, LONG1,EXISTS_EQUAL, LONG,NULL)) { TRUE: NullAction() FALSE: # Check if the REGISTRATIONDATE is populated or not DecisionAction(CheckBoolVarDecision(REGDATE_NULL ,1)) { TRUE: BasicSERComposite() { CollectionAdaptorAction ((ON_CONFIG, NO_HEADER, SERDUMMYFI ELDS,LONG1, SUBSCRIPTION ,REGISTRATIONDATE)) } FALSE: NullAction() } } DecisionAction (EDLContentDecision(SERDUMMYFIELDS,STRING 1, EXISTS_NOT_EQUAL,STRING,NULL )) { TRUE: BasicSERComposite() { # Link STRING1 of SERDUMMYFIELDS table to VO IPNUMBER # of VOIPSUBSCRIPTION table CollectionAdaptorAction ((ON_CONFIG,NO_HEADE R,

SERDUMMYFIELDS,STRIN G1, VOIPSUBSCRIPTION,VOIPN UMBER)) } FALSE: NullAction() } # Update the values into the VOIPSUBSCRIPTION table BasicDBAction(VOIPSUBSCRIPTION,PrimaryKeyLocator(), PERSIST,0) # Update the values into the SUBSCRIPTION table BasicDBAction(SUBSCRIPTION,PrimaryKeyLocator(), PERSIST,0) # Store SubscriptId for use in next cycle ValueSnapshotAction(SUBSCRIPTION,SUBSCRIPTID,ON_EXECUTE, STORE) #Update the values in the VOIPSUBSCRIBERTBL in IMDB # GenericIMDBAction(VOIPSUBSCRIBERTBL, # IMDBConfigurableLocator((SUBSCRIB ERID,EQUALS)), # PERSIST,0) # Update VOIPSUBSCRIBERTBL table in IMDB GenericIMDBAction(VOIPSUBSCRIBERTBL, IMDBConfigurableLocator((VOIPNUMBER,EQUALS)), PERSIST,0) } FALSE: BasicSERComposite() { DecisionAction(CheckBoolVarDecision(ORANGESUBID_EXISTS,1 )) { TRUE: BasicSERComposite() { # Retrieve the SubscriptId stored in the pre vious cycle ValueSnapshotAction(SUBSCRIPTION,SUBSCRIPTID , ON_CONFIG,RETRIEVE) # Link SUBSCRIPTID of SUBSCRIPTION to the SU BSCRIPTID # of VOIPSUBSCRIPTION CollectionAdaptorAction ((ON_CONFIG,NO_HEADE R, SUBSCRIPTION,SUBSCRIPTID, VOIPSUBSCRIPTION,SUBSCRIPTID)) # Check if the LONG1 Column in SERDUMMYFIELD S table is # populated or not

DecisionAction(EDLContentDecision(SERDUMMYFI ELDS, LONG1,EXISTS_EQUAL,LONG,NUL L)) { TRUE: NullAction() FALSE: DecisionAction(CheckBoolVarDecision( REGDATE_NULL,1)) { TRUE: BasicSERComposite() { CollectionAdaptorAction ((ON_CONFIG,NO_HEADER, SERDUMMYFIELDS,LONG1, SUBSCRIP TION,REGISTRATIONDATE)) # Update the values into the SUBSCRIPTION table BasicDBAction(SUBSCRIPTI ON,PrimaryKeyLocator(), PERSIST,0) } FALSE: NullAction() } } DecisionAction (EDLContentDecision(SERDUMMYF IELDS,STRING1, EXISTS_NOT_EQUAL,STRING,NULL )) { TRUE: BasicSERComposite() { # Link STRING1 of SERDUMMYFIELDS table to VOIPNUMBER # of VOIPSUBSCRIPTION table CollectionAdaptorAction ((ON_CON FIG,NO_HEADER, SERDUMMY FIELDS,STRING1, VOIPSUBSCRI PTION,VOIPNUMBER)) } FALSE: NullAction() } # Persist the entries in VOIPSUBSCRIPTION ta ble BasicDBAction (VOIPSUBSCRIPTION, PrimaryKeyLocator(), PERSIST,0)

# Update the values into the SUBSCRIPTION ta ble BasicDBAction(SUBSCRIPTION,PrimaryKeyLocator (), PERSIST,0) # Update the values in the VOIPSUBSCRIBERTBL in IMDB #GenericIMDBAction(VOIPSUBSCRIBERTBL, # IMDBConfigurableLocator((SUBSCRIB ERID,EQUALS)), # in IMDB GenericIMDBAction(VOIPSUBSCRIBERTBL, IMDBConfigurableLocator((VOIPNUMBE R,EQUALS)), PERSIST,0) } FALSE: BasicSERComposite() { # Create a value for primary key SUBSCRIPTID in the # SUBSCRIPTION table before inserting SequenceAction (VOIPSUBSCRIPTION,SUBSCRIPTID , VOIPSUBSCRIPTION_SEQ,CONFIG_TIME ) # Link SUBSCRIPTID of VOIPSUBSCRIPTION to # SUBSCRIPTID of SUBSCRIPTION CollectionAdaptorAction ((ON_CONFIG,NO_HEADE R, VOIPSUBSCRIPTION,SUBSCRI PTID, SUBSCRIPTION,SUBSCRIPTI D)) # Set the SUBSCRID field in SUBSCRIPTION ta ble as 0 ValueProviderAction(SUBSCRIPTION,SUBSCRID, INT,0,ON_CONFIG) # Set the ISYOUNG field in SUBSCRIPTION tab le as 1 ValueProviderAction(SUBSCRIPTION,ISYOUNG, INT,1,ON_CONFIG) # Set the IS3G field in SUBSCRIPTION table as 0 ValueProviderAction(SUBSCRIPTION,IS3G,INT,0 ,ON_CONFIG) # Set the CDRSONLY field in SUBSCRIPTION ta ble as 0 ValueProviderAction(SUBSCRIPTION,CDRSONLY, INT,0,ON_CONFIG) PERSIST,0) # Update the values in the VOIPSUBSCRIBERTBL

# Set the CDRSONLY field in SUBSCRIPTION ta ble as 0 ValueProviderAction(SUBSCRIPTION,VISITOR, INT,0,ON_CONFIG) # Set the SUBSCRTYPEIND field in SUBSCRIPTI ON table ValueProviderAction(SUBSCRIPTION,SUBSCRTYPE IND, STRING,VoIP,ON_CONFIG) # Set the SUBSCRTYPE field in SUBSCRIPTION table ValueProviderAction(SUBSCRIPTION,SUBSCRTYPE , STRING,Contract-Home,ON _CONFIG) # Set the SUBSCRIPTGROUPID field in SUBSCRI PTION table ValueProviderAction(SUBSCRIPTION,SUBSCRIPTG ROUPID, INT,1,ON_CONFIG) DecisionAction(EDLContentDecision(SERDUMMYF IELDS, LONG1,EXISTS_EQUAL,LON G,NULL)) { TRUE: ValueProviderAction(SUBSCRIPTION,REG ISTRATIONDATE, LONG,NULL,ON_CONFIG) FALSE: # Set the REGISTRATIONDATE to the ev ent time CollectionAdaptorAction((ON_CONFIG,T IME_HEADER, SUBSCRIPTION,REGIS TRATIONDATE)) } # Insert into the SUBSCRIPTION TABLE BasicDBAction (SUBSCRIPTION,PrimaryKeyLocat or(), CREATE_ONLY,0) # Store SubscriptId for use in next cycle ValueSnapshotAction(SUBSCRIPTION,SUBSCRIPTI D,ON_EXECUTE,STORE) # Insert into VOIPSUBSCRIPTION table BasicDBAction (VOIPSUBSCRIPTION,PrimaryKeyL ocator(), CREATE_ONLY,0) # Insert into VOIPSUBSCRIBERTBL in IMDB GenericIMDBAction(VOIPSUBSCRIBERTBL, IMDBConfigurableLocator((VOIPNUMBER

,EQUALS)), PERSIST,0) } } } } } } REQUIRED: TransactionAction (RDBIMDBTransaction) { BasicSERComposite() { # Post event to arena ValueSnapshotAction(SUBSCRIPTION,SUBSCRIPTID,ON_CONFIG, RETRIEVE) SGMaintenanceAction(USE_SUBSCRIPTION) SubscriberDetailAction(USE_SUBSCRIPTION) } } }

You might also like