<?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: context.getprocessengineconfiguration() is null in evaluating expression in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/context-getprocessengineconfiguration-is-null-in-evaluating/m-p/205410#M158540</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In addition, the expressionManager is injected with Spring. but if i use:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ExpressionManager expressionManager = Context.getProcessEngineConfiguration() .getExpressionManager();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the Context.getProcessEngineConfiguration() is null and it throws NullPointerException.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 13 Jun 2015 10:19:12 GMT</pubDate>
    <dc:creator>mf</dc:creator>
    <dc:date>2015-06-13T10:19:12Z</dc:date>
    <item>
      <title>context.getprocessengineconfiguration() is null in evaluating expression</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/context-getprocessengineconfiguration-is-null-in-evaluating/m-p/205409#M158539</link>
      <description>I have a helper method to evaluate expressions in an execution&lt;IMG id="smileytongue" class="emoticon emoticon-smileytongue" src="https://migration33.stage.lithium.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;ublic Object evaluateExpression(DelegateExecution execution, String expr) {&amp;nbsp;&amp;nbsp;&amp;nbsp;Expression expression = expressionManager.createExpression(expr);&amp;nbsp;&amp;nbsp;&amp;nbsp;return expression.getValue(execution);}‍‍‍‍‍‍but in calling this method, the expression.ge</description>
      <pubDate>Sat, 13 Jun 2015 10:08:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/context-getprocessengineconfiguration-is-null-in-evaluating/m-p/205409#M158539</guid>
      <dc:creator>mf</dc:creator>
      <dc:date>2015-06-13T10:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: context.getprocessengineconfiguration() is null in evaluating expression</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/context-getprocessengineconfiguration-is-null-in-evaluating/m-p/205410#M158540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In addition, the expressionManager is injected with Spring. but if i use:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ExpressionManager expressionManager = Context.getProcessEngineConfiguration() .getExpressionManager();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the Context.getProcessEngineConfiguration() is null and it throws NullPointerException.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Jun 2015 10:19:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/context-getprocessengineconfiguration-is-null-in-evaluating/m-p/205410#M158540</guid>
      <dc:creator>mf</dc:creator>
      <dc:date>2015-06-13T10:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: context.getprocessengineconfiguration() is null in evaluating expression</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/context-getprocessengineconfiguration-is-null-in-evaluating/m-p/205411#M158541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When are you executing this? The nullpointer should not happen when you call that code during an API call, and a valid CommandContext is created.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 09:08:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/context-getprocessengineconfiguration-is-null-in-evaluating/m-p/205411#M158541</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2015-06-16T09:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: context.getprocessengineconfiguration() is null in evaluating expression</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/context-getprocessengineconfiguration-is-null-in-evaluating/m-p/205412#M158542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No api call is involved and no Command Context is created; because in my use-case, i need to evaluate some expressions manually. This issue is resolved by creating a custom command:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;public class EvauluateExpressionCmd implements Command&amp;lt;Object&amp;gt;, Serializable {&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; private static final long serialVersionUID = 1L;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; private Expression expression;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; private VariableScope variableScope;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; public EvauluateExpressionCmd(Expression expression, VariableScope variableScope) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; this.expression = expression;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; this.variableScope = variableScope;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; @Override&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; public Object execute(CommandContext commandContext) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; return expression.getValue(variableScope);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And execute it with ManagementService:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;public Object getValue(String expr, DelegateExecution execution) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Expression expression = expressionManager.createExpression(getEvaluableExpression(expr));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; EvauluateExpressionCmd command = new EvauluateExpressionCmd(expression, execution);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; return managementService.executeCommand(command);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color:#FF0000;"&gt;But i can't figure out, when exactly we need to create custom commands??&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 15:22:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/context-getprocessengineconfiguration-is-null-in-evaluating/m-p/205412#M158542</guid>
      <dc:creator>mf</dc:creator>
      <dc:date>2015-06-16T15:22:11Z</dc:date>
    </item>
    <item>
      <title>Re: context.getprocessengineconfiguration() is null in evaluating expression</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/context-getprocessengineconfiguration-is-null-in-evaluating/m-p/205413#M158543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When you need to run logic against an Activiti entity like the ExecutionEntity you always need a custom command, because it will need to be able to lookup Context values and be able to run a query against the Activiti entities.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 10:39:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/context-getprocessengineconfiguration-is-null-in-evaluating/m-p/205413#M158543</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2015-06-17T10:39:22Z</dc:date>
    </item>
  </channel>
</rss>

