Java Code Examples for org.activiti.bpmn.model.ScriptTask#getScriptFormat()

The following examples show how to use org.activiti.bpmn.model.ScriptTask#getScriptFormat() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DefaultActivityBehaviorFactory.java    From activiti6-boot2 with Apache License 2.0 5 votes vote down vote up
public ScriptTaskActivityBehavior createScriptTaskActivityBehavior(ScriptTask scriptTask) {
  String language = scriptTask.getScriptFormat();
  if (language == null) {
    language = ScriptingEngines.DEFAULT_SCRIPTING_LANGUAGE;
  }
  return new ScriptTaskActivityBehavior(scriptTask.getId(), scriptTask.getScript(), language, scriptTask.getResultVariable(), scriptTask.isAutoStoreVariables());
}
 
Example 2
Source File: DefaultActivityBehaviorFactory.java    From activiti6-boot2 with Apache License 2.0 5 votes vote down vote up
public ScriptTaskActivityBehavior createScriptTaskActivityBehavior(ScriptTask scriptTask) {
  String language = scriptTask.getScriptFormat();
  if (language == null) {
    language = ScriptingEngines.DEFAULT_SCRIPTING_LANGUAGE;
  }
  return new ScriptTaskActivityBehavior(scriptTask.getId(), scriptTask.getScript(), language, scriptTask.getResultVariable(), scriptTask.isAutoStoreVariables());
}
 
Example 3
Source File: SecureJavascriptTaskParseHandler.java    From activiti6-boot2 with Apache License 2.0 5 votes vote down vote up
@Override
protected void executeParse(BpmnParse bpmnParse, ScriptTask scriptTask) {
  String language = scriptTask.getScriptFormat();
  if (LANGUAGE_JAVASCRIPT.equalsIgnoreCase(language)) {
    createSecureJavascriptTaskBehavior(bpmnParse, scriptTask, language);
  } else {
    super.executeParse(bpmnParse, scriptTask);
  }
}