As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
From script task, how to get an endpoint from a tenant?
could you please describe your question a bit more?
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.
You can access Endpoint from script task like below.
I have tried with javascript.
java.lang.System.out.println(endpointService.getConfigurationByName("Demo").getHost());
Where can you find endpointService documentation?
org.activiti.engine.ActivitiException: problem evaluating script: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: endpointService for class: Script7
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=falsevalidator.editor.bpmn.disable.scripttask.groovy=false
beans.whitelisting.enabled=true