本文整理汇总了Java中org.eclipse.bpmn2.ManualTask类的典型用法代码示例。如果您正苦于以下问题:Java ManualTask类的具体用法?Java ManualTask怎么用?Java ManualTask使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ManualTask类属于org.eclipse.bpmn2包,在下文中一共展示了ManualTask类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: create
import org.eclipse.bpmn2.ManualTask; //导入依赖的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 };
}
示例2: createManualTask
import org.eclipse.bpmn2.ManualTask; //导入依赖的package包/类
public static void createManualTask(EObject object, XMLStreamWriter xtw) throws Exception {
ManualTask manualTask = (ManualTask) object;
// start ManualTask element
xtw.writeStartElement("manualTask");
xtw.writeAttribute("id", manualTask.getId());
if (manualTask.getName() != null) {
xtw.writeAttribute("name", manualTask.getName());
}
DefaultFlowExport.createDefaultFlow(object, xtw);
AsyncActivityExport.createDefaultFlow(object, xtw);
ExtensionListenerExport.createExtensionListenerXML(manualTask.getActivitiListeners(), true, EXECUTION_LISTENER, xtw);
MultiInstanceExport.createMultiInstance(object, xtw);
// end ManualTask element
xtw.writeEndElement();
if(manualTask.getBoundaryEventRefs().size() > 0) {
for(BoundaryEvent event : manualTask.getBoundaryEventRefs()) {
BoundaryEventExport.createBoundaryEvent(event, xtw);
}
}
}
示例3: parseManualTask
import org.eclipse.bpmn2.ManualTask; //导入依赖的package包/类
private ManualTask parseManualTask(XMLStreamReader xtr) {
ManualTask manualTask = Bpmn2Factory.eINSTANCE.createManualTask();
manualTask.setName(xtr.getAttributeValue(null, "name"));
manualTask.setAsynchronous(parseAsync(xtr));
if (xtr.getAttributeValue(null, "default") != null) {
defaultFlowMap.put(manualTask, xtr.getAttributeValue(null, "default"));
}
boolean readyWithTask = false;
try {
while (readyWithTask == false && xtr.hasNext()) {
xtr.next();
if (xtr.isStartElement()
&& "extensionElements".equalsIgnoreCase(xtr.getLocalName())) {
manualTask.getActivitiListeners().addAll(parseListeners(xtr));
} else if (xtr.isStartElement()
&& "multiInstanceLoopCharacteristics".equalsIgnoreCase(xtr
.getLocalName())) {
MultiInstanceLoopCharacteristics multiInstanceDef = Bpmn2Factory.eINSTANCE
.createMultiInstanceLoopCharacteristics();
manualTask.setLoopCharacteristics(multiInstanceDef);
parseMultiInstanceDef(multiInstanceDef, xtr);
} else if (xtr.isEndElement()
&& "manualTask".equalsIgnoreCase(xtr.getLocalName())) {
readyWithTask = true;
}
}
} catch (Exception e) {
e.printStackTrace();
}
return manualTask;
}
示例4: clone
import org.eclipse.bpmn2.ManualTask; //导入依赖的package包/类
public static FlowElement clone(final FlowElement element, final Diagram diagram) {
if (element instanceof StartEvent) {
return clone((StartEvent) element, diagram);
} else if (element instanceof ServiceTask) {
return clone((ServiceTask) element, diagram);
} else if (element instanceof EndEvent) {
return clone((EndEvent) element, diagram);
} else if (element instanceof ExclusiveGateway) {
return clone((ExclusiveGateway) element, diagram);
} else if (element instanceof InclusiveGateway) {
return clone((InclusiveGateway) element, diagram);
} else if (element instanceof MailTask) {
return clone((MailTask) element, diagram);
} else if (element instanceof ManualTask) {
return clone((ManualTask) element, diagram);
} else if (element instanceof ParallelGateway) {
return clone((ParallelGateway) element, diagram);
} else if (element instanceof ScriptTask) {
return clone((ScriptTask) element, diagram);
} else if (element instanceof UserTask) {
return clone((UserTask) element, diagram);
}
return null;
}
示例5: addTaskButtons
import org.eclipse.bpmn2.ManualTask; //导入依赖的package包/类
private void addTaskButtons(ContextButtonEntry otherElementButton, Task notTask, CustomContext customContext) {
if(notTask == null || notTask instanceof ServiceTask == false) {
addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "servicetask"), customContext,
"Change to service task", "Change to a service task", ActivitiImageProvider.IMG_SERVICETASK);
}
if(notTask == null || notTask instanceof ScriptTask == false) {
addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "scripttask"), customContext,
"Change to script task", "Change to a script task", ActivitiImageProvider.IMG_SCRIPTTASK);
}
if(notTask == null || notTask instanceof UserTask == false) {
addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "usertask"), customContext,
"Change to user task", "Change to a user task", ActivitiImageProvider.IMG_USERTASK);
}
if(notTask == null || notTask instanceof MailTask == false) {;
addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "mailtask"), customContext,
"Change to mail task", "Change to a mail task", ActivitiImageProvider.IMG_MAILTASK);
}
if(notTask == null || notTask instanceof BusinessRuleTask == false) {
addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "businessruletask"), customContext,
"Change to business rule task", "Change to a business rule task", ActivitiImageProvider.IMG_BUSINESSRULETASK);
}
if(notTask == null || notTask instanceof ManualTask == false) {
addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "manualtask"), customContext,
"Change to manual task", "Change to a manual task", ActivitiImageProvider.IMG_MANUALTASK);
}
if(notTask == null || notTask instanceof ReceiveTask == false) {
addContextButton(otherElementButton, new ChangeElementTypeFeature(getFeatureProvider(), "receivetask"), customContext,
"Change to receive task", "Change to a receive task", ActivitiImageProvider.IMG_RECEIVETASK);
}
}
示例6: getText
import org.eclipse.bpmn2.ManualTask; //导入依赖的package包/类
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
String label = ((ManualTask) object).getName();
return label == null || label.length() == 0 ? getString("_UI_ManualTask_type")
: getString("_UI_ManualTask_type") + " " + label;
}
示例7: basicSetManualTask
import org.eclipse.bpmn2.ManualTask; //导入依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetManualTask(ManualTask newManualTask,
NotificationChain msgs) {
return ((FeatureMap.Internal) getMixed()).basicAdd(
Bpmn2Package.Literals.DOCUMENT_ROOT__MANUAL_TASK,
newManualTask, msgs);
}
示例8: setFriendlyIds
import org.eclipse.bpmn2.ManualTask; //导入依赖的package包/类
private void setFriendlyIds() {
Map<String, Integer> idMap = new HashMap<String, Integer>();
for (FlowElement flowElement : bpmnParser.bpmnList) {
if(StringUtils.isEmpty(flowElement.getId()) == false &&
flowElement.getId().matches("sid-\\w{4,12}-\\w{4,12}-\\w{4,12}-\\w{4,12}-\\w{4,12}") == false) {
continue;
}
if(flowElement instanceof StartEvent) {
flowElement.setId(getNextId("startevent", idMap));
} else if(flowElement instanceof EndEvent) {
if(((EndEvent) flowElement).getEventDefinitions().size() > 0) {
flowElement.setId(getNextId("errorendevent", idMap));
} else {
flowElement.setId(getNextId("endevent", idMap));
}
} else if(flowElement instanceof ExclusiveGateway) {
flowElement.setId(getNextId("exclusivegateway", idMap));
} else if(flowElement instanceof InclusiveGateway) {
flowElement.setId(getNextId("inclusivegateway", idMap));
} else if(flowElement instanceof ParallelGateway) {
flowElement.setId(getNextId("parallelgateway", idMap));
} else if(flowElement instanceof UserTask) {
flowElement.setId(getNextId("usertask", idMap));
} else if(flowElement instanceof ScriptTask) {
flowElement.setId(getNextId("scripttask", idMap));
} else if(flowElement instanceof ServiceTask) {
flowElement.setId(getNextId("servicetask", idMap));
} else if(flowElement instanceof ManualTask) {
flowElement.setId(getNextId("manualtask", idMap));
} else if(flowElement instanceof ReceiveTask) {
flowElement.setId(getNextId("receivetask", idMap));
} else if(flowElement instanceof BusinessRuleTask) {
flowElement.setId(getNextId("businessruletask", idMap));
} else if(flowElement instanceof MailTask) {
flowElement.setId(getNextId("mailtask", idMap));
} else if(flowElement instanceof BoundaryEvent) {
if(((BoundaryEvent) flowElement).getEventDefinitions().size() > 0) {
EventDefinition definition = ((BoundaryEvent) flowElement).getEventDefinitions().get(0);
if(definition instanceof ErrorEventDefinition) {
flowElement.setId(getNextId("boundaryerror", idMap));
} else {
flowElement.setId(getNextId("boundarytimer", idMap));
}
}
} else if(flowElement instanceof CallActivity) {
flowElement.setId(getNextId("callactivity", idMap));
} else if(flowElement instanceof SubProcess) {
flowElement.setId(getNextId("subprocess", idMap));
}
}
}
示例9: getAddFeature
import org.eclipse.bpmn2.ManualTask; //导入依赖的package包/类
@Override
public IAddFeature getAddFeature(IAddContext context) {
// is object for add request a EClass?
if (context.getNewObject() instanceof StartEvent) {
if(context.getNewObject() instanceof AlfrescoStartEvent) {
return new AddAlfrescoStartEventFeature(this);
} else {
if(((StartEvent) context.getNewObject()).getEventDefinitions().size() > 0) {
return new AddTimerStartEventFeature(this);
} else {
return new AddStartEventFeature(this);
}
}
// <SecureBPMN>
} else if (context.getNewObject() instanceof BindingOfDuty) {
return new AddSecurityBodFeature(this);
} else if (context.getNewObject() instanceof SeparationOfDuty) {
return new AddSecuritySodFeature(this);
// </SecureBPMN>
} else if (context.getNewObject() instanceof EndEvent) {
if(((EndEvent) context.getNewObject()).getEventDefinitions().size() > 0) {
return new AddErrorEndEventFeature(this);
} else {
return new AddEndEventFeature(this);
}
} else if (context.getNewObject() instanceof SequenceFlow) {
return new AddSequenceFlowFeature(this);
// <SecureBPMN>
} else if (context.getNewObject() instanceof SecurityFlow) {
return new AddSecurityFlowFeature(this);
// </SecureBPMN>
} else if (context.getNewObject() instanceof UserTask) {
if(context.getNewObject() instanceof AlfrescoUserTask) {
return new AddAlfrescoUserTaskFeature(this);
} else {
return new AddUserTaskFeature(this);
}
} else if (context.getNewObject() instanceof ScriptTask) {
return new AddScriptTaskFeature(this);
} else if (context.getNewObject() instanceof ServiceTask) {
return new AddServiceTaskFeature(this);
} else if (context.getNewObject() instanceof MailTask) {
if(context.getNewObject() instanceof AlfrescoMailTask) {
return new AddAlfrescoMailTaskFeature(this);
} else {
return new AddMailTaskFeature(this);
}
} else if (context.getNewObject() instanceof ManualTask) {
return new AddManualTaskFeature(this);
} else if (context.getNewObject() instanceof ReceiveTask) {
return new AddReceiveTaskFeature(this);
} else if (context.getNewObject() instanceof BusinessRuleTask) {
return new AddBusinessRuleTaskFeature(this);
} else if (context.getNewObject() instanceof ExclusiveGateway) {
return new AddExclusiveGatewayFeature(this);
} else if (context.getNewObject() instanceof InclusiveGateway) {
return new AddInclusiveGatewayFeature(this);
} else if (context.getNewObject() instanceof ParallelGateway) {
return new AddParallelGatewayFeature(this);
} else if (context.getNewObject() instanceof BoundaryEvent) {
if(((BoundaryEvent) context.getNewObject()).getEventDefinitions().size() > 0) {
EventDefinition definition = ((BoundaryEvent) context.getNewObject()).getEventDefinitions().get(0);
if(definition instanceof ErrorEventDefinition) {
return new AddBoundaryErrorFeature(this);
} else {
return new AddBoundaryTimerFeature(this);
}
}
} else if (context.getNewObject() instanceof IntermediateCatchEvent) {
return new AddTimerCatchingEventFeature(this);
} else if (context.getNewObject() instanceof SubProcess) {
return new AddEmbeddedSubProcessFeature(this);
} else if (context.getNewObject() instanceof CallActivity) {
return new AddCallActivityFeature(this);
} else if (context.getNewObject() instanceof AlfrescoScriptTask) {
return new AddAlfrescoScriptTaskFeature(this);
}
return super.getAddFeature(context);
}
示例10: caseManualTask
import org.eclipse.bpmn2.ManualTask; //导入依赖的package包/类
@Override
public Adapter caseManualTask(ManualTask object) {
return createManualTaskAdapter();
}
示例11: setManualTask
import org.eclipse.bpmn2.ManualTask; //导入依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setManualTask(ManualTask newManualTask) {
((FeatureMap.Internal) getMixed())
.set(Bpmn2Package.Literals.DOCUMENT_ROOT__MANUAL_TASK,
newManualTask);
}
示例12: caseManualTask
import org.eclipse.bpmn2.ManualTask; //导入依赖的package包/类
@Override
public Adapter caseManualTask(ManualTask object) {
return createManualTaskAdapter();
}
示例13: convertJsonToElement
import org.eclipse.bpmn2.ManualTask; //导入依赖的package包/类
protected FlowElement convertJsonToElement(JsonNode elementNode, JsonNode modelNode, Map<String, JsonNode> shapeMap) {
ManualTask task = Bpmn2Factory.eINSTANCE.createManualTask();// ManualTask();
return task;
}
示例14: getFixture
import org.eclipse.bpmn2.ManualTask; //导入依赖的package包/类
/**
* Returns the fixture for this Manual Task test case.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected ManualTask getFixture() {
return (ManualTask) fixture;
}
示例15: caseManualTask
import org.eclipse.bpmn2.ManualTask; //导入依赖的package包/类
/**
* Returns the result of interpreting the object as an instance of '<em>Manual Task</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Manual Task</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseManualTask(ManualTask object) {
return null;
}