modules/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/parser/BpmnParse.java
/**
   * Parses the generic information of an activity element (id, name,
   * documentation, etc.), and creates a new {@link ActivityImpl} on the given
   * scope element.
   */
Parses the generic information of an activity element (id, name,
documentation, etc.), and creates a new  ActivityImpl on the given
scope element.
Parses the generic information of an activity element ( id name documentation etc . ) and creates a new ActivityImpl on the given scope element .
public ActivityImpl createActivityOnScope(FlowElement flowElement, String xmlLocalName, ScopeImpl scopeElement) {
    if (LOGGER.isDebugEnabled()) {
      LOGGER.debug("Parsing activity {}", flowElement.getId());
    }
    ActivityImpl activity = scopeElement.createActivity(flowElement.getId());
    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;
  }
public ActivityImpl createActivityOnScope ( FlowElement flowElement , String xmlLocalName , ScopeImpl scopeElement ) { if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "Parsing activity {}" , flowElement . getId ( ) ) ; } ActivityImpl activity = scopeElement . createActivity ( flowElement . getId ( ) ) ; 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 ; }
Parses the generic information of an activity element (id, name,
 documentation, etc.
Parses the generic information of an activity element ( id name documentation etc .