<?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 No valid SecureContext in bpmn script in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/no-valid-securecontext-in-bpmn-script/m-p/33258#M14053</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a workflow which has an embedded script that does some messing around with permissions, which runs when the workflow finishes. I have the runas property set to "admin" for the task and for the most part this works. IF the overall action is triggered by a user action(completed by the assignee or canceled by the initiator ). But when it's triggered by a boundaryEvent timer I get the following error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;2017-02-28 10:44:04,645 ERROR [impl.jobexecutor.ExecuteJobsRunnable] [pool-17-thread-1] exception during job execution: 012814135 Found 1 integrity violations:&lt;BR /&gt;A valid SecureContext was not provided in the RequestContext&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Note it's the exact same piece of code running each time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the relevant snippet. I've also attached the entire file.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&amp;lt;extensionElements&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;activiti:executionListener event="end" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener"&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;activiti:field name="runAs"&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;activiti:string&amp;gt;&amp;lt;![CDATA[admin]]&amp;gt;&amp;lt;/activiti:string&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;/activiti:field&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;activiti:field name="script"&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;activiti:string&amp;gt;&amp;lt;![CDATA[&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;logger.error("process extensionElements end : " + person.properties.userName);&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;if( execution.getVariable('processextensionElementsend') != true )&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;var groupName = execution.getVariable('GroupName');&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;for (var i in bpm_package.children)&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;bpm_package.children[i].removePermission("SiteConsumer", "GROUP_" + groupName );&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;} &lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;groups.getGroup(groupName).deleteGroup();&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;execution.setVariable('processextensionElementsend',true); &lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;]]&amp;gt;&amp;lt;/activiti:string&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;/activiti:field&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;/activiti:executionListener&amp;gt;&lt;BR /&gt;&amp;lt;/extensionElements&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Feb 2017 21:16:28 GMT</pubDate>
    <dc:creator>georgera</dc:creator>
    <dc:date>2017-02-28T21:16:28Z</dc:date>
    <item>
      <title>No valid SecureContext in bpmn script</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/no-valid-securecontext-in-bpmn-script/m-p/33258#M14053</link>
      <description>I have a workflow which has an embedded script that does some messing around with permissions, which runs when the workflow finishes. I have the runas property set to "admin" for the task and for the most part this works. IF the overall action is triggered by a user action(completed by the assignee</description>
      <pubDate>Tue, 28 Feb 2017 21:16:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/no-valid-securecontext-in-bpmn-script/m-p/33258#M14053</guid>
      <dc:creator>georgera</dc:creator>
      <dc:date>2017-02-28T21:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: No valid SecureContext in bpmn script</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/no-valid-securecontext-in-bpmn-script/m-p/33259#M14054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure if the runAs property is actually supported in the stand alone Activiti product.&lt;/P&gt;&lt;P&gt;I can find no reference to runAs in the source outside the simple editor listener, however nothing appears to read the value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps I am wrong, would love to hear others comments.&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2017 22:36:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/no-valid-securecontext-in-bpmn-script/m-p/33259#M14054</guid>
      <dc:creator>gdharley</dc:creator>
      <dc:date>2017-02-28T22:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: No valid SecureContext in bpmn script</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/no-valid-securecontext-in-bpmn-script/m-p/33260#M14055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This isn't the standalone, though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2017 23:28:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/no-valid-securecontext-in-bpmn-script/m-p/33260#M14055</guid>
      <dc:creator>georgera</dc:creator>
      <dc:date>2017-02-28T23:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: No valid SecureContext in bpmn script</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/no-valid-securecontext-in-bpmn-script/m-p/33261#M14056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, I will move the thread to the Alfresco One frum then,&lt;BR /&gt;This forum is for stand-alone Activiti.&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Greg&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2017 13:28:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/no-valid-securecontext-in-bpmn-script/m-p/33261#M14056</guid>
      <dc:creator>gdharley</dc:creator>
      <dc:date>2017-03-01T13:28:37Z</dc:date>
    </item>
  </channel>
</rss>

