i used the template example for Leave Request submission and approval,i followed all the documentation and in configuration of the connector i added the key named 'user', that is mapped to the business variable 'user',
it said in this example that
If the keys are mapped with complex objects, pass the high level object to the mapping (eg. 'user'). The connector will handle the sub-structure of this complex object (eg. ${user.firstName}),
but in my case ${user.firstName} (and all sub-structure of 'user' complex object) didn't display nothing in the template, why ? any help please
In your connector configuration, the mapping is not good. You are using script expression that return java.lang.String so your business variable are automatically cast into String values at runtime.
You can either bind the business variable directly in the expression editor without using a script expression, or set the return type expression to the proper business object type (eg: com.company.model.MyUser)
If you return a String then, then the template engine will not be able to navigate in your objects.
how i will do that? , you mean if i tried to log "user.firstName" in the script , yes i did it, and it give me result but the issue is in the docx template didn't display the value of ${user.firstName}!
can you explain more how can i troubleshoot the issue?
i want to share my project "leaveRequest" file , but i don't how to upload it here, the same thing with the pictures , I didn't know how to upload it from my desktop (even if i copy paste the images it didn't display in the comment)
please how can i test the bos file that you sent me.
In your connector configuration, the mapping is not good.
You are using script expression that return java.lang.String so your business variable are automatically cast into String values at runtime.
You can either bind the business variable directly in the expression editor without using a script expression, or set the return type expression to the proper business object type (eg: com.company.model.MyUser)
If you return a String then, then the template engine will not be able to navigate in your objects.
Bonitasoft empowers development teams with Bonita, the open-source and extensible platform to solve the most demanding process automation use cases. The Bonita platform accelerates delivery of complex applications with clear separation between capabilities for visual programming and for coding. Bonita integrates with existing solutions, orchestrates heterogeneous systems, and provides deep visibility into processes across the organization.