<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How can I get Workflow Variables and Node Variables submitted from my form Task when task is completed? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-get-workflow-variables-and-node-variables-submitted/m-p/326095#M13096</link>
    <description>&lt;P&gt;Hi, I created a event listener and this listen workflowTaskEnded event. In this listener I can not get all my workflow and node variables values, only can get variable comment value.&lt;/P&gt;
&lt;P&gt;Why when you fire workflowTaskAssigned event, you add workflow variables and node variables, but when you fire workflowTaskCompleted event, those varialbes are not added as parameters on event context?&lt;/P&gt;
&lt;P&gt;Why only  variable comment?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;@Override
public void endTask(CoreSession session, Task task,
        Map&amp;lt;String, Object&amp;gt; data, String status) throws ClientException {
    String comment = (String) data.get("comment");
    TaskService taskService = Framework.getLocalService(TaskService.class);
    taskService.endTask(session, (NuxeoPrincipal) session.getPrincipal(),
            task, comment, TaskEventNames.WORKFLOW_TASK_COMPLETED, false);

    Map&amp;lt;String, String&amp;gt; taskVariables = task.getVariables();
    String routeInstanceId = taskVariables.get(DocumentRoutingConstants.TASK_ROUTE_INSTANCE_DOCUMENT_ID_KEY);
    if (StringUtils.isEmpty(routeInstanceId)) {
        throw new DocumentRouteException(
                "Can not resume workflow, no related route");
    }
    completeTask(routeInstanceId, null, task.getId(), data, status,
            session);
}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 11 Nov 2013 20:26:46 GMT</pubDate>
    <dc:creator>geekonspace</dc:creator>
    <dc:date>2013-11-11T20:26:46Z</dc:date>
    <item>
      <title>How can I get Workflow Variables and Node Variables submitted from my form Task when task is completed?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-get-workflow-variables-and-node-variables-submitted/m-p/326095#M13096</link>
      <description>&lt;P&gt;Hi, I created a event listener and this listen workflowTaskEnded event. In this listener I can not get all my workflow and node variables values, only can get variable comment value.&lt;/P&gt;
&lt;P&gt;Why when you fire workflowTaskAssigned event, you add workflow variables and node variables, but when you fire workflowTaskCompleted event, those varialbes are not added as parameters on event context?&lt;/P&gt;
&lt;P&gt;Why only  variable comment?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;@Override
public void endTask(CoreSession session, Task task,
        Map&amp;lt;String, Object&amp;gt; data, String status) throws ClientException {
    String comment = (String) data.get("comment");
    TaskService taskService = Framework.getLocalService(TaskService.class);
    taskService.endTask(session, (NuxeoPrincipal) session.getPrincipal(),
            task, comment, TaskEventNames.WORKFLOW_TASK_COMPLETED, false);

    Map&amp;lt;String, String&amp;gt; taskVariables = task.getVariables();
    String routeInstanceId = taskVariables.get(DocumentRoutingConstants.TASK_ROUTE_INSTANCE_DOCUMENT_ID_KEY);
    if (StringUtils.isEmpty(routeInstanceId)) {
        throw new DocumentRouteException(
                "Can not resume workflow, no related route");
    }
    completeTask(routeInstanceId, null, task.getId(), data, status,
            session);
}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Nov 2013 20:26:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-get-workflow-variables-and-node-variables-submitted/m-p/326095#M13096</guid>
      <dc:creator>geekonspace</dc:creator>
      <dc:date>2013-11-11T20:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get Workflow Variables and Node Variables submitted from my form Task when task is completed?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-get-workflow-variables-and-node-variables-submitted/m-p/326096#M13097</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;You can find some examples in the documentation: &lt;A href="http://doc.nuxeo.com/x/PQzF"&gt;How to modify a workflow variable outside of workflow context&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2013 11:44:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-get-workflow-variables-and-node-variables-submitted/m-p/326096#M13097</guid>
      <dc:creator>Mariana_Cedica</dc:creator>
      <dc:date>2013-12-16T11:44:31Z</dc:date>
    </item>
  </channel>
</rss>

