<?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: BusinessKey is null for Executions in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/businesskey-is-null-for-executions/m-p/87163#M59009</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;getProcessBusinessKey throws NullPointerException.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;java.lang.NullPointerException&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.engine.impl.persistence.entity.ExecutionEntity.ensureProcessInstanceInitialized(ExecutionEntity.java:669)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.engine.impl.persistence.entity.ExecutionEntity.getProcessInstance(ExecutionEntity.java:663)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.engine.impl.persistence.entity.ExecutionEntity.getProcessBusinessKey(ExecutionEntity.java:624)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And I cannot query the other executions with createExecutionQuery().processInstanceBusinessKey(), because their business key is null. I think the executions after the parallelgateway should be equals the businesskey of the parallelgateway.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;What about the "getProcessBusinessKey()" on the DelegateExecution? This should return the business-key set at the beginning not the process… The getBusinessKey() will only work if the execution you're using is the process-instance itself. &lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;/** The business key for this execution. Only returns a value if the delegate execution&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * is a process instance.&lt;BR /&gt;&amp;nbsp;&amp;nbsp; *&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; * @deprecated use {@link #getProcessBusinessKey()} to get the business key for the process&lt;BR /&gt;&amp;nbsp;&amp;nbsp; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; associated with this execution, regardless whether or not this execution is a &lt;BR /&gt;&amp;nbsp;&amp;nbsp; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; process-instance. &lt;BR /&gt;&amp;nbsp;&amp;nbsp; */&lt;BR /&gt;&amp;nbsp; String getBusinessKey();&lt;BR /&gt;&lt;/CODE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Jun 2012 12:47:49 GMT</pubDate>
    <dc:creator>vicziani</dc:creator>
    <dc:date>2012-06-18T12:47:49Z</dc:date>
    <item>
      <title>BusinessKey is null for Executions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/businesskey-is-null-for-executions/m-p/87161#M59007</link>
      <description>I have a workflow with two User Task after a Parallel Gateway. I start the process with a BusinessKey. After that I have three executions. The BusinessKey of the execution of the parallel gateway is ok, but the BusinessKeys of the two User Tasks are null.Is it normal?</description>
      <pubDate>Fri, 15 Jun 2012 15:00:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/businesskey-is-null-for-executions/m-p/87161#M59007</guid>
      <dc:creator>vicziani</dc:creator>
      <dc:date>2012-06-15T15:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: BusinessKey is null for Executions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/businesskey-is-null-for-executions/m-p/87162#M59008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What about the "getProcessBusinessKey()" on the DelegateExecution? This should return the business-key set at the beginning not the process… The getBusinessKey() will only work if the execution you're using is the process-instance itself. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;/** The business key for this execution. Only returns a value if the delegate execution&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * is a process instance.&lt;BR /&gt;&amp;nbsp;&amp;nbsp; *&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; * @deprecated use {@link #getProcessBusinessKey()} to get the business key for the process&lt;BR /&gt;&amp;nbsp;&amp;nbsp; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; associated with this execution, regardless whether or not this execution is a &lt;BR /&gt;&amp;nbsp;&amp;nbsp; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; process-instance. &lt;BR /&gt;&amp;nbsp;&amp;nbsp; */&lt;BR /&gt;&amp;nbsp; String getBusinessKey();&lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2012 08:35:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/businesskey-is-null-for-executions/m-p/87162#M59008</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-06-18T08:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: BusinessKey is null for Executions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/businesskey-is-null-for-executions/m-p/87163#M59009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;getProcessBusinessKey throws NullPointerException.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;java.lang.NullPointerException&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.engine.impl.persistence.entity.ExecutionEntity.ensureProcessInstanceInitialized(ExecutionEntity.java:669)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.engine.impl.persistence.entity.ExecutionEntity.getProcessInstance(ExecutionEntity.java:663)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.engine.impl.persistence.entity.ExecutionEntity.getProcessBusinessKey(ExecutionEntity.java:624)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And I cannot query the other executions with createExecutionQuery().processInstanceBusinessKey(), because their business key is null. I think the executions after the parallelgateway should be equals the businesskey of the parallelgateway.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;What about the "getProcessBusinessKey()" on the DelegateExecution? This should return the business-key set at the beginning not the process… The getBusinessKey() will only work if the execution you're using is the process-instance itself. &lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;/** The business key for this execution. Only returns a value if the delegate execution&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * is a process instance.&lt;BR /&gt;&amp;nbsp;&amp;nbsp; *&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; * @deprecated use {@link #getProcessBusinessKey()} to get the business key for the process&lt;BR /&gt;&amp;nbsp;&amp;nbsp; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; associated with this execution, regardless whether or not this execution is a &lt;BR /&gt;&amp;nbsp;&amp;nbsp; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; process-instance. &lt;BR /&gt;&amp;nbsp;&amp;nbsp; */&lt;BR /&gt;&amp;nbsp; String getBusinessKey();&lt;BR /&gt;&lt;/CODE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2012 12:47:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/businesskey-is-null-for-executions/m-p/87163#M59009</guid>
      <dc:creator>vicziani</dc:creator>
      <dc:date>2012-06-18T12:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: BusinessKey is null for Executions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/businesskey-is-null-for-executions/m-p/87164#M59010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The null pointer is due to the fact you're nog using the execution inside activiti context (e.g.. JavaDelegate, listener) but rater just use the pogo that comes out of a query.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The query-method you are referring to only selects process-instances which have the given business key set. Since a business-key is a unique identifier for a single process-instance (also enforced on db-level), it doesn't make sense setting the BUSINESS_KEY_ field on the child executions as well (defeats the purpose). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want all child-executions of the process-instances with a given business-key, use this approach:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;ProcessInstance pi&amp;nbsp; = runtime.createProcessInstanceQuery().processInstanceBusinessKey("myKey").singleResult();&lt;BR /&gt;List&amp;lt;Execution&amp;gt; executions = runtime.createExecutionQuery().processInstanceId(pi.getId().list();&lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2012 13:00:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/businesskey-is-null-for-executions/m-p/87164#M59010</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-06-18T13:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: BusinessKey is null for Executions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/businesskey-is-null-for-executions/m-p/87165#M59011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you very much, understood, this works for me! &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2012 10:54:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/businesskey-is-null-for-executions/m-p/87165#M59011</guid>
      <dc:creator>vicziani</dc:creator>
      <dc:date>2012-06-20T10:54:35Z</dc:date>
    </item>
  </channel>
</rss>

