public static IProcessBuilder CreateProcess() { IBpmnModelInstance modelInstance = Instance.DoCreateEmptyModel(); IDefinitions definitions = modelInstance.NewInstance <IDefinitions>(typeof(IDefinitions)); definitions.TargetNamespace = BpmnModelConstants.Bpmn20Ns; definitions.DomElement.RegisterNamespace("camunda", BpmnModelConstants.CamundaNs); modelInstance.Definitions = definitions; IProcess process = modelInstance.NewInstance <IProcess>(typeof(IProcess)); definitions.AddChildElement(process); IBpmnDiagram bpmnDiagram = modelInstance.NewInstance <IBpmnDiagram>(typeof(IBpmnDiagram)); IBpmnPlane bpmnPlane = modelInstance.NewInstance <IBpmnPlane>(typeof(IBpmnPlane)); bpmnPlane.BpmnElement = process; bpmnDiagram.AddChildElement(bpmnPlane); definitions.AddChildElement(bpmnDiagram); return(process.Builder()); }