태스크 1-2: 이벤트 및 엔티티 정의
이 태스크에서는 솔루션의 모델을 정의합니다.
이 태스크 정보
이 학습서에서, 비즈니스 모델에는 다음 요소가 포함되어야 합니다.
- 고객 및 해당 식별 정보(예: 이름 및 전화번호)
- 고객 계정(계정 등급 및 잔고 포함)
- 계정 트랜잭션(예: 구매 금액)
- 메시지 또는 예외가 포함된 권한 응답
- 계정 및 고객 작성과 초기 계정 잔고에 대한 초기화 규정
비즈니스 모델 정의(.bmd) 파일에서 엔티티 및 이벤트를 모델링합니다. Insight Designer는 정의의 컨텍스트를 기반으로 사용 가능한 구성을 제안하는 편집기를 제공함으로써 모델링 프로세스를 단순화합니다.
다음 단계에서는 이벤트 및 엔티티를 정의한 후 초기화 규정을 사용하여 이를 작성합니다.
프로시저
- MyCreditCardSolution 솔루션 프로젝트를 선택한 후 솔루션 맵에서 이벤트 및 엔티티 정의를
클릭하십시오.

- 비즈니스 모델 정의 페이지의 BOM 프로젝트 필드에서, MyCreditCardSolutionBOM이 지정되어 있는지 확인하십시오. 이 폴더는 이전 학습에서 작성된 컨테이너입니다.
- 패키지 필드에서 creditcard를 입력하십시오. 패키지 이름은 .bmd 파일에서 모델링된 엔티티 및 이벤트에 적용되며, 비즈니스 모델 정의의 폴더 구조를 정의하기 위해 사용됩니다.
- 이름 필드를 BusinessModel의 자체 기본값으로 남겨두고 완료를 클릭하십시오. 비어 있는 BusinessModel.bmd 편집기가 열리며, 여기서 모델 정의를 시작할 수 있습니다.
- 계정 엔티티를 정의하십시오.
- an account를 입력하고 스페이스바를 눌러 자동 완성 메뉴를
여십시오.

- is a business entity를 두 번 클릭하십시오. 가능한 옵션의 다음 세트가 자동 완성 메뉴에 표시됩니다.
- identified by <id>를 두 번 클릭하십시오.
- an을 두 번 클릭하십시오.
- 표시된 옵션 중 하나를 선택하는 대신 id를 입력하십시오. 이 단어를 입력함으로써 account 엔티티가 식별되는 방법을 정의합니다.
- .를 입력하여 문장을 완성한 후에 Enter를 누르십시오. 각 행은 마침표로 끝나야 합니다.
an account is a business entity identified by an id. - an account를 입력하고 스페이스바를 눌러 자동 완성 메뉴를
여십시오.
- 계정의 상태 속성을 정의하십시오.
- .bmd 편집기의 두 번째 행에서 an account를 입력하고 스페이스바를 누르십시오.
- 자동 완성 메뉴에서 has를 두 번 클릭하십시오.
- a를 두 번 클릭하십시오.
- status를 입력한 후 스페이스바를 누르십시오.
- 다음을 두 번 클릭하십시오: ( ....
- an을 두 번 클릭하십시오.
- account status를 입력하고 스페이스바를 누르십시오.
- 다음을 두 번 클릭하십시오: ) ....
- .를 두 번 클릭하고 자동 완성 메뉴의 외부를 클릭하여 이를 비활성화하십시오.
account status 열거가 아직 정의되어 있지 않으므로 이 행에서 일시적으로 오류를 표시합니다.
an account has a status (an account status). - 계속해서 하나씩 엔티티 및 이벤트를 모델링하거나, 완료된 모델을 .bmd 파일에 복사하십시오. 완료된 모델은 다음과 같습니다.
an account is a business entity identified by an id. an account has a status (an account status). an account is related to a customer. an account has a balance (numeric). an account has a last check time (date & time). an account status can be one of: Excellent, Good, Fair, Poor, Risky. a customer is a business entity identified by an email with a first name, a last name, a phone number. a customer is related to some accounts. a transaction is a business event time-stamped by a date. a transaction is related to an account. a transaction has an amount (a number). a transaction has a country code. an exception is a concept. an exception has a reason. an exception has a code. an authorization response is a business event time-stamped by a date. an authorization response is related to an account. an authorization response has a message. an authorization response has a transaction. an authorization response has an exception. an account initialization is a business event time-stamped by a date. an account initialization is related to an account. an account initialization is related to a customer. an account initialization has a balance (a number).an account initialization has a status (an account status). - 저장을 클릭하십시오.
비즈니스 오브젝트 모델을 작성해 감에 따라 아웃라인 보기에서 계층 구조 보기에 요소와 해당 특성이 표시되는 것을 볼 수 있습니다. 아웃라인 보기에 있는 항목을 클릭하여 이를 비즈니스 모델 정의 파일에서 강조표시할 수 있습니다.

- 이벤트와 엔티티가 정의되면 일부를 초기화하는 방법을
지정할 수 있습니다.
- BusinessModel.bmd 파일의 창에서 규정 탭을 클릭하십시오.
- 자동 완성 메뉴를 사용하거나 복사 또는 붙여넣기하여 계정 및 고객 엔티티에 대한
다음 초기화 규정을 입력하십시오.
an account is initialized from an account initialization , where this account comes from the account of this account initialization : - set the customer of this account to the customer of this account initialization - set the balance of this account to the balance of this account initialization - set the status of this account to the status of this account initialization . a customer is initialized from an account initialization , where this customer comes from the customer of this account initialization . - 저장을 클릭하십시오.
- 옵션: 항목의 자연어 처리를 보십시오. 자연어 처리는 비즈니스 규칙에서 사용하는 단어 및 용어이며 기본 Java™ 클래스 및 멤버를 기반으로 합니다.
- 어휘 보기를 클릭하고 transaction
클래스를 펼치십시오.

- {the country code} of {a transaction} 멤버를 두 번 클릭하십시오. 요소 및 해당 자연어 처리에 대한 자세한 정보를 볼 수 있는 모델 창이 열립니다.
- 모델 창을 닫으십시오.
- 어휘 보기를 클릭하고 transaction
클래스를 펼치십시오.
관련 개념: