use of org.camunda.bpm.model.bpmn.instance.ScriptTask in project camunda-bpmn-model by camunda.
the class ScriptTaskImpl method registerType.
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(ScriptTask.class, BPMN_ELEMENT_SCRIPT_TASK).namespaceUri(BPMN20_NS).extendsType(Task.class).instanceProvider(new ModelTypeInstanceProvider<ScriptTask>() {
public ScriptTask newInstance(ModelTypeInstanceContext instanceContext) {
return new ScriptTaskImpl(instanceContext);
}
});
scriptFormatAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_SCRIPT_FORMAT).build();
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
scriptChild = sequenceBuilder.element(Script.class).build();
/**
* camunda extensions
*/
camundaResultVariableAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_RESULT_VARIABLE).namespace(CAMUNDA_NS).build();
camundaResourceAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_RESOURCE).namespace(CAMUNDA_NS).build();
typeBuilder.build();
}
Aggregations