Exercise: Review and Load the Business Process Parameter Set Data List
Before we can build a page to display and start our food bank inventory business process with a parameter set, we need to provide a feature to display the associated parameter sets. For details on this data list, see Business Process Parameter Set Data List.
Step 1 - Review the data list's stored procedure.
-
Review the CREATE PROCEDURE statement below in Step 2 within the DataListSpec that retrieves the rows for the data list.
-
Review each table referenced in the Transact-SQL using Tables.
-
Review the UFN_SECURITY_APPUSER_GRANTED_BUSINESSPROCESSINSTANCE_IN_SYSTEMROLE user-defined function using the Blackbaud CRM Database Reference that is located within your SDK\Documentation folder (BlackbaudEnterpriseCRM.chm). Alternatively, you may review the function within the database. This function returns true if user has been granted and not denied the business process instance for a System Role.
Step 2 - Copy and load the spec.
-
Create a DataListSpec within your catalog project within the new Inventory folder.
-
Name the XML file: InventoryProcesses.DataList.xml.
-
Replace the XML for the new DataListSpec using the DataListSpec listed below.
-
Save and load the spec.
<DataListSpec xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ID="53a74b52-b121-4210-bb93-505ddcaa22ec" Name="Inventory Process Business List" Description="Returns a list of Inventory Process Business process parameter sets." Author="Technical Training" common:SecurityUIFolder="Constituent\Food Bank\Inventory" xmlns:common="bb_appfx_commontypes" xmlns="bb_appfx_datalist"> <!-- This pulls all the different business process instances. Notice there is just one thing special in the where clause to filter based on security permissions. For this I needed to pass in the @CURRENTAPPUSERID parameter which can come into any SP in the system pretty much as long as it is specified. --> <SPDataList SPName="USR_USP_DATALIST_USR_INVENTORYPROCESS"> <common:CreateProcedureSQL> <![CDATA[ create procedure dbo.USR_USP_DATALIST_USR_INVENTORYPROCESS ( @CURRENTAPPUSERID uniqueidentifier = null ) as set nocount on; SELECT IP.ID, IP.NAME, IDS.NAME as IDSETREGISTERNAME, BPV.CAPTION as QUERYVIEWCAPTION, IP.DESCRIPTION, BPI.OWNERID FROM dbo.USR_INVENTORYPROCESS IP INNER JOIN dbo.IDSETREGISTER IDS on IP.IDSETREGISTERID = IDS.ID INNER JOIN BusinessProcessView BPV on IP.QUERYVIEWID = BPV.QUERYVIEWCATALOGID LEFT JOIN dbo.BUSINESSPROCESSINSTANCE BPI on IP.ID = BPI.BUSINESSPROCESSPARAMETERSETID where dbo.UFN_SECURITY_APPUSER_GRANTED_BUSINESSPROCESSINSTANCE_IN_SYSTEMROLE(@CURRENTAPPUSERID, IP.ID) = 1 order by IP.NAME ] ]> </common:CreateProcedureSQL> </SPDataList> <Output> <OutputFields> <OutputField FieldID="ID" Caption="System record Id" DataType="Guid" IsHidden="true" /> <OutputField FieldID="NAME" Caption="Name" DataType="String" /> <OutputField FieldID="IDSETREGISTERNAME" Caption="Selection" DataType="String" /> <OutputField FieldID="QUERYVIEWCAPTION" Caption="Output Format" DataType="String" /> <OutputField FieldID="DESCRIPTION" Caption="Description" DataType="String" /> <OutputField FieldID="OWNERID" Caption="Owner ID" DataType="Guid" IsHidden="true" /> </OutputFields> </Output> </DataListSpec>