This project is inspired by the mockserver-server by Arnaud Buchholz. It makes use of the SAPUI5 MockServer and runs it in a standalone mode to mock a real odata service. The aim of the project is to replace the old implementation of the ewm-sim mockserver from EWM Cloud Robotics.
Note that the mockserver will not start, if the environment variables ODATA_USER and ODATA_PASSWD have not been set
To get the project up and running, issue the following commands in the root directory of the project:
npm install
npm start
Make sure you're in the correct directory.
$ docker build --tag ewm-sim:1.0 .
Now we need to set our environment variables, forward traffic to the host's port and run our docker image.
$ docker run -e ODATA_USER=root -e ODATA_PASSWD=123 -p 8080:8080 ewm-sim:1.0
Currently, the basic mockserver is up and running. It is served by an express web service. This includes:
- initializing the server from the provided mockdata .json files
- serving the data as an odata service
- providing basic odata functionality out of the box like
- GET,
- PUSH,
- PUT,
- DELETE requests
Additionally we are currently working to get the special functionality provided by the oData service of a real EWM system. Current status of those function imports is:
- fully mocked
- AssignRobotToWarehouseOrder
- ConfirmWarehouseTask
- ConfirmWarehouseTaskFirstStep
- GetInProcessWarehouseOrders¹
- GetNewRobotTypeWarehouseOrders¹
- GetNewRobotWarehouseOrder
- GetRobotWarehouseOrders
- SendFirstConfirmationError
- SendSecondConfirmationError
- SetRobotStatus
- UnassignRobotFromWarehouseOrder
- UnsetWarehouseOrderInProcessStatus
- WIP
- --
- not implemented yet
- --
¹ Due to missing properties in the oData model, implementation is only for demo purpose. The returned values will differ from an actual EWM system. The resource type is hardcoded to RB01, the resource group to RB02.
- Speciall error cases of EWM Systems tend not to occur in a mocked environment. Among them but not limited to:
- INTERNAL_ERROR
- WAREHOUSE_ORDER_LOCKED
- WAREHOUSE_ORDER_NOT_UNASSIGNED
- WAREHOUSE_TASK_ASSIGNED (property missing in oData Entity OpenWarehouseTaskSet)