@Override public Map<String, Object> evaluateGroovyExpressions(final Map<String, String> expressions, final ProcessDefinitionUUID processDefinitionUUID, final Map<String, Object> context, final Map<String, String> options) throws InstanceNotFoundException, GroovyException, ProcessNotFoundException { return getAPI(options).evaluateGroovyExpressions(expressions, processDefinitionUUID, context); }
@Override public Map<String, Object> evaluateGroovyExpressions(final Map<String, String> expression, final ProcessInstanceUUID processInstanceUUID, final Map<String, Object> context, final boolean useInitialVariableValues, final boolean propagate, final Map<String, String> options) throws InstanceNotFoundException, GroovyException, RemoteException { return getAPI(options).evaluateGroovyExpressions(expression, processInstanceUUID, context, useInitialVariableValues, propagate); }
@Override public Map<String, Object> evaluateGroovyExpressions(final Map<String, String> expressions, final ActivityInstanceUUID activityUUID, final Map<String, Object> context, final boolean useActivityScope, final boolean propagate, final Map<String, String> options) throws InstanceNotFoundException, ActivityNotFoundException, GroovyException { return getAPI(options).evaluateGroovyExpressions(expressions, activityUUID, context, useActivityScope, propagate); }
protected void executeActions(final RuntimeAPI runtimeAPI) throws Exception { if (scriptsToExecute != null && !scriptsToExecute.isEmpty() ) { Map<String,String> scriptsToExecuteInASingleCall = new HashMap<String, String>(scriptsToExecute.size()); for (String scriptToExecute : scriptsToExecute) { scriptsToExecuteInASingleCall.put(String.valueOf(scriptsToExecuteInASingleCall.size()), scriptToExecute); } try { runtimeAPI.evaluateGroovyExpressions(scriptsToExecuteInASingleCall, processDefinitionUUID, scriptContext); } catch (GroovyException e) { if (LOG.isLoggable(Level.SEVERE)) { LOG.log(Level.SEVERE, "Error while executing action. unable to evaluate the groovy expression", e); } throw new GroovyException(e.getMessage() ,e); } } }
protected void executeActions(final RuntimeAPI runtimeAPI) throws Exception { if (scriptsToExecute != null && !scriptsToExecute.isEmpty() ) { Map<String,String> scriptsToExecuteInASingleCall = new HashMap<String, String>(scriptsToExecute.size()); for (String scriptToExecute : scriptsToExecute) { scriptsToExecuteInASingleCall.put(String.valueOf(scriptsToExecuteInASingleCall.size()), scriptToExecute); } try { runtimeAPI.evaluateGroovyExpressions(scriptsToExecuteInASingleCall, processDefinitionUUID, scriptContext); } catch (GroovyException e) { if (LOG.isLoggable(Level.SEVERE)) { LOG.log(Level.SEVERE, "Error while executing action. unable to evaluate the groovy expression", e); } throw new GroovyException(e.getMessage() ,e); } } }
runtimeAPI.evaluateGroovyExpressions(scriptsToExecuteInParallel, taskUUID, scriptContext, false, true); } catch (final GroovyException e) { EnvTool.getTransaction().registerSynchronization(new MarkActivtyAsFailedSynchronization(taskUUID, Status.STATUS_COMMITTED));