<?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 to authenticate contentService in workflow in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-to-authenticate-contentservice-in-workflow/m-p/11032#M4881</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am new on Alfresco. I am using community version 5.2&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my workflow I have service task with java class. There I get Alfresco service registry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Get services&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Map&amp;lt;Object, Object&amp;gt; registeredBeans = Context.getProcessEngineConfiguration().getBeans();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ServiceRegistry registry = (ServiceRegistry)registeredBeans.get(ActivitiConstants.SERVICE_REGISTRY_BEAN_KEY);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ContentService contentService = registry.getContentService();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to use content service to read content of document associated with workflow&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;// Get Document&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;ActivitiScriptNode scriptNode = (ActivitiScriptNode) execution.getVariable("docnode");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;docref = new NodeRef("workspace://SpacesStore/18fb353f-d525-4dbc-98ec-d91a3faccbe0"); //test with fixed existing file in repo&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;ContentReader reader = contentService.getReader(docref, ContentModel.PROP_CONTENT);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;originalInputStream = reader.getContentInputStream();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;filename = scriptNode.getName();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class=""&gt;Unfortunately &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;contentService.getReader&lt;/SPAN&gt; ends up with excetion&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Caused by: net.sf.acegisecurity.providers.ProviderNotFoundException: No authentication provider for net.sf.acegisecurity.providers.UsernamePasswordAuthenticationToken&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help me plesase how to get rid of it.&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Feb 2017 14:32:43 GMT</pubDate>
    <dc:creator>pnature</dc:creator>
    <dc:date>2017-02-10T14:32:43Z</dc:date>
    <item>
      <title>How to authenticate contentService in workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-authenticate-contentservice-in-workflow/m-p/11032#M4881</link>
      <description>HiI am new on Alfresco. I am using community version 5.2&amp;nbsp;In my workflow I have service task with java class. There I get Alfresco service registry&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Get services&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Map&amp;lt;Object, Object&amp;gt; registeredBeans = Context.getProcessEngineConfiguration().getBeans();&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Service</description>
      <pubDate>Fri, 10 Feb 2017 14:32:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-authenticate-contentservice-in-workflow/m-p/11032#M4881</guid>
      <dc:creator>pnature</dc:creator>
      <dc:date>2017-02-10T14:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to authenticate contentService in workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-authenticate-contentservice-in-workflow/m-p/11033#M4882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may need to provide additional information about your workflow. Specifically I would be interested to know how the service task is integrated into the execution flow, e.g. if it is an asynchronous service task, triggered by a timer or some other condition that can lead to it being executed without an active user authentication.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2017 16:42:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-authenticate-contentservice-in-workflow/m-p/11033#M4882</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2017-02-10T16:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to authenticate contentService in workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-authenticate-contentservice-in-workflow/m-p/11034#M4883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, thank you for response. &lt;/P&gt;&lt;P&gt;As I wrote service task is java class type&lt;/P&gt;&lt;P&gt;&amp;lt;serviceTask id="servicetask1" name="Send Mail" activiti:class="com.comp.sendMailProcess.task.sendMail"/&amp;gt;&lt;/P&gt;&lt;P&gt;Implementation I described in question above. There is not any other condition.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2017 08:12:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-authenticate-contentservice-in-workflow/m-p/11034#M4883</guid>
      <dc:creator>pnature</dc:creator>
      <dc:date>2017-02-13T08:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to authenticate contentService in workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-authenticate-contentservice-in-workflow/m-p/11035#M4884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That doesn't help at all - it'd probably be best/easiest for you to just attach the BPMN file...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2017 16:00:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-authenticate-contentservice-in-workflow/m-p/11035#M4884</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2017-02-13T16:00:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to authenticate contentService in workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-authenticate-contentservice-in-workflow/m-p/11036#M4885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. I have attached BPMN, java class and java script to start process.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2017 08:03:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-authenticate-contentservice-in-workflow/m-p/11036#M4885</guid>
      <dc:creator>pnature</dc:creator>
      <dc:date>2017-02-14T08:03:06Z</dc:date>
    </item>
  </channel>
</rss>

