USP_BUSINESSPROCESSSTATUS_DELETE

Executes the "Business Process Status: Delete" record operation.

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN Input parameter indicating the ID of the record being deleted.
@CHANGEAGENTID uniqueidentifier IN Input parameter indicating the ID of the change agent invoking the delete.

Definition

Copy


CREATE procedure dbo.USP_BUSINESSPROCESSSTATUS_DELETE
(
    @ID uniqueidentifier,
    @CHANGEAGENTID uniqueidentifier
)
as begin
    exec dbo.USP_BUSINESSPROCESSSTATUS_VALIDATESTATUS;

    if exists (select ID from dbo.BUSINESSPROCESSSTATUS    where ID = @ID and STATUSCODE = 1)
        raiserror('Business process is still running',13,1);                    

    exec dbo.USP_BUSINESSPROCESSSTATUS_DELETEBYID_WITHCHANGEAGENTID @ID, @CHANGEAGENTID
    return 0;
end