
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2017 03:24 PM
I'm trying to Base64 encode a file that a user uploads in an Activiti form, and then save the resulting encoding as a string to be accessed by other parts of the business process. I thought a Groovy Script in a Script task would be the best way to do this. How do I access the file in the script?
Would something like:
execution.getVariable('file');
give me access to the raw file?
Thanks!
- Labels:
-
Alfresco Process Services

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2017 01:14 PM
Managed to solve this issue! We had to change the activiti-app.properties configuration file to set:
# Beans whitelisting
beans.whitelisting.enabled=false
# EL whitelisting
el.whitelisting.enabled=false

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2017 05:04 PM
Thanks so much that's really helpful! Unfortunately, I'm getting this error:
problem evaluating script: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: relatedContentService for class: Script1
Any thoughts?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2017 05:15 PM
No idea, I built this just now in my 1.6.1 environment and it runs ok (Process Services 1.6.1 on Tomcat).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2017 01:14 PM
Managed to solve this issue! We had to change the activiti-app.properties configuration file to set:
# Beans whitelisting
beans.whitelisting.enabled=false
# EL whitelisting
el.whitelisting.enabled=false
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2017 10:36 AM
Ahh yes, Alfresco in their infinite wisdom decided to lock down security by disabling access to beans without telling anyone in 1.6.
Should have thought of that.
Greg
#bp3
