UFN_BUSINESSPROCESS_PAGEREFERENCES

Returns a table of page IDs that reference the given business process.

Return

Return Type
table

Parameters

Parameter Parameter Type Mode Description
@BUSINESSPROCESSID uniqueidentifier IN

Definition

Copy


CREATE function dbo.UFN_BUSINESSPROCESS_PAGEREFERENCES
(
    @BUSINESSPROCESSID uniqueidentifier
)
returns @TABLE table
(
    PAGEID uniqueidentifier
)
with execute as caller
as
begin

    -- find pages that use this dashboard

    with xmlnamespaces ('bb_appfx_pagedefinition' as tns, 'bb_appfx_commontypes' as common)
    insert into @TABLE
        select distinct P.ID
        from dbo.PAGEDEFINITIONCATALOG as P
            cross apply P.PAGEDEFINITIONSPEC.nodes('//common:StartBusinessProcess') as page(businessprocessactions)
        where page.businessprocessactions.value('@BusinessProcessID', 'uniqueidentifier') = @BUSINESSPROCESSID;

    return;

end;