UFN_BATCHWORKFLOWSTATE_TASKSAVAILABLE

Returns if the current batch state has tasks available in a given workflow

Return

Return Type
bit

Parameters

Parameter Parameter Type Mode Description
@BATCHWORKFLOWSTATEID uniqueidentifier IN

Definition

Copy


CREATE function dbo.UFN_BATCHWORKFLOWSTATE_TASKSAVAILABLE(@BATCHWORKFLOWSTATEID uniqueidentifier)
returns bit
as
begin

    declare @retval bit;
    set @retval = 0;

    select top 1 @retval=1 from dbo.BATCHWORKFLOWTASK where BATCHWORKFLOWTASK.BATCHWORKFLOWSTATEID = @BATCHWORKFLOWSTATEID;

    return @retval

end;