<?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 Re: How to assign a task based on NodeRef ? in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-to-assign-a-task-based-on-noderef/m-p/37278#M15692</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/8063"&gt;@upforsin&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;Well done for getting it sorted - and thanks for updating your post, really helpful to other users.&lt;/P&gt;
&lt;P&gt;Cheers,&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Apr 2020 09:41:03 GMT</pubDate>
    <dc:creator>EddieMay</dc:creator>
    <dc:date>2020-04-02T09:41:03Z</dc:date>
    <item>
      <title>How to assign a task based on NodeRef ?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-assign-a-task-based-on-noderef/m-p/37276#M15690</link>
      <description>&lt;P&gt;I want to create an action which uses&amp;nbsp;&lt;EM&gt;authority.ftl&lt;/EM&gt;&amp;nbsp; to pick a user and start a workflow.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How Can I create a simple pooled workflow and assign workflow task to this picked user?&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;So far, I have this code:&lt;/P&gt;&lt;PRE&gt;protected void executeImpl(Action action, NodeRef actionedUponNodeRef) {&lt;BR /&gt;if (serviceRegistry.getNodeService().exists(actionedUponNodeRef) == true) {&lt;BR /&gt;   String assocString = (String) action.getParameterValue(PARAM_MY_ASSOC);   &lt;BR /&gt;   NodeRef nodePersonUser = new NodeRef(assocString);&lt;BR /&gt;   PersonInfo pi = serviceRegistry.getPersonService().getPerson(nodePersonUser);&lt;BR /&gt;   String username = pi.getFirstName();&lt;BR /&gt;&lt;BR /&gt;   Map&amp;lt;QName, Serializable&amp;gt; properties = new HashMap&amp;lt;QName, Serializable&amp;gt;();&lt;BR /&gt;   WorkflowService workflowService = serviceRegistry.getWorkflowService();&lt;BR /&gt;   properties.put(WorkflowModel.ASSOC_ASSIGNEE, nodePersonUser);&lt;BR /&gt;&lt;BR /&gt;   Serializable wfPackage = workflowService.createPackage(actionedUponNodeRef);&lt;BR /&gt;   properties.put(WorkflowModel.ASSOC_PACKAGE, wfPackage);&lt;BR /&gt;   properties.put(WorkflowModel.PROP_WORKFLOW_DESCRIPTION, "My action workflow");&lt;BR /&gt;   WorkflowDefinition reviewDef = workflowService.getDefinitionByName("activiti$activitiReview");&lt;BR /&gt;   workflowService.startWorkflow(reviewDef.getId(), properties)&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;There are no errors but there are also &lt;STRONG&gt;no items&lt;/STRONG&gt; in the workflow tasks.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2020 21:13:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-assign-a-task-based-on-noderef/m-p/37276#M15690</guid>
      <dc:creator>upforsin</dc:creator>
      <dc:date>2020-03-30T21:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign a task based on NodeRef ?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-assign-a-task-based-on-noderef/m-p/37277#M15691</link>
      <description>&lt;P&gt;I got it. It didn't work because the assignee didn't have permission to see that particular file.&lt;/P&gt;&lt;P&gt;That line of code solves the problem:&lt;/P&gt;&lt;PRE&gt;serviceRegistry.getPermissionService().setPermission(actionedUponNodeRef, p.getUserName(), serviceRegistry.getPermissionService().COORDINATOR, true);  &lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Apr 2020 08:41:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-assign-a-task-based-on-noderef/m-p/37277#M15691</guid>
      <dc:creator>upforsin</dc:creator>
      <dc:date>2020-04-01T08:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign a task based on NodeRef ?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-assign-a-task-based-on-noderef/m-p/37278#M15692</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/8063"&gt;@upforsin&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;Well done for getting it sorted - and thanks for updating your post, really helpful to other users.&lt;/P&gt;
&lt;P&gt;Cheers,&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 09:41:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-assign-a-task-based-on-noderef/m-p/37278#M15692</guid>
      <dc:creator>EddieMay</dc:creator>
      <dc:date>2020-04-02T09:41:03Z</dc:date>
    </item>
  </channel>
</rss>

