UFN_BUSINESSPROCESS_GETBUSINESSPROCESSVIEWANDDATALIST

Returns business process views and their corresponding output datalists.

Return

Return Type
table

Parameters

Parameter Parameter Type Mode Description
@TAG nvarchar(100) IN

Definition

Copy


CREATE function dbo.UFN_BUSINESSPROCESS_GETBUSINESSPROCESSVIEWANDDATALIST
(
    @TAG nvarchar(100)
)
returns table
as 
return
    select
        BUSINESSPROCESSVIEW.ID as BUSINESSPROCESSVIEWID,
        QUERYVIEWSPEC.value
        (
            'declare namespace bbafx="bb_appfx_queryview";
            declare namespace c="bb_appfx_commontypes";
            (bbafx:QueryViewSpec/c:MetaTags/attribute::*[local-name()=sql:variable("@TAG")])[1]','char(36)'
        ) as DATALISTID,
        case when QUERYVIEWSPEC.value
        (
            'declare namespace bbafx="bb_appfx_queryview";
            declare namespace c="bb_appfx_commontypes";
            (bbafx:QueryViewSpec/bbafx:TVFImplementation/@FunctionName)[1]','char(100)'
        ) is null then 0 else 1 end as HASPARAMETERS,
        BUSINESSPROCESSVIEW.QUERYVIEWCATALOGID as QUERYID
    from
        dbo.QUERYVIEWCATALOG
    inner join
        dbo.BUSINESSPROCESSVIEW on QUERYVIEWCATALOG.ID = BUSINESSPROCESSVIEW.QUERYVIEWCATALOGID
    where
        not QUERYVIEWSPEC.value
        (
            'declare namespace bbafx="bb_appfx_queryview";
            declare namespace c="bb_appfx_commontypes";
            (bbafx:QueryViewSpec/c:MetaTags/attribute::*[local-name()=sql:variable("@TAG")])[1]','char(36)'
        ) is null