UFN_BUSINESSPROCESSPARAMETERSET_GETSITES

Given a business process parameter set ID, this returns the site of the business process instance that references that parameter set.

Return

Return Type
table

Parameters

Parameter Parameter Type Mode Description
@BUSINESSPROCESSPARAMETERSETID uniqueidentifier IN

Definition

Copy


            create function dbo.UFN_BUSINESSPROCESSPARAMETERSET_GETSITES(
                @BUSINESSPROCESSPARAMETERSETID uniqueidentifier
            )
            returns @SITES table (SITEID uniqueidentifier)
            as
            begin
                    declare @BUSINESSPROCESSINSTANCEID uniqueidentifier
                    select @BUSINESSPROCESSINSTANCEID=ID
                    from dbo.BUSINESSPROCESSINSTANCE
                    where BUSINESSPROCESSPARAMETERSETID = @BUSINESSPROCESSPARAMETERSETID;

                    insert into @SITES(SITEID)
                    select SITEID 
                    from dbo.UFN_SITEID_MAPFROM_BUSINESSPROCESSINSTANCEID(@BUSINESSPROCESSINSTANCEID);


                return;

            end