Hello Aditya, Usually when the Item is in Released state , in the lifecyle you will have state permissions, the warning which you get from System saying that you have insufficient permission etc, If you want to display your error message, Remove state permission for your Lifecycle Create Custom method for OnBefore UnLock,, get state, if state=Released, display your message
Thank you