USP_DATALIST_CONSTITUENTRECOGNITIONPROCESSPROGRAMS
Returns a list of programs for the constituent recognition process.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@PARAMETERSETID | uniqueidentifier | IN | Input parameter indicating the context ID for the data list. |
@PROCESSID | uniqueidentifier | IN | Business Process ID |
Definition
Copy
CREATE procedure dbo.USP_DATALIST_CONSTITUENTRECOGNITIONPROCESSPROGRAMS(
@PARAMETERSETID uniqueidentifier,
@PROCESSID uniqueidentifier = null
)
as
set nocount on;
declare @IDSETID uniqueidentifier
select @IDSETID = IDSETREGISTERID from dbo.CONSTITUENTRECOGNITIONPROCESS where ID = @PARAMETERSETID;
declare @OWNERID uniqueidentifier
select @OWNERID = dbo.UFN_BUSINESSPROCESSINSTANCE_GETOWNER(@PROCESSID,@PARAMETERSETID);
if @IDSETID is not null
begin
select RP.ID
from dbo.RECOGNITIONPROGRAM RP
inner join dbo.UFN_IDSETREADER_GETRESULTS_GUID(@IDSETID) SEL on RP.ID = SEL.ID
where RP.ISACTIVE = 1
and ( @PROCESSID is null
or dbo.UFN_SITEALLOWEDFORUSERONFEATURE(@OWNERID, RP.SITEID, @PROCESSID, 4 /*SecurityFeatureType.BusinessProcess*/) = 1
);
end
else
begin
select RP.ID
from dbo.RECOGNITIONPROGRAM RP
where RP.ISACTIVE = 1
and ( @PROCESSID is null
or dbo.UFN_SITEALLOWEDFORUSERONFEATURE(@OWNERID, RP.SITEID, @PROCESSID, 4 /*SecurityFeatureType.BusinessProcess*/) = 1
);
end