콜렉션 도메인에 요소 추가

요소를 콜렉션 도메인에 추가할 수 있지만 요소를 배열에 추가할 수는 없습니다.

BOM에서 콜렉션 도메인에 요소를 추가하는 메소드를 선언합니다.

public static void add(java.util.Collection arg1 domain 0,* class object, object arg2)
property noTypeConversion "true"
property propagateArgumentType "true";

BOM에는 배열에 요소를 추가하는 메소드가 없습니다. BAL은 배열 및 콜렉션 도메인 간의 차이를 감지하지 못합니다. 배열에 요소를 추가하는 경우 BAL에서 오류가 발생하지 않지만 IRL을 구문 분석할 때는 오류가 발생합니다.

다음 예제에서 IRL을 구문 분석할 때 Rule Designer에서 두 번째 조치에 대한 오류가 발생합니다.

definitions
set 'myItem' to an item ;
   then
add to myCollection an element from myItem ;
add to myArray an element from myItem ;