<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: How to get url for Task in Email</title><link>https://answers.axonivy.com/questions/2571/how-to-get-url-for-task-in-email</link><description>&lt;p&gt;Hello Ivy Team,&lt;/p&gt;
&lt;p&gt;I`m building a process for overriding the default email notifications as described here:
&lt;a href="http://developer.axonivy.com/doc/latest/EngineGuideHtml/administration.html#administration-applicationdefaults"&gt;http://developer.axonivy.com/doc/latest/EngineGuideHtml/administration.html#administration-applicationdefaults&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I have a problem to build an URL to the task.&lt;/p&gt;
&lt;p&gt;I`m trying this ways, but no luck:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;in.task = ivy.wf.findTask(in.notificationTaskId);
in.taskUrl = ivy.html.taskstartref(in.task);
in.taskUrl = ivy.var.FQDN + in.task.getFullRequestPath() + "?taskId=" + in.notificationTaskId.toString();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;the URL is valid but the Id of the task is different than in the Task List view.&lt;/p&gt;
&lt;p&gt;I`m using version 6.4&lt;/p&gt;
&lt;p&gt;Am I doing something wrong or this is a bug in this version ?
p.s. it does not work bot on the Designer and on the Server&lt;/p&gt;
&lt;p&gt;Best Regards,
Yordan&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/2571/how-to-get-url-for-task-in-email" rel="self"></atom:link><language>en</language><lastBuildDate>Thu, 06 Apr 2017 17:20:15 -0400</lastBuildDate><item><title>Answer by Stelt0</title><link>https://answers.axonivy.com/questions/2571/how-to-get-url-for-task-in-email/2576</link><description>&lt;p&gt;Hello Alex,&lt;/p&gt;
&lt;p&gt;Thanks for your reply !&lt;/p&gt;
&lt;p&gt;As I mentioned, in the very first part of my question:
" I`m building a process for overriding the default email notifications as described here: &lt;a href="http://developer.axonivy.com/doc/latest/EngineGuideHtml/administration.html#administration-applicationdefaults"&gt;http://developer.axonivy.com/doc/latest/EngineGuideHtml/administration.html#administration-applicationdefaults&lt;/a&gt; "&lt;/p&gt;
&lt;p&gt;this means that in.notificationTaskId is provided by the engine. And it is not wrong because the email are sent to the corresponding people and the information I get from the task (name, description, etc..) are accurate.&lt;/p&gt;
&lt;p&gt;Yes, the users have access to their tasks. They see them in the task list. But the URLs are different. And they are different by the Id of the task....&lt;/p&gt;
&lt;p&gt;how do I get the task Id  {data.task.id}   ?   I don`t see it as a property of ITask in Ivy script step. there is no getId() method.
is it different than the id that we are using to query for task by id ? ivy.wf.findTask(in.notificationTaskId);&lt;/p&gt;
&lt;p&gt;Best Regards,
Yordan&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stelt0</dc:creator><pubDate>Thu, 06 Apr 2017 17:20:15 -0400</pubDate><guid>https://answers.axonivy.com/questions/2571/how-to-get-url-for-task-in-email/2576</guid></item><item><title>Answer by Alex Suter</title><link>https://answers.axonivy.com/questions/2571/how-to-get-url-for-task-in-email/2574</link><description>&lt;p&gt;There is no known bug. In this case &lt;code&gt;in.notificationTaskId&lt;/code&gt; is wrong? notificationTaskId is the id of the task that is ready to be processed by the user.&lt;/p&gt;
&lt;p&gt;Some pitfalls:
 1. When you click on the link in the mail, then you go directly to the task. And if there is nothing to do, the task is done, which will redirect you to the task list. And there you may have still some other tasks. But you won't see the notificated task.
 2. Do you have the right permissions/roles to see the necessary tasks in the task view?&lt;/p&gt;
&lt;p&gt;In the JsfWorkflowUi the url will be build as follows: &lt;code&gt;#{facesContext.externalContext.requestContextPath}/pro/#{data.task.fullRequestPath}?taskId=#{data.task.id}&lt;/code&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alex Suter</dc:creator><pubDate>Thu, 06 Apr 2017 16:14:29 -0400</pubDate><guid>https://answers.axonivy.com/questions/2571/how-to-get-url-for-task-in-email/2574</guid></item></channel></rss>