當前位置: 首頁>>代碼示例>>Java>>正文


Java SignalEventDefinition類代碼示例

本文整理匯總了Java中org.eclipse.bpmn2.SignalEventDefinition的典型用法代碼示例。如果您正苦於以下問題:Java SignalEventDefinition類的具體用法?Java SignalEventDefinition怎麽用?Java SignalEventDefinition使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


SignalEventDefinition類屬於org.eclipse.bpmn2包,在下文中一共展示了SignalEventDefinition類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getStencilId

import org.eclipse.bpmn2.SignalEventDefinition; //導入依賴的package包/類
protected String getStencilId(FlowElement flowElement) {
	CatchEvent event = (CatchEvent) flowElement;
	if (event.getEventDefinitions().size() > 0) {
		EventDefinition eventDefinition = event.getEventDefinitions().get(0);
		if(eventDefinition instanceof TimerEventDefinition) {
			return STENCIL_EVENT_START_TIMER;
		}else if(eventDefinition instanceof ErrorEventDefinition) {
			return STENCIL_EVENT_START_ERROR;
		}else if(eventDefinition instanceof MessageEventDefinition) {
			return STENCIL_EVENT_START_MESSAGE;
		}else if(eventDefinition instanceof SignalEventDefinition) {
			return STENCIL_EVENT_START_SIGNAL;
		}
	}
	return STENCIL_EVENT_START_NONE;
}
 
開發者ID:fixteam,項目名稱:fixflow,代碼行數:17,代碼來源:StartEventJsonConverter.java

示例2: getStencilId

import org.eclipse.bpmn2.SignalEventDefinition; //導入依賴的package包/類
protected String getStencilId(FlowElement flowElement) {
  IntermediateCatchEvent catchEvent = (IntermediateCatchEvent) flowElement;
  List<EventDefinition> eventDefinitions = catchEvent.getEventDefinitions();
  if (eventDefinitions.size() != 1) {
    // return timer event as default;
    return STENCIL_EVENT_CATCH_TIMER;
  }
  
  EventDefinition eventDefinition = eventDefinitions.get(0);
  if (eventDefinition instanceof MessageEventDefinition) {
    return STENCIL_EVENT_CATCH_MESSAGE;
  } else if (eventDefinition instanceof SignalEventDefinition) {
    return STENCIL_EVENT_CATCH_SIGNAL;
  } else {
    return STENCIL_EVENT_CATCH_TIMER;
  }
}
 
開發者ID:fixteam,項目名稱:fixflow,代碼行數:18,代碼來源:CatchEventJsonConverter.java

示例3: getStencilId

import org.eclipse.bpmn2.SignalEventDefinition; //導入依賴的package包/類
protected String getStencilId(FlowElement flowElement) {
  BoundaryEvent boundaryEvent = (BoundaryEvent) flowElement;
  List<EventDefinition> eventDefinitions = boundaryEvent.getEventDefinitions();
  if (eventDefinitions.size() != 1) {
    // return timer event as default;
    return STENCIL_EVENT_BOUNDARY_TIMER;
  }
  
  EventDefinition eventDefinition = eventDefinitions.get(0);
  if (eventDefinition instanceof ErrorEventDefinition) {
    return STENCIL_EVENT_BOUNDARY_ERROR;
  } else if (eventDefinition instanceof SignalEventDefinition) {
    return STENCIL_EVENT_BOUNDARY_SIGNAL;
  } else {
    return STENCIL_EVENT_BOUNDARY_TIMER;
  }
}
 
開發者ID:fixteam,項目名稱:fixflow,代碼行數:18,代碼來源:BoundaryEventJsonConverter.java

示例4: setSignalRefForCatchEvents

import org.eclipse.bpmn2.SignalEventDefinition; //導入依賴的package包/類
public void setSignalRefForCatchEvents(FlowElementsContainer container,
                                       Definitions def) {
    List<FlowElement> flowElements = container.getFlowElements();
    for (FlowElement fe : flowElements) {
        if (fe instanceof CatchEvent) {
            if (((CatchEvent) fe).getEventDefinitions().size() > 0) {
                EventDefinition ed = ((CatchEvent) fe).getEventDefinitions().get(0);
                if (ed instanceof SignalEventDefinition) {
                    SignalEventDefinition sed = (SignalEventDefinition) ed;
                    if (sed.getSignalRef() != null) {
                        Signal signal = findSignalWithName(sed.getSignalRef(),
                                                           def);
                        if (signal != null) {
                            sed.setSignalRef(signal.getId());
                        }
                    }
                }
            }
        } else if (fe instanceof FlowElementsContainer) {
            setSignalRefForCatchEvents((FlowElementsContainer) fe,
                                       def);
        }
    }
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:25,代碼來源:Bpmn2JsonUnmarshaller.java

示例5: setSignalRefForThrowEvents

import org.eclipse.bpmn2.SignalEventDefinition; //導入依賴的package包/類
public void setSignalRefForThrowEvents(FlowElementsContainer container,
                                       Definitions def) {
    List<FlowElement> flowElements = container.getFlowElements();
    for (FlowElement fe : flowElements) {
        if (fe instanceof ThrowEvent) {
            if (((ThrowEvent) fe).getEventDefinitions().size() > 0) {
                EventDefinition ed = ((ThrowEvent) fe).getEventDefinitions().get(0);
                if (ed instanceof SignalEventDefinition) {
                    SignalEventDefinition sed = (SignalEventDefinition) ed;
                    if (sed.getSignalRef() != null) {
                        Signal signal = findSignalWithName(sed.getSignalRef(),
                                                           def);
                        if (signal != null) {
                            sed.setSignalRef(signal.getId());
                        }
                    }
                }
            }
        } else if (fe instanceof FlowElementsContainer) {
            setSignalRefForThrowEvents((FlowElementsContainer) fe,
                                       def);
        }
    }
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:25,代碼來源:Bpmn2JsonUnmarshaller.java

示例6: setSignalRefForBoundaryEvents

import org.eclipse.bpmn2.SignalEventDefinition; //導入依賴的package包/類
public void setSignalRefForBoundaryEvents(FlowElementsContainer container,
                                          Definitions def) {
    List<FlowElement> flowElements = container.getFlowElements();
    for (FlowElement fe : flowElements) {
        if (fe instanceof BoundaryEvent) {
            if (((BoundaryEvent) fe).getEventDefinitions().size() > 0) {
                EventDefinition ed = ((BoundaryEvent) fe).getEventDefinitions().get(0);
                if (ed instanceof SignalEventDefinition) {
                    SignalEventDefinition sed = (SignalEventDefinition) ed;
                    if (sed.getSignalRef() != null) {
                        Signal signal = findSignalWithName(sed.getSignalRef(),
                                                           def);
                        if (signal != null) {
                            sed.setSignalRef(signal.getId());
                        }
                    }
                }
            }
        } else if (fe instanceof FlowElementsContainer) {
            setSignalRefForBoundaryEvents((FlowElementsContainer) fe,
                                          def);
        }
    }
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:25,代碼來源:Bpmn2JsonUnmarshaller.java

示例7: getText

import org.eclipse.bpmn2.SignalEventDefinition; //導入依賴的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 = ((SignalEventDefinition) object).getId();
	return label == null || label.length() == 0 ? getString("_UI_SignalEventDefinition_type")
			: getString("_UI_SignalEventDefinition_type") + " " + label;
}
 
開發者ID:logicalhacking,項目名稱:SecureBPMN,代碼行數:13,代碼來源:SignalEventDefinitionItemProvider.java

示例8: basicSetSignalEventDefinition

import org.eclipse.bpmn2.SignalEventDefinition; //導入依賴的package包/類
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetSignalEventDefinition(
		SignalEventDefinition newSignalEventDefinition,
		NotificationChain msgs) {
	return ((FeatureMap.Internal) getMixed()).basicAdd(
			Bpmn2Package.Literals.DOCUMENT_ROOT__SIGNAL_EVENT_DEFINITION,
			newSignalEventDefinition, msgs);
}
 
開發者ID:logicalhacking,項目名稱:SecureBPMN,代碼行數:13,代碼來源:DocumentRootImpl.java

示例9: setSignalEventDefinition

import org.eclipse.bpmn2.SignalEventDefinition; //導入依賴的package包/類
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void setSignalEventDefinition(
		SignalEventDefinition newSignalEventDefinition) {
	((FeatureMap.Internal) getMixed()).set(
			Bpmn2Package.Literals.DOCUMENT_ROOT__SIGNAL_EVENT_DEFINITION,
			newSignalEventDefinition);
}
 
開發者ID:logicalhacking,項目名稱:SecureBPMN,代碼行數:12,代碼來源:DocumentRootImpl.java

示例10: basicSetSignalEventDefinition

import org.eclipse.bpmn2.SignalEventDefinition; //導入依賴的package包/類
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetSignalEventDefinition(
        SignalEventDefinition newSignalEventDefinition, NotificationChain msgs) {
    return ((FeatureMap.Internal) getMixed()).basicAdd(
            Bpmn2Package.Literals.DOCUMENT_ROOT__SIGNAL_EVENT_DEFINITION,
            newSignalEventDefinition, msgs);
}
 
開發者ID:fixteam,項目名稱:fixflow,代碼行數:12,代碼來源:DocumentRootImpl.java

示例11: addEventProperties

import org.eclipse.bpmn2.SignalEventDefinition; //導入依賴的package包/類
protected void addEventProperties(Event event, ObjectNode propertiesNode) {
 List<EventDefinition> eventDefinitions=null;
 if(event instanceof CatchEvent){
  eventDefinitions=((CatchEvent)event).getEventDefinitions();
 }
 
 if(event instanceof ThrowEvent){
  eventDefinitions=((ThrowEvent)event).getEventDefinitions();
 }

  if (eventDefinitions.size() == 1) {
  
    EventDefinition eventDefinition = eventDefinitions.get(0);
    if (eventDefinition instanceof ErrorEventDefinition) {
      ErrorEventDefinition errorDefinition = (ErrorEventDefinition) eventDefinition;
      if (StringUtils.isNotEmpty(errorDefinition.getErrorRef().getErrorCode())) {
        propertiesNode.put(PROPERTY_ERRORREF, errorDefinition.getErrorRef().getErrorCode());
      }
      
    } else if (eventDefinition instanceof SignalEventDefinition) {
      SignalEventDefinition signalDefinition = (SignalEventDefinition) eventDefinition;
      if (StringUtils.isNotEmpty(signalDefinition.getSignalRef().getId())) {
        propertiesNode.put(PROPERTY_SIGNALREF, signalDefinition.getSignalRef().getId());
      }
      
    } else if (eventDefinition instanceof TimerEventDefinition) {
      TimerEventDefinition timerDefinition = (TimerEventDefinition) eventDefinition;
      if (StringUtils.isNotEmpty(BpmnModelUtil.getExpression(timerDefinition.getTimeDuration()))) {
        propertiesNode.put(PROPERTY_TIMER_DURATON, BpmnModelUtil.getExpression(timerDefinition.getTimeDuration()));
      }
      if (StringUtils.isNotEmpty(BpmnModelUtil.getExpression(timerDefinition.getTimeCycle()))) {
        propertiesNode.put(PROPERTY_TIMER_CYCLE, BpmnModelUtil.getExpression(timerDefinition.getTimeCycle()));
      }
      if (StringUtils.isNotEmpty(BpmnModelUtil.getExpression(timerDefinition.getTimeDate()))) {
        propertiesNode.put(PROPERTY_TIMER_DATE,BpmnModelUtil.getExpression( timerDefinition.getTimeDate()));
      }
    }
  }
}
 
開發者ID:fixteam,項目名稱:fixflow,代碼行數:40,代碼來源:BaseBpmnJsonConverter.java

示例12: convertJsonToSignalDefinition

import org.eclipse.bpmn2.SignalEventDefinition; //導入依賴的package包/類
protected void convertJsonToSignalDefinition(JsonNode objectNode, Event event) {
  String signalRef = getPropertyValueAsString(PROPERTY_SIGNALREF, objectNode);
  
  if (StringUtils.isNotEmpty(signalRef)) {
    SignalEventDefinition eventDefinition = Bpmn2Factory.eINSTANCE.createSignalEventDefinition();// SignalEventDefinition();
    //eventDefinition.setSignalRef(signalRef);
    //event.getEventDefinitions().add(eventDefinition);
  }
}
 
開發者ID:fixteam,項目名稱:fixflow,代碼行數:10,代碼來源:BaseBpmnJsonConverter.java

示例13: getStencilId

import org.eclipse.bpmn2.SignalEventDefinition; //導入依賴的package包/類
protected String getStencilId(FlowElement flowElement) {
  ThrowEvent throwEvent = (ThrowEvent) flowElement;
  List<EventDefinition> eventDefinitions = throwEvent.getEventDefinitions();
  if (eventDefinitions.size() != 1) {
    // return none event as default;
    return STENCIL_EVENT_THROW_NONE;
  }
  
  EventDefinition eventDefinition = eventDefinitions.get(0);
  if (eventDefinition instanceof SignalEventDefinition) {
    return STENCIL_EVENT_THROW_SIGNAL;
  } else {
    return STENCIL_EVENT_THROW_NONE;
  }
}
 
開發者ID:fixteam,項目名稱:fixflow,代碼行數:16,代碼來源:ThrowEventJsonConverter.java

示例14: caseSignalEventDefinition

import org.eclipse.bpmn2.SignalEventDefinition; //導入依賴的package包/類
@Override
public Adapter caseSignalEventDefinition(SignalEventDefinition object) {
	return createSignalEventDefinitionAdapter();
}
 
開發者ID:logicalhacking,項目名稱:SecureBPMN,代碼行數:5,代碼來源:Bpmn2AdapterFactory.java

示例15: getSignalEventDefinition

import org.eclipse.bpmn2.SignalEventDefinition; //導入依賴的package包/類
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public SignalEventDefinition getSignalEventDefinition() {
	return (SignalEventDefinition) getMixed().get(
			Bpmn2Package.Literals.DOCUMENT_ROOT__SIGNAL_EVENT_DEFINITION,
			true);
}
 
開發者ID:logicalhacking,項目名稱:SecureBPMN,代碼行數:11,代碼來源:DocumentRootImpl.java


注:本文中的org.eclipse.bpmn2.SignalEventDefinition類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。