USP_DATAFORMTEMPLATE_PRELOAD_BATCHWORKFLOWSTATE

The load procedure used by the edit dataform template "Batch Workflow State Add Form"

Parameters

Parameter Parameter Type Mode Description
@BATCHWORKFLOWID uniqueidentifier IN Input parameter indicating the context ID for the record being added.
@PERMISSIONS xml INOUT
@ISINITIALSTATE bit INOUT This is the initial state for the workflow

Definition

Copy


                    CREATE procedure dbo.USP_DATAFORMTEMPLATE_PRELOAD_BATCHWORKFLOWSTATE
                    (                    
                        @BATCHWORKFLOWID uniqueidentifier,
                        @PERMISSIONS xml = null output,
                        @ISINITIALSTATE bit = null output
                    )
                    as
                        set nocount on;

                        select @PERMISSIONS = dbo.UFN_BATCHWORKFLOWSTATE_GETSYSTEMROLEPERMISSIONS_TOITEMLISTXML(null)

                        if not exists(select ID from dbo.BATCHWORKFLOWSTATE where BATCHWORKFLOWID = @BATCHWORKFLOWID and ISINITIALSTATE  = 1)
                            set @ISINITIALSTATE = 1
                        else
                            set @ISINITIALSTATE = 0