Create PROCEDURE [dbo].[p_InsertProcInst]
 @DefID int,
 @Status tinyint,
 @CreateUser varchar(50),
 @ID int output
AS
BEGIN
 SET NOCOUNT ON;
 INSERT INTO BPM_ProcInst (DefID,StartDate,Status,CreateUser) VALUES (@DefID,getdate(),@Status,@CreateUser)
 SELECT @ID=SCOPE_IDENTITY()
END