I had this same issue a while back. The problem is that unless the user trying to close the task is the same user assigned to it, it won't work. You'd need to reassign the task to the system account first, then you could close it. If you don't want to reassign the task, then you may want to review this post. Someone in the comments posted code for their own function they wrote to get around this. You could also look at using the Flex-Task Escalation options depending on your scenario.
Hey Václav,
Brendan is completely right, this is the approach you have to choose, but what's the requirement behind your question, maybe you can auto escalate the task to the system account after a specific time period and then respond to it via the system account?
Best regards,
Jan
Hi Brendan,
Thank you for your reply. I read it in your discussion which you mentioned above. Please could you tell me how can I it reasign the task? And If I reasign or delegate it and the system account respond the task, will SharePoint send the notification to user that the answer is no longer required? That's undesirable. I need that system would approve the task and don't send a notification.....is that possible?
Thanks so much for your reply.