# 20180423
## Setup local test env
* Config in resource folder: `local.conf`
* Set host like zookeeper, kafka, app port
* kafka.zk is related to maaii-pubsub project (Kafka API for Maaii) (required if pubsub version lower than v2)
* Java Run entry point: `Boot.main`
* metric : graphite? (in hunting service)
* log config: `logback.xml`
## develop process
1. Get and discuss in JIRA ticket
1. Commit message follow JIRA ID to trigger Jenkins hook to append message to `JIRA Comments`
1. Wait CR and Lead prove to merge
### JIRA Ticket
* report env
* OP give some log or db data in `Comments`
* QA log also could be found in Kibana.
### Edit Code
### Gerrit Code Review (CR as Github PR)
* Merge Requirement: CR > 1
* Merge Control: team lead
* Commit Guideline:
## Feature: Cancel inquiry from visitor (WEB)
1. webclient init request (xmpp) -> bosh -> MIMS (grpc) -> IM
1. IM -> MNS (http /v2/notification)
1. IM -> MIMS (grpc) -> bosh -> agent&visitor
### Micro Service
* IM: modify grpc service
* endInquiry
* client to IM is by gRPC
* modify `resources/pubsub.conf`: `com.m800.common.InquiryDetails`-> `com.m800.liveconnect.common.InquiryDetails`
* `grpc/util/GrpcServiceHelper.java`
* `grpc/services/InquiryManagementService.java`
* `services/impl/InquiryManagementServiceImpl.java`
* MIMS: modify widget comoponent
* function `processPacket` add case `TERMINATE_INQUIRY_FROM_VISITOR`
* refer to `wigetConstant`
* build.gradle modify mainClassName to :
```
mainClassName = 'akka.kernel.Main'
run {
args 'com.maaii.im.server.Boot'
}
```
### Test
* refer to: `test/java/*Test`, create gRPC request by program
* unit test is required