本文整理汇总了Java中org.eclipse.bpmn2.SubProcess类的典型用法代码示例。如果您正苦于以下问题:Java SubProcess类的具体用法?Java SubProcess怎么用?Java SubProcess使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SubProcess类属于org.eclipse.bpmn2包,在下文中一共展示了SubProcess类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: create
import org.eclipse.bpmn2.SubProcess; //导入依赖的package包/类
@Override
public Object[] create(ICreateContext context) {
BindingOfDuty bod = Securebpmn2Factory.eINSTANCE.createBindingOfDuty();
bod.setId(getNextId());
bod.setName("bod");
bod.setDynamicEnforcement(false);
Object parentObject = getBusinessObjectForPictogramElement(context.getTargetContainer());
if (parentObject instanceof SubProcess) {
((SubProcess) parentObject).getFlowElements().add(bod);
} else {
getDiagram().eResource().getContents().add(bod);
}
addGraphicalContent(bod, context);
// activate direct editing after object creation
getFeatureProvider().getDirectEditingInfo().setActive(true);
return new Object[] { bod };
}
示例2: create
import org.eclipse.bpmn2.SubProcess; //导入依赖的package包/类
@Override
public Object[] create(ICreateContext context) {
SeparationOfDuty sod = Securebpmn2Factory.eINSTANCE.createSeparationOfDuty();
sod.setId(getNextId());
sod.setName("sod");
sod.setDynamicEnforcement(false);
Object parentObject = getBusinessObjectForPictogramElement(context.getTargetContainer());
if (parentObject instanceof SubProcess) {
((SubProcess) parentObject).getFlowElements().add(sod);
} else {
getDiagram().eResource().getContents().add(sod);
}
addGraphicalContent(sod, context);
// activate direct editing after object creation
getFeatureProvider().getDirectEditingInfo().setActive(true);
return new Object[] { sod };
}
示例3: create
import org.eclipse.bpmn2.SubProcess; //导入依赖的package包/类
@Override
public Object[] create(ICreateContext context) {
UserTask newUserTask = Bpmn2Factory.eINSTANCE.createUserTask();
newUserTask.setId(getNextId());
setName("User Task", newUserTask, context);
Object parentObject = getBusinessObjectForPictogramElement(context.getTargetContainer());
if (parentObject instanceof SubProcess) {
((SubProcess) parentObject).getFlowElements().add(newUserTask);
} else {
getDiagram().eResource().getContents().add(newUserTask);
}
addGraphicalContent(newUserTask, context);
// activate direct editing after object creation
getFeatureProvider().getDirectEditingInfo().setActive(true);
return new Object[] { newUserTask };
}
示例4: create
import org.eclipse.bpmn2.SubProcess; //导入依赖的package包/类
@Override
public Object[] create(ICreateContext context) {
ManualTask newManualTask = Bpmn2Factory.eINSTANCE.createManualTask();
newManualTask.setId(getNextId());
setName("Manual Task", newManualTask, context);
Object parentObject = getBusinessObjectForPictogramElement(context.getTargetContainer());
if (parentObject instanceof SubProcess) {
((SubProcess) parentObject).getFlowElements().add(newManualTask);
} else {
getDiagram().eResource().getContents().add(newManualTask);
}
addGraphicalContent(newManualTask, context);
return new Object[] { newManualTask };
}
示例5: create
import org.eclipse.bpmn2.SubProcess; //导入依赖的package包/类
public Object[] create(ICreateContext context) {
EndEvent endEvent = Bpmn2Factory.eINSTANCE.createEndEvent();
endEvent.setId(getNextId());
endEvent.setName("End");
Object parentObject = getBusinessObjectForPictogramElement(context.getTargetContainer());
if (parentObject instanceof SubProcess) {
((SubProcess) parentObject).getFlowElements().add(endEvent);
} else {
getDiagram().eResource().getContents().add(endEvent);
}
addGraphicalContent(endEvent, context);
// return newly created business object(s)
return new Object[] { endEvent };
}
示例6: create
import org.eclipse.bpmn2.SubProcess; //导入依赖的package包/类
@Override
public Object[] create(ICreateContext context) {
BusinessRuleTask newBusinessRuleTask = Bpmn2Factory.eINSTANCE.createBusinessRuleTask();
newBusinessRuleTask.setId(getNextId());
setName("Business rule task", newBusinessRuleTask, context);
Object parentObject = getBusinessObjectForPictogramElement(context.getTargetContainer());
if (parentObject instanceof SubProcess) {
((SubProcess) parentObject).getFlowElements().add(newBusinessRuleTask);
} else {
getDiagram().eResource().getContents().add(newBusinessRuleTask);
}
addGraphicalContent(newBusinessRuleTask, context);
return new Object[] { newBusinessRuleTask };
}
示例7: create
import org.eclipse.bpmn2.SubProcess; //导入依赖的package包/类
public Object[] create(ICreateContext context) {
StartEvent startEvent = Bpmn2Factory.eINSTANCE.createStartEvent();
TimerEventDefinition timerEvent = Bpmn2Factory.eINSTANCE.createTimerEventDefinition();
startEvent.getEventDefinitions().add(timerEvent);
startEvent.setId(getNextId());
startEvent.setName("Timer start");
Object parentObject = getBusinessObjectForPictogramElement(context.getTargetContainer());
if (parentObject instanceof SubProcess) {
((SubProcess) parentObject).getFlowElements().add(startEvent);
} else {
getDiagram().eResource().getContents().add(startEvent);
}
addGraphicalRepresentation(context, startEvent);
// return newly created business object(s)
return new Object[] { startEvent };
}
示例8: create
import org.eclipse.bpmn2.SubProcess; //导入依赖的package包/类
public Object[] create(ICreateContext context) {
ExclusiveGateway exclusiveGateway = Bpmn2Factory.eINSTANCE.createExclusiveGateway();
exclusiveGateway.setId(getNextId());
exclusiveGateway.setName("Exclusive Gateway");
Object parentObject = getBusinessObjectForPictogramElement(context.getTargetContainer());
if (parentObject instanceof SubProcess) {
((SubProcess) parentObject).getFlowElements().add(exclusiveGateway);
} else {
getDiagram().eResource().getContents().add(exclusiveGateway);
}
addGraphicalContent(exclusiveGateway, context);
return new Object[] { exclusiveGateway };
}
示例9: create
import org.eclipse.bpmn2.SubProcess; //导入依赖的package包/类
@Override
public Object[] create(ICreateContext context) {
ReceiveTask newReceiveTask = Bpmn2Factory.eINSTANCE.createReceiveTask();
newReceiveTask.setId(getNextId());
setName("Receive Task", newReceiveTask, context);
Object parentObject = getBusinessObjectForPictogramElement(context.getTargetContainer());
if (parentObject instanceof SubProcess) {
((SubProcess) parentObject).getFlowElements().add(newReceiveTask);
} else {
getDiagram().eResource().getContents().add(newReceiveTask);
}
addGraphicalContent(newReceiveTask, context);
return new Object[] { newReceiveTask };
}
示例10: getFlowElement
import org.eclipse.bpmn2.SubProcess; //导入依赖的package包/类
private EObject getFlowElement(FlowElement flowElement) {
for (EObject diagramObject : getDiagram().eResource().getContents()) {
if(diagramObject instanceof FlowElement == false) continue;
// <SecureBPMN>
System.out.println(((FlowElement) diagramObject).getName());
// </SecureBPMN>
if (((FlowElement) diagramObject).getId().equals(flowElement.getId())) {
return diagramObject;
}
if (diagramObject instanceof SubProcess) {
for (FlowElement subFlowElement : ((SubProcess) diagramObject).getFlowElements()) {
if (subFlowElement.getId().equals(flowElement.getId())) {
return subFlowElement;
}
}
}
}
return null;
}
示例11: create
import org.eclipse.bpmn2.SubProcess; //导入依赖的package包/类
@Override
public Object[] create(ICreateContext context) {
CallActivity callActivity = Bpmn2Factory.eINSTANCE.createCallActivity();
callActivity.setId(getNextId());
setName("Call activity", callActivity, context);
Object parentObject = getBusinessObjectForPictogramElement(context.getTargetContainer());
if (parentObject instanceof SubProcess) {
((SubProcess) parentObject).getFlowElements().add(callActivity);
} else {
getDiagram().eResource().getContents().add(callActivity);
}
// do the add
addGraphicalContent(callActivity, context);
// return newly created business object(s)
return new Object[] { callActivity };
}
示例12: canResizeShape
import org.eclipse.bpmn2.SubProcess; //导入依赖的package包/类
@Override
public boolean canResizeShape(IResizeShapeContext context) {
boolean canResize = super.canResizeShape(context);
// perform further check only if move allowed by default feature
if (canResize == true) {
// don't allow resize if the class name has the length of 1
Shape shape = context.getShape();
Object bo = getBusinessObjectForPictogramElement(shape);
if (bo instanceof SubProcess) {
canResize = true;
} else {
canResize = false;
}
}
return canResize;
}
示例13: create
import org.eclipse.bpmn2.SubProcess; //导入依赖的package包/类
@Override
public Object[] create(ICreateContext context) {
MailTask newMailTask = Bpmn2Factory.eINSTANCE.createMailTask();
newMailTask.setId(getNextId());
setName("Mail Task", newMailTask, context);
Object parentObject = getBusinessObjectForPictogramElement(context.getTargetContainer());
if (parentObject instanceof SubProcess) {
((SubProcess) parentObject).getFlowElements().add(newMailTask);
} else {
getDiagram().eResource().getContents().add(newMailTask);
}
addGraphicalContent(newMailTask, context);
return new Object[] { newMailTask };
}
示例14: create
import org.eclipse.bpmn2.SubProcess; //导入依赖的package包/类
public Object[] create(ICreateContext context) {
StartEvent startEvent = Bpmn2Factory.eINSTANCE.createStartEvent();
startEvent.setId(getNextId());
startEvent.setName("Start");
Object parentObject = getBusinessObjectForPictogramElement(context.getTargetContainer());
if (parentObject instanceof SubProcess) {
((SubProcess) parentObject).getFlowElements().add(startEvent);
} else {
getDiagram().eResource().getContents().add(startEvent);
}
addGraphicalRepresentation(context, startEvent);
// return newly created business object(s)
return new Object[] { startEvent };
}
示例15: create
import org.eclipse.bpmn2.SubProcess; //导入依赖的package包/类
public Object[] create(ICreateContext context) {
EndEvent endEvent = Bpmn2Factory.eINSTANCE.createEndEvent();
ErrorEventDefinition eventDef = Bpmn2Factory.eINSTANCE.createErrorEventDefinition();
endEvent.getEventDefinitions().add(eventDef);
endEvent.setId(getNextId());
endEvent.setName("ErrorEnd");
Object parentObject = getBusinessObjectForPictogramElement(context.getTargetContainer());
if (parentObject instanceof SubProcess) {
((SubProcess) parentObject).getFlowElements().add(endEvent);
} else {
getDiagram().eResource().getContents().add(endEvent);
}
addGraphicalContent(endEvent, context);
// return newly created business object(s)
return new Object[] { endEvent };
}