@Override
    public boolean execute(
            WorkflowModel workflow, TaskModel task, WorkflowExecutor workflowExecutor) {
        Map<String, Object> taskInput = task.getInputData();
        String scriptExpression;
        try {
            scriptExpression = (String) taskInput.get(QUERY_EXPRESSION_PARAMETER);
            if (StringUtils.isNotBlank(scriptExpression)) {
                String scriptExpressionBuilder =
                        "function scriptFun(){" + scriptExpression + "} scriptFun();";

                LOGGER.debug(
                        "scriptExpressionBuilder: {}, task: {}",
                        scriptExpressionBuilder,
                        task.getTaskId());
                Object returnValue = ScriptEvaluator.eval(scriptExpressionBuilder, taskInput);
                task.addOutput("result", returnValue);
                task.setStatus(TaskModel.Status.COMPLETED);
            } else {
                LOGGER.error("Empty {} in Lambda task. ", QUERY_EXPRESSION_PARAMETER);
                task.setReasonForIncompletion(
                        "Empty '"
                                + QUERY_EXPRESSION_PARAMETER
                                + "' in Lambda task's input parameters. A non-empty String value must be provided.");
                task.setStatus(TaskModel.Status.FAILED);
            }
        } catch (Exception e) {
            LOGGER.error(
                    "Failed to execute Lambda Task: {} in workflow: {}",
                    task.getTaskId(),
                    workflow.getWorkflowId(),
                    e);
            task.setStatus(TaskModel.Status.FAILED);
            task.setReasonForIncompletion(e.getMessage());
            task.addOutput(
                    "error", e.getCause() != null ? e.getCause().getMessage() : e.getMessage());
        }
        return true;
    }
@author X-Ultra
    <p>Task that enables execute Lambda script at workflow execution, For example,
    <pre>
...
{
 "tasks": [
     {
         "name": "LAMBDA",
         "taskReferenceName": "lambda_test",
         "type": "LAMBDA",
         "inputParameters": {
             "input": "${workflow.input}",
             "scriptExpression": "if ($.input.a==1){return {testvalue: true}} else{return {testvalue: false} }"
         }
     }
 ]
}
...
</pre>
    then to use task output, e.g. <code>script_test.output.testvalue</code>
@deprecated {@link Lambda} is deprecated. Use {@link Inline} task for inline expression
    evaluation. Also see ${@link com.netflix.conductor.common.metadata.workflow.WorkflowTask})
core/src/main/java/com/netflix/conductor/core/execution/tasks/Lambda.java