USP_DATAFORMTEMPLATE_PRELOAD_BATCH2WORKFLOWSTATE

The load procedure used by the edit dataform template "Batch Workflow Status 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 Specify roles that have access to batches in this status
@ISINITIALSTATE bit INOUT This is the initial status for the workflow

Definition

Copy

                    CREATE procedure dbo.USP_DATAFORMTEMPLATE_PRELOAD_BATCH2WORKFLOWSTATE
                    (                    
                        @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)
              select @ISINITIALSTATE = 1