<?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 Use &amp;quot;auditInfo&amp;quot; in a document template in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/use-quot-auditinfo-quot-in-a-document-template/m-p/20132#M8911</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;I need to create a document template to generate a report at the end of my process.&lt;/P&gt;&lt;P&gt;In the App designer, I use the task "Generate document".&lt;BR /&gt;In my Word template, I use variables from my process as follows:&lt;/P&gt;&lt;PRE&gt;&amp;lt;&amp;lt;[variables.get("myVariable","")]&amp;gt;&lt;/PRE&gt;&lt;P&gt;These variables are well displayed in my generated document.&lt;/P&gt;&lt;P&gt;On the other hand, I would also like to use audit variables such as:&lt;/P&gt;&lt;PRE&gt;&amp;lt;&amp;lt;[auditInfo.getProcessInstanceName()]&amp;gt;&amp;gt;
&amp;lt;&amp;lt;[auditInfo.getProcessInstanceStartTime()]&amp;gt;&amp;gt;
&amp;lt;&amp;lt;foreach [in auditInfo.getEntries()]&amp;gt;&amp;gt;&amp;lt;&amp;lt;/foreach&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;P&gt;But I get this error when generating :&lt;/P&gt;&lt;PRE&gt;java.lang.IllegalStateException: An error has been encountered at the end of expression 'auditInfo.getProcessInstanceName()'. Can not get the value of member 'auditInfo' on type 'class com.activiti.runtime.activiti.bean.docgen.ActivitiVariablesDataRecord'.
at asposewobfuscated.zzP6.zzZz(Unknown Source)
at asposewobfuscated.zzP6.zzZ(Unknown Source)
at asposewobfuscated.zzP6.zzZ(Unknown Source)
at asposewobfuscated.zzOS.zzOQ(Unknown Source)
at asposewobfuscated.zzVS.zzW9(Unknown Source)
at asposewobfuscated.zzOS.zzZ(Unknown Source)
at asposewobfuscated.zzDI.zzZ(Unknown Source)
at com.aspose.words.ReportingEngine.buildReport(Unknown Source)
at com.aspose.words.ReportingEngine.buildReport(Unknown Source)
at com.aspose.words.ReportingEngine.buildReport(Unknown Source)
at com.activiti.runtime.activiti.bean.docgen.GenerateDocumentBean.createDocument(GenerateDocumentBean.java:214)&lt;/PRE&gt;&lt;P&gt;The alfresco documentation states that it should be done this way and that "auditInfo" can be used:&lt;BR /&gt;&lt;A href="https://docs.alfresco.com/process-services/latest/develop/dev-ext/#document-templates" target="_blank" rel="noopener nofollow noreferrer"&gt;https://docs.alfresco.com/process-services/latest/develop/dev-ext/#document-templates&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Do you have a solution?&lt;BR /&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;Loïc&lt;/P&gt;</description>
    <pubDate>Tue, 30 Mar 2021 17:14:51 GMT</pubDate>
    <dc:creator>ltrichaud</dc:creator>
    <dc:date>2021-03-30T17:14:51Z</dc:date>
    <item>
      <title>Use "auditInfo" in a document template</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/use-quot-auditinfo-quot-in-a-document-template/m-p/20132#M8911</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;I need to create a document template to generate a report at the end of my process.&lt;/P&gt;&lt;P&gt;In the App designer, I use the task "Generate document".&lt;BR /&gt;In my Word template, I use variables from my process as follows:&lt;/P&gt;&lt;PRE&gt;&amp;lt;&amp;lt;[variables.get("myVariable","")]&amp;gt;&lt;/PRE&gt;&lt;P&gt;These variables are well displayed in my generated document.&lt;/P&gt;&lt;P&gt;On the other hand, I would also like to use audit variables such as:&lt;/P&gt;&lt;PRE&gt;&amp;lt;&amp;lt;[auditInfo.getProcessInstanceName()]&amp;gt;&amp;gt;
&amp;lt;&amp;lt;[auditInfo.getProcessInstanceStartTime()]&amp;gt;&amp;gt;
&amp;lt;&amp;lt;foreach [in auditInfo.getEntries()]&amp;gt;&amp;gt;&amp;lt;&amp;lt;/foreach&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;P&gt;But I get this error when generating :&lt;/P&gt;&lt;PRE&gt;java.lang.IllegalStateException: An error has been encountered at the end of expression 'auditInfo.getProcessInstanceName()'. Can not get the value of member 'auditInfo' on type 'class com.activiti.runtime.activiti.bean.docgen.ActivitiVariablesDataRecord'.
at asposewobfuscated.zzP6.zzZz(Unknown Source)
at asposewobfuscated.zzP6.zzZ(Unknown Source)
at asposewobfuscated.zzP6.zzZ(Unknown Source)
at asposewobfuscated.zzOS.zzOQ(Unknown Source)
at asposewobfuscated.zzVS.zzW9(Unknown Source)
at asposewobfuscated.zzOS.zzZ(Unknown Source)
at asposewobfuscated.zzDI.zzZ(Unknown Source)
at com.aspose.words.ReportingEngine.buildReport(Unknown Source)
at com.aspose.words.ReportingEngine.buildReport(Unknown Source)
at com.aspose.words.ReportingEngine.buildReport(Unknown Source)
at com.activiti.runtime.activiti.bean.docgen.GenerateDocumentBean.createDocument(GenerateDocumentBean.java:214)&lt;/PRE&gt;&lt;P&gt;The alfresco documentation states that it should be done this way and that "auditInfo" can be used:&lt;BR /&gt;&lt;A href="https://docs.alfresco.com/process-services/latest/develop/dev-ext/#document-templates" target="_blank" rel="noopener nofollow noreferrer"&gt;https://docs.alfresco.com/process-services/latest/develop/dev-ext/#document-templates&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Do you have a solution?&lt;BR /&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;Loïc&lt;/P&gt;</description>
      <pubDate>Tue, 30 Mar 2021 17:14:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/use-quot-auditinfo-quot-in-a-document-template/m-p/20132#M8911</guid>
      <dc:creator>ltrichaud</dc:creator>
      <dc:date>2021-03-30T17:14:51Z</dc:date>
    </item>
  </channel>
</rss>

