code: public static boolean isMainElement( Element element ){
          switch( element.getType() ) {
              case START:
              case END:
              case VALUE:
              case CALL:
              case CALL_ASYNC:
              case HUMAN_TASK:
              case WAIT_SIGNAL:
              case WAIT_TIMER:
              case WAIT_UNTIL_DATE:
              case CREATE_INSTANCE:
              case WHILE_DO_BEGIN:
              case WHILE_DO_END:
              case DO_WHILE_BEGIN:
              case DO_WHILE_END:
              case IF:
              case ELSE_IF:
              case ELSE:
              case END_IF:
              case SPLIT:
              case BRANCH:
              case JOIN_FIRST:
              case JOIN_ALL:
              case ESCALATE:
              case VALIDATE_INPUT_VARIABLE:
                  return true;
              default :
                  return false;
          }
      }
docs: Returns, whether the given element is a main element.
  Remember, a {@link Row} has a syntax of: [OutputElement] MainElement [InputElement]*.