use of org.activiti.bpmn.model.ScriptTask in project Activiti by Activiti.
the class ScriptStepDefinitionConverter method createProcessArtifact.
@Override
protected ScriptTask createProcessArtifact(ScriptStepDefinition stepDefinition, WorkflowDefinitionConversion conversion) {
ScriptTask scriptTask = new ScriptTask();
scriptTask.setId(conversion.getUniqueNumberedId(ConversionConstants.SCRIPT_TASK_ID_PREFIX));
scriptTask.setName(stepDefinition.getName());
scriptTask.setScript(stepDefinition.getScript());
if (stepDefinition.getScriptLanguage() != null) {
scriptTask.setScriptFormat(stepDefinition.getScriptLanguage());
} else {
scriptTask.setScriptFormat("JavaScript");
}
addFlowElement(conversion, scriptTask, true);
return scriptTask;
}
use of org.activiti.bpmn.model.ScriptTask in project Activiti by Activiti.
the class ScriptTaskJsonConverter method convertJsonToElement.
protected FlowElement convertJsonToElement(JsonNode elementNode, JsonNode modelNode, Map<String, JsonNode> shapeMap) {
ScriptTask task = new ScriptTask();
task.setScriptFormat(getPropertyValueAsString(PROPERTY_SCRIPT_FORMAT, elementNode));
task.setScript(getPropertyValueAsString(PROPERTY_SCRIPT_TEXT, elementNode));
return task;
}
Aggregations