p_ae2.start(f_cse_createResource(int2,m_createAe(PX_APP_ID,-,PX_AE2_ID_STEM,"MyAe2",{f_getAnnouncementTargetPoA("HTTP",PX_AE2_ADDRESS,"")}),-1));// AE2 is registred
p_ae2.done;
p_ae2Index:=f_getResource(p_ae2);
if(ischosen(p_createRequestPrimitive.primitiveContent.subscription)){//this condition is necessary for Subscription TCs where notification URI is set in m_createSubscriptionAdvanced
if(match(int2,p_resourceType)ormatch(-1,p_parentIndex)){//If created resource is an AE or created under CSEBase, it needs to be added to the resourceToBeDeleted list
if(match(int2,p_resourceType)ormatch(-1,p_parentIndex)){//If created resource is an AE or created under CSEBase, it needs to be added to the resourceToBeDeleted list