I have scenario where, I need a link in email body, this link should open a current task for which we have different process model and interface,
but I want to open that task in current step once I click on the link from email. How can I achieve that?
Discussion posts and replies are publicly visible
That highly depends on what you mean by things like "open a current task", "different process model and interface", and "open task in current step".
In an email you're going to be able to pretty much send a static URL that you can have Appian create for you - our choices are pretty much limited to "task link" for use cases like this. It'll be a little tricky to even get the task instance ID to formulate the taks link within a process instance (you'll have to use query process analytics for the current process instance, and perhaps task name too if there's more than one task in the process model), but this should be achievable if you really need it. But that link will just go to the task in whatever state someone would already be opening it if they clicked it from within Appian - there's not really much other way around this, other than making sure it's already in the state you want the user to find it in upon clicking their link.
FWIW, i find it quite a bit easier to just list the general login link in the email and ask the user to look in their task list once they're on their main site landing page. That way an email doesn't have a link to a specific task instance that goes stale as soon as that particular task instance is submitted.
You can use html tag <a href> to embed Appian task link in the email. You will need the taskId of the task handy in a pv within the process.
<a href="taskurlFromAppian">Task Label in email!</a>
For taskurlFromAppian you can use a!urlfortask(taskIds:taskIds)
Use a!urlForTask() to generate the task URL and include it in your email body.
And the normal task assignment email is not ok?