<?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: Event Handlers/Action Chains triggered on new document contained in folder vs workspace!? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/event-handlers-action-chains-triggered-on-new-document-contained/m-p/317073#M4074</link>
    <description>&lt;P&gt;Can you please be a bit more precise of your chain/Event handler configuration. You can just edit your question this will be more readable.&lt;/P&gt;</description>
    <pubDate>Thu, 19 Jan 2012 19:28:56 GMT</pubDate>
    <dc:creator>Benjamin_Jalon1</dc:creator>
    <dc:date>2012-01-19T19:28:56Z</dc:date>
    <item>
      <title>Event Handlers/Action Chains triggered on new document contained in folder vs workspace!?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/event-handlers-action-chains-triggered-on-new-document-contained/m-p/317072#M4073</link>
      <description>&lt;P&gt;I have at least three different (using a similar configuration pattern) Event/Handler/Action Chain pairs working to fill out fields in newly created folders and documents extended from folders.&lt;/P&gt;
&lt;P&gt;I cannot get a similar Event Handler/Action Chain pair working when creating a document in a workspace.&lt;/P&gt;
&lt;P&gt;Are there any subtle differences with respect to Event Handlers/Action Chains between folders and workspaces that I should be addressing?&lt;/P&gt;
&lt;P&gt;The symptom is the document context,created in the workspace, is not passed to the action chain when the chain is fired so I can't manipulate the field entries. The action chain is a carbon copy of the one working on folders. The chain does fire, the context is not available.&lt;/P&gt;
&lt;P&gt;Hope this example clears up what I'm trying to do.&lt;/P&gt;
&lt;P&gt;Action Chain Example: (Content view query):&lt;/P&gt;
&lt;P&gt;ecm:mixinType != 'HiddenInNavigation' AND ecm:isCheckedInVersion = 0 AND
ecm:currentLifeCycleState != 'delete' AND ecm:isProxy = 1 AND ecm:primaryType = 'ZCtrlDocument'&lt;/P&gt;
&lt;P&gt;I get a single document from this query. Yes, it's in a section and published. I just want to read some of the meta data first then put that data into the document being created.&lt;/P&gt;
&lt;P&gt;Here's the test action chain that's fired from my User Action:&lt;/P&gt;
&lt;P&gt;FETCH -&amp;gt; UI SELECTION
USER INTERFACE -&amp;gt; ADD INFO MESSAGE  value: expr:@{Document["dc:title"]}&lt;/P&gt;
&lt;P&gt;that's it!&lt;/P&gt;
&lt;P&gt;I get the following:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;Caused by: [Error: could not access: Document; in class: null]
[Near : {... Unknown ....}]
             ^
[Line: 1, Column: 0]
        at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getBeanProperty(ReflectiveAccessorOptimizer.java:595)
        at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getCollectionProperty(ReflectiveAccessorOptimizer.java:609)
        at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:317)
        at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:137)
        at org.mvel2.optimizers.dynamic.DynamicOptimizer.optimizeAccessor(DynamicOptimizer.java:63)
        at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:137)
        at org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:41)
        at org.mvel2.MVEL.executeExpression(MVEL.java:1001)
        at org.mvel2.templates.res.CompiledTerminalExpressionNode.eval(CompiledTerminalExpressionNode.java:56)
        at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:235)
        at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:230)
        at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:220)
        at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:164)
        at org.nuxeo.ecm.automation.core.scripting.MvelTemplate.eval(MvelTemplate.java:38)
        at org.nuxeo.ecm.automation.core.impl.OperationTypeImpl.inject(OperationTypeImpl.java:158)
        at org.nuxeo.ecm.automation.core.impl.OperationTypeImpl.newInstance(OperationTypeImpl.java:149)
        at org.nuxeo.ecm.automation.core.impl.InvokableMethod.doInvoke(InvokableMethod.java:114)
        at org.nuxeo.ecm.automation.core.impl.InvokableMethod.invoke(InvokableMethod.java:132)
        ... 112 more
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 Jan 2012 00:26:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/event-handlers-action-chains-triggered-on-new-document-contained/m-p/317072#M4073</guid>
      <dc:creator>karl_harris_</dc:creator>
      <dc:date>2012-01-18T00:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: Event Handlers/Action Chains triggered on new document contained in folder vs workspace!?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/event-handlers-action-chains-triggered-on-new-document-contained/m-p/317073#M4074</link>
      <description>&lt;P&gt;Can you please be a bit more precise of your chain/Event handler configuration. You can just edit your question this will be more readable.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2012 19:28:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/event-handlers-action-chains-triggered-on-new-document-contained/m-p/317073#M4074</guid>
      <dc:creator>Benjamin_Jalon1</dc:creator>
      <dc:date>2012-01-19T19:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: Event Handlers/Action Chains triggered on new document contained in folder vs workspace!?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/event-handlers-action-chains-triggered-on-new-document-contained/m-p/317074#M4075</link>
      <description>&lt;P&gt;I just copy what Alain told me to copy here &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Actually, I think that your null pointer exception is for the object "Document". What you should do is, just after the Fetch Selected Documents, to run an Execution Flow &amp;gt; Run Document Chain. The reason is that the "Document" object is not available when the input is "Documents".&lt;/P&gt;
&lt;P&gt;You can see a sample of this at the page 99 on &lt;A href="http://doc.nuxeo.com/display/Studio/Nuxeo+Studio+Training+slides"&gt;the following slides&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;A stacktrace would help to make sure of what is null.&lt;/P&gt;
&lt;P&gt;Hope this answer will help you.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2012 10:18:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/event-handlers-action-chains-triggered-on-new-document-contained/m-p/317074#M4075</guid>
      <dc:creator>Benjamin_Jalon1</dc:creator>
      <dc:date>2012-01-20T10:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: Event Handlers/Action Chains triggered on new document contained in folder vs workspace!?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/event-handlers-action-chains-triggered-on-new-document-contained/m-p/317075#M4076</link>
      <description>&lt;P&gt;Duh, sorry for having to repeat the answer.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2012 19:30:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/event-handlers-action-chains-triggered-on-new-document-contained/m-p/317075#M4076</guid>
      <dc:creator>karl_harris_</dc:creator>
      <dc:date>2012-01-20T19:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: Event Handlers/Action Chains triggered on new document contained in folder vs workspace!?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/event-handlers-action-chains-triggered-on-new-document-contained/m-p/317076#M4077</link>
      <description>&lt;P&gt;No problem, this is just because I'm not expert as Alain is&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2012 22:25:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/event-handlers-action-chains-triggered-on-new-document-contained/m-p/317076#M4077</guid>
      <dc:creator>Benjamin_Jalon1</dc:creator>
      <dc:date>2012-01-20T22:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: Event Handlers/Action Chains triggered on new document contained in folder vs workspace!?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/event-handlers-action-chains-triggered-on-new-document-contained/m-p/317077#M4078</link>
      <description>&lt;P&gt;any update ?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2012 15:22:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/event-handlers-action-chains-triggered-on-new-document-contained/m-p/317077#M4078</guid>
      <dc:creator>Benjamin_Jalon1</dc:creator>
      <dc:date>2012-03-14T15:22:16Z</dc:date>
    </item>
  </channel>
</rss>

