本文整理了Java中org.flowable.bpmn.model.Activity.isForCompensation()
方法的一些代码示例,展示了Activity.isForCompensation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Activity.isForCompensation()
方法的具体详情如下:
包路径:org.flowable.bpmn.model.Activity
类名称:Activity
方法名:isForCompensation
暂无
代码示例来源:origin: org.flowable/flowable-engine
@Override
public void run() {
FlowElement currentFlowElement = getCurrentFlowElement(execution);
// Compensation check
if ((currentFlowElement instanceof Activity)
&& ((Activity) currentFlowElement).isForCompensation()) {
/*
* If the current flow element is part of a compensation, we don't always want to follow the regular rules of leaving an activity. More specifically, if there are no outgoing sequenceflow,
* we simply must stop the execution there and don't go up in the scopes as we usually do to find the outgoing sequenceflow
*/
cleanupCompensation();
return;
}
// When leaving the current activity, we need to delete any related execution (eg active boundary events)
cleanupExecutions(currentFlowElement);
if (currentFlowElement instanceof FlowNode) {
handleFlowNode((FlowNode) currentFlowElement);
} else if (currentFlowElement instanceof SequenceFlow) {
handleSequenceFlow();
}
}
代码示例来源:origin: org.flowable/flowable-bpmn-model
public void setValues(Activity otherActivity) {
super.setValues(otherActivity);
setFailedJobRetryTimeCycleValue(otherActivity.getFailedJobRetryTimeCycleValue());
setDefaultFlow(otherActivity.getDefaultFlow());
setForCompensation(otherActivity.isForCompensation());
if (otherActivity.getLoopCharacteristics() != null) {
setLoopCharacteristics(otherActivity.getLoopCharacteristics().clone());
}
if (otherActivity.getIoSpecification() != null) {
setIoSpecification(otherActivity.getIoSpecification().clone());
}
dataInputAssociations = new ArrayList<>();
if (otherActivity.getDataInputAssociations() != null && !otherActivity.getDataInputAssociations().isEmpty()) {
for (DataAssociation association : otherActivity.getDataInputAssociations()) {
dataInputAssociations.add(association.clone());
}
}
dataOutputAssociations = new ArrayList<>();
if (otherActivity.getDataOutputAssociations() != null && !otherActivity.getDataOutputAssociations().isEmpty()) {
for (DataAssociation association : otherActivity.getDataOutputAssociations()) {
dataOutputAssociations.add(association.clone());
}
}
boundaryEvents.clear();
boundaryEvents.addAll(otherActivity.getBoundaryEvents());
}
}
代码示例来源:origin: org.ow2.petals.flowable/flowable-bpmn-model
public void setValues(Activity otherActivity) {
super.setValues(otherActivity);
setFailedJobRetryTimeCycleValue(otherActivity.getFailedJobRetryTimeCycleValue());
setDefaultFlow(otherActivity.getDefaultFlow());
setForCompensation(otherActivity.isForCompensation());
if (otherActivity.getLoopCharacteristics() != null) {
setLoopCharacteristics(otherActivity.getLoopCharacteristics().clone());
}
if (otherActivity.getIoSpecification() != null) {
setIoSpecification(otherActivity.getIoSpecification().clone());
}
dataInputAssociations = new ArrayList<>();
if (otherActivity.getDataInputAssociations() != null && !otherActivity.getDataInputAssociations().isEmpty()) {
for (DataAssociation association : otherActivity.getDataInputAssociations()) {
dataInputAssociations.add(association.clone());
}
}
dataOutputAssociations = new ArrayList<>();
if (otherActivity.getDataOutputAssociations() != null && !otherActivity.getDataOutputAssociations().isEmpty()) {
for (DataAssociation association : otherActivity.getDataOutputAssociations()) {
dataOutputAssociations.add(association.clone());
}
}
boundaryEvents.clear();
boundaryEvents.addAll(otherActivity.getBoundaryEvents());
}
}
代码示例来源:origin: org.flowable/flowable5-engine
public ActivityImpl createActivityOnScope(BpmnParse bpmnParse, FlowElement flowElement, String xmlLocalName, ScopeImpl scopeElement) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Parsing activity {}", flowElement.getId());
}
ActivityImpl activity = scopeElement.createActivity(flowElement.getId());
bpmnParse.setCurrentActivity(activity);
activity.setProperty("name", flowElement.getName());
activity.setProperty("documentation", flowElement.getDocumentation());
if (flowElement instanceof Activity) {
Activity modelActivity = (Activity) flowElement;
activity.setProperty("default", modelActivity.getDefaultFlow());
if (modelActivity.isForCompensation()) {
activity.setProperty(PROPERTYNAME_IS_FOR_COMPENSATION, true);
}
} else if (flowElement instanceof Gateway) {
activity.setProperty("default", ((Gateway) flowElement).getDefaultFlow());
}
activity.setProperty("type", xmlLocalName);
return activity;
}
代码示例来源:origin: org.flowable/flowable-json-converter
propertiesNode.put(PROPERTY_FOR_COMPENSATION,activity.isForCompensation());
代码示例来源:origin: org.flowable/flowable-bpmn-converter
if (activity.isForCompensation()) {
writeDefaultAttribute(ATTRIBUTE_ACTIVITY_ISFORCOMPENSATION, ATTRIBUTE_VALUE_TRUE, xtw);
代码示例来源:origin: org.flowable/flowable-engine
if (flowElement instanceof Activity) {
Activity activity = (Activity) flowElement;
if (activity.isForCompensation()) {
List<Association> associations = process.findAssociationsWithTargetRefRecursive(activity.getId());
for (Association association : associations) {
代码示例来源:origin: org.flowable/flowable-engine
if (!activity.isForCompensation() && activity.getBoundaryEvents().size() > 0) {
for (BoundaryEvent boundaryEvent : activity.getBoundaryEvents()) {
if (boundaryEvent.getEventDefinitions().size() > 0 && boundaryEvent.getEventDefinitions().get(0) instanceof CompensateEventDefinition) {
if (targetElement instanceof Activity) {
Activity targetActivity = (Activity) targetElement;
if (targetActivity.isForCompensation()) {
compensationActivity = targetActivity;
break;
代码示例来源:origin: org.flowable/flowable-engine
if (targetElement instanceof Activity) {
Activity activity = (Activity) targetElement;
if (activity.isForCompensation()) {
compensationActivity = activity;
break;
内容来源于网络,如有侵权,请联系作者删除!