/* $Id$ */
/*============================================================================*
 |                 Copyright (c) 2016 Applaud Solutions UK Ltd                |
 |                             All rights reserved                            |
 *===========================================================================*/

SET VERIFY OFF
SET FEEDBACK OFF
WHENEVER OSERROR  EXIT FAILURE ROLLBACK
WHENEVER SQLERROR EXIT FAILURE ROLLBACK

CREATE OR REPLACE VIEW xxas_role_details_v
AS
select b.name,
       name role_id,
       description,
       start_date active_from,
       expiration_date active_to,
       display_name,
       b.display_name "line1",
       'flexible' "type" ,
       fnd_global.employee_id person_id,
       'modal' "target",
       CASE WHEN b.name like 'UMX|XXAS%'
            THEN  'Y'
            ELSE  'N'
       END seeded_role_flag 
from wf_roles b
where b.NAME like 'UMX%XXAS%';

BEGIN
  xxas_fnd_dictionary_pkg.add_view
   (p_application_short_name => xxas_util_pkg.app
   ,p_view_name              => 'XXAS_ROLE_DETAILS_V'
   ,p_description            => 'Applaud Role Details');
END;
/
COMMIT;
EXIT;
	