本文整理了Java中org.flowable.bpmn.model.Activity.getLoopCharacteristics()
方法的一些代码示例,展示了Activity.getLoopCharacteristics()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Activity.getLoopCharacteristics()
方法的具体详情如下:
包路径:org.flowable.bpmn.model.Activity
类名称:Activity
方法名:getLoopCharacteristics
暂无
代码示例来源:origin: org.flowable/flowable-engine
protected boolean isFlowElementMultiInstance(FlowElement flowElement) {
if (flowElement instanceof Activity) {
return ((Activity) flowElement).getLoopCharacteristics() != null;
}
return false;
}
代码示例来源:origin: org.flowable/flowable-bpmn-model
public boolean hasMultiInstanceLoopCharacteristics() {
return getLoopCharacteristics() != null;
}
代码示例来源:origin: org.ow2.petals.flowable/flowable-bpmn-model
public boolean hasMultiInstanceLoopCharacteristics() {
return getLoopCharacteristics() != null;
}
代码示例来源:origin: org.flowable/flowable5-engine
@Override
public void parse(BpmnParse bpmnParse, BaseElement element) {
super.parse(bpmnParse, element);
if (element instanceof Activity
&& ((Activity) element).getLoopCharacteristics() != null) {
createMultiInstanceLoopCharacteristics(bpmnParse, (Activity) element);
}
}
代码示例来源:origin: org.flowable/flowable-engine
@Override
public void parse(BpmnParse bpmnParse, BaseElement element) {
super.parse(bpmnParse, element);
if (element instanceof Activity && ((Activity) element).getLoopCharacteristics() != null) {
createMultiInstanceLoopCharacteristics(bpmnParse, (Activity) element);
}
}
代码示例来源:origin: org.flowable/flowable-process-validation
protected void handleMultiInstanceLoopCharacteristics(Process process, Activity activity, List<ValidationError> errors) {
MultiInstanceLoopCharacteristics multiInstanceLoopCharacteristics = activity.getLoopCharacteristics();
if (multiInstanceLoopCharacteristics != null) {
if (StringUtils.isEmpty(multiInstanceLoopCharacteristics.getLoopCardinality())
&& StringUtils.isEmpty(multiInstanceLoopCharacteristics.getInputDataItem()) && StringUtils.isEmpty(multiInstanceLoopCharacteristics.getCollectionString())) {
addError(errors, Problems.MULTI_INSTANCE_MISSING_COLLECTION, process, activity,
"Either loopCardinality or loopDataInputRef/flowable:collection must been set");
}
if (!StringUtils.isEmpty(multiInstanceLoopCharacteristics.getCollectionString())) {
if (multiInstanceLoopCharacteristics.getHandler() == null) {
// verify string parsing function attributes
addError(errors, Problems.MULTI_INSTANCE_MISSING_COLLECTION_FUNCTION_PARAMETERS, process, activity,
"The flowable:collection element string value requires the function parameters flowable:delegateExpression or flowable:class.");
}
}
}
}
代码示例来源:origin: org.flowable/flowable-bpmn-converter
public static void writeMultiInstance(Activity activity, BpmnModel model, XMLStreamWriter xtw) throws Exception {
if (activity.getLoopCharacteristics() != null) {
MultiInstanceLoopCharacteristics multiInstanceObject = activity.getLoopCharacteristics();
CollectionHandler handler = multiInstanceObject.getHandler();
boolean didWriteExtensionStartElement = false;
代码示例来源:origin: org.flowable/flowable-engine
protected DelegateExecution findMultiInstanceParentExecution(DelegateExecution execution) {
DelegateExecution multiInstanceExecution = null;
DelegateExecution parentExecution = execution.getParent();
if (parentExecution != null && parentExecution.getCurrentFlowElement() != null) {
FlowElement flowElement = parentExecution.getCurrentFlowElement();
if (flowElement instanceof Activity) {
Activity activity = (Activity) flowElement;
if (activity.getLoopCharacteristics() != null) {
multiInstanceExecution = parentExecution;
}
}
if (multiInstanceExecution == null) {
DelegateExecution potentialMultiInstanceExecution = findMultiInstanceParentExecution(parentExecution);
if (potentialMultiInstanceExecution != null) {
multiInstanceExecution = potentialMultiInstanceExecution;
}
}
}
return multiInstanceExecution;
}
代码示例来源: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/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/flowable-engine
public static FlowableMultiInstanceActivityEvent createMultiInstanceActivityEvent(FlowableEngineEventType type, String activityId, String activityName,
String executionId, String processInstanceId, String processDefinitionId, FlowElement flowElement) {
FlowableMultiInstanceActivityEventImpl newEvent = new FlowableMultiInstanceActivityEventImpl(type);
newEvent.setActivityId(activityId);
newEvent.setActivityName(activityName);
newEvent.setExecutionId(executionId);
newEvent.setProcessDefinitionId(processDefinitionId);
newEvent.setProcessInstanceId(processInstanceId);
if (flowElement instanceof FlowNode) {
FlowNode flowNode = (FlowNode) flowElement;
newEvent.setActivityType(parseActivityType(flowNode));
Object behaviour = flowNode.getBehavior();
if (behaviour != null) {
newEvent.setBehaviorClass(behaviour.getClass().getCanonicalName());
}
newEvent.setSequential(((Activity) flowNode).getLoopCharacteristics().isSequential());
}
return newEvent;
}
代码示例来源:origin: org.flowable/flowable-json-converter
propertiesNode.put(PROPERTY_FOR_COMPENSATION,activity.isForCompensation());
if (activity.getLoopCharacteristics() != null) {
MultiInstanceLoopCharacteristics loopDef = activity.getLoopCharacteristics();
if (StringUtils.isNotEmpty(loopDef.getLoopCardinality()) || StringUtils.isNotEmpty(loopDef.getInputDataItem()) || StringUtils.isNotEmpty(loopDef.getCompletionCondition())) {
代码示例来源:origin: org.flowable/flowable-engine
public static FlowableMultiInstanceActivityCompletedEvent createMultiInstanceActivityCompletedEvent(FlowableEngineEventType type, int numberOfInstances,
int numberOfActiveInstances, int numberOfCompletedInstances, String activityId, String activityName, String executionId, String processInstanceId,
String processDefinitionId, FlowElement flowElement) {
FlowableMultiInstanceActivityCompletedEventImpl newEvent = new FlowableMultiInstanceActivityCompletedEventImpl(type);
newEvent.setNumberOfInstances(numberOfInstances);
newEvent.setNumberOfActiveInstances(numberOfActiveInstances);
newEvent.setNumberOfCompletedInstances(numberOfCompletedInstances);
newEvent.setActivityId(activityId);
newEvent.setActivityName(activityName);
newEvent.setExecutionId(executionId);
newEvent.setProcessDefinitionId(processDefinitionId);
newEvent.setProcessInstanceId(processInstanceId);
if (flowElement instanceof FlowNode) {
FlowNode flowNode = (FlowNode) flowElement;
newEvent.setActivityType(parseActivityType(flowNode));
Object behaviour = flowNode.getBehavior();
if (behaviour != null) {
newEvent.setBehaviorClass(behaviour.getClass().getCanonicalName());
}
newEvent.setSequential(((Activity) flowNode).getLoopCharacteristics().isSequential());
}
return newEvent;
}
代码示例来源:origin: org.flowable/flowable-engine
protected void createMultiInstanceLoopCharacteristics(BpmnParse bpmnParse, Activity modelActivity) {
MultiInstanceLoopCharacteristics loopCharacteristics = modelActivity.getLoopCharacteristics();
代码示例来源:origin: org.flowable/flowable5-engine
protected void createMultiInstanceLoopCharacteristics(BpmnParse bpmnParse, Activity modelActivity) {
MultiInstanceLoopCharacteristics loopCharacteristics = modelActivity.getLoopCharacteristics();
代码示例来源:origin: org.flowable/flowable-engine
protected void handleActivityEnd(FlowNode flowNode) {
// a process instance execution can never leave a flow node, but it can pass here whilst cleaning up
// hence the check for NOT being a process instance
if (!execution.isProcessInstanceType()) {
if (CollectionUtil.isNotEmpty(flowNode.getExecutionListeners())) {
executeExecutionListeners(flowNode, ExecutionListener.EVENTNAME_END);
}
if (execution.isActive()
&& !flowNode.getOutgoingFlows().isEmpty()
&& !(flowNode instanceof ParallelGateway) // Parallel gw takes care of its own history
&& !(flowNode instanceof InclusiveGateway) // Inclusive gw takes care of its own history
&& !(flowNode instanceof SubProcess) // Subprocess handling creates and destroys scoped execution. The execution taking the seq flow is different from the one entering
&& (!(flowNode instanceof Activity) || ((Activity) flowNode).getLoopCharacteristics() == null) // Multi instance root execution leaving the node isn't stored in history
) {
// If no sequence flow: will be handled by the deletion of executions
CommandContextUtil.getActivityInstanceEntityManager(commandContext).recordActivityEnd(execution, null);
}
if (!(execution.getCurrentFlowElement() instanceof SubProcess) &&
!(flowNode instanceof Activity && ((Activity) flowNode).hasMultiInstanceLoopCharacteristics())) {
CommandContextUtil.getEventDispatcher(commandContext).dispatchEvent(
FlowableEventBuilder.createActivityEvent(FlowableEngineEventType.ACTIVITY_COMPLETED, flowNode.getId(), flowNode.getName(),
execution.getId(), execution.getProcessInstanceId(), execution.getProcessDefinitionId(), flowNode));
}
}
}
代码示例来源:origin: org.flowable/flowable-engine
if (subProcessExecution.getCurrentFlowElement() instanceof Activity) {
Activity activity = (Activity) subProcessExecution.getCurrentFlowElement();
if (activity.getLoopCharacteristics() != null) {
ExecutionEntity miExecution = subProcessExecution.getParent();
List<ExecutionEntity> miChildExecutions = executionEntityManager.findChildExecutionsByParentExecutionId(miExecution.getId());
代码示例来源:origin: org.flowable/flowable-engine
MultiInstanceLoopCharacteristics multiInstanceLoopCharacteristics = miActivityElement.getLoopCharacteristics();
if (miActivityElement.getLoopCharacteristics() == null) {
throw new FlowableException("No multi instance execution found for execution id " + executionId);
代码示例来源:origin: org.flowable/flowable-engine
MultiInstanceLoopCharacteristics multiInstanceLoopCharacteristics = miActivityElement.getLoopCharacteristics();
内容来源于网络,如有侵权,请联系作者删除!