UFN_BUSINESSPROCESS_GETIDFROMSTATUSID

Returns a business process ID given a business process status ID.

Return

Return Type
uniqueidentifier

Parameters

Parameter Parameter Type Mode Description
@BUSINESSPROCESSSTATUSID uniqueidentifier IN

Definition

Copy


            create function dbo.UFN_BUSINESSPROCESS_GETIDFROMSTATUSID
            (
                @BUSINESSPROCESSSTATUSID uniqueidentifier
            )
            returns uniqueidentifier
            with execute as caller
            as
            begin
                declare @ID uniqueidentifier;

                select 
                    @ID = BUSINESSPROCESSSTATUS.BUSINESSPROCESSCATALOGID
                from 
                    dbo.BUSINESSPROCESSOUTPUT
                inner join
                    dbo.BUSINESSPROCESSSTATUS on BUSINESSPROCESSOUTPUT.BUSINESSPROCESSSTATUSID = BUSINESSPROCESSSTATUS.ID
                where
                    BUSINESSPROCESSSTATUS.ID = @BUSINESSPROCESSSTATUSID;

                return @ID;
            end