02-11-2021 05:32 AM
02-12-2021 06:27 AM
could you please describe your question a bit more?
02-12-2021 10:53 AM
Yes, if you would like to call a REST endpoint form a groovy script, can you get the endpoint that is defined in the tenant somehow? Like the way you access process instance variables with execution.getVariable()?
The same endpoint definition that is used with REST call activity.
02-15-2021 08:01 AM
You can access Endpoint from script task like below.
I have tried with javascript.
java.lang.System.out.println(endpointService.getConfigurationByName("Demo").getHost());
02-15-2021 08:34 AM
Where can you find endpointService documentation?
02-15-2021 10:01 AM
org.activiti.engine.ActivitiException: problem evaluating script: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: endpointService for class: Script7
02-18-2021 01:08 AM
You need to unable script at below place.
process-services\tomcat\webapps\activiti-app\WEB-INF\classes\activiti\whitelisted-scripts.conf
You need to unable scripttask at like below.(activiti-app.properties)
validator.editor.bpmn.disable.scripttask=false
validator.editor.bpmn.disable.scripttask.groovy=false
beans.whitelisting.enabled=true
02-18-2021 04:26 AM
Yes, scripts and groovy have been enabled. The problem is that the runtime is unaware of endpointService. It needs to be defined somehow before calling. Referring to your other posts, it seems that you are injecting it with a bean. But is it your own mock implementation of EndpointService you are injecting or can you really access the endpoints defined in the tenant on Alfresco server runtime?
02-19-2021 01:32 AM
It is not mock implementation.
I am actually able to get endpoint which is defined i Tenant->Endpoints.
02-23-2021 09:08 AM
I have previously tried with groovy only. Now I tested your code and got this error:
jdk.nashorn.internal.runtime.ECMAException: ReferenceError: "endpointService" is not defined
Explore our Alfresco products with the links below. Use labels to filter content by product module.