当前位置: 首页>>代码示例>>Java>>正文


Java SubProcess类代码示例

本文整理汇总了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 };
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:22,代码来源:CreateSecurityBodFeature.java

示例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 };
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:22,代码来源:CreateSecuritySodFeature.java

示例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 };
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:22,代码来源:CreateUserTaskFeature.java

示例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 };
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:17,代码来源:CreateManualTaskFeature.java

示例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 };
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:19,代码来源:CreateEndEventFeature.java

示例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 };
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:18,代码来源:CreateBusinessRuleTaskFeature.java

示例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 };
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:21,代码来源:CreateTimerStartEventFeature.java

示例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 };
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:17,代码来源:CreateExclusiveGatewayFeature.java

示例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 };
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:17,代码来源:CreateReceiveTaskFeature.java

示例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;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:24,代码来源:DeleteFlowElementFeature.java

示例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 };

}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:21,代码来源:CreateCallActivityFeature.java

示例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;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:18,代码来源:SubProcessResizeFeature.java

示例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 };
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:17,代码来源:CreateMailTaskFeature.java

示例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 };
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:19,代码来源:CreateStartEventFeature.java

示例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 };
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:21,代码来源:CreateErrorEndEventFeature.java


注:本文中的org.eclipse.bpmn2.SubProcess类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。