Using hooks to detect a session
When writing hooks, you can use the DevOps Plan Schema API to detect whether a user is using DevOps Plan.
This information allows you to take appropriate action if you have not adjusted your schema to match the functionality available on the web.
For example, when you detect a session in a function that creates a message box or a new window, you can call code modified for the application or exit the function. The following code examples can be used to detect a session.
Perl
my $currDBSession; # Current Db session
$currDBSession = $entity->GetSession();
# Test for existence of the web session variable
if ( $currDBSession->HasValue ("_CQ_WEB_SESSION") {
# Either exit or do something else
}