Hello,
I need to create a document template to generate a report at the end of my process.
In the App designer, I use the task "Generate document".
In my Word template, I use variables from my process as follows:
<<[variables.get("myVariable","")]>
These variables are well displayed in my generated document.
On the other hand, I would also like to use audit variables such as:
<<[auditInfo.getProcessInstanceName()]>>
<<[auditInfo.getProcessInstanceStartTime()]>>
<<foreach [in auditInfo.getEntries()]>><</foreach>>
But I get this error when generating :
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)
The alfresco documentation states that it should be done this way and that "auditInfo" can be used:
https://docs.alfresco.com/process-services/latest/develop/dev-ext/#document-templates
Do you have a solution?
Thank you in advance.
Loïc