Welcome to the Citeck ecos-demo-app
repository! This repository contains demo application that demonstrates ECOS features.
When you start this application in default left menu will appear 'Demo type' section with two journals:
- Demo type entities - main demo journal with BPMN process and different demo actions. The demo scenario written below is based on this type.
- Demo in-memory type - journal with in-memory entities to demonstrate working with custom RecordsDAO defined in ru.citeck.ecos.webapp.demo.records.DemoInMemRecordsDao. You can create/view/edit/delete records in this journal and see what changed in DemoInMemRecordsDao.
If you are new to ECOS platform and would like to run the software locally, we recommend you download the Dockerized version from Demo repository.
- Run ecos-demo-app.
- Tap 'Create' button in top-left corner in ECOS.
- Chose Demo type -> Demo type.
- Enter in field 'Text data' value 'error' and click 'Save' button. You should see error from transactional listener defined in ru.citeck.ecos.webapp.demo.events.DemoEcosEventListener.
- Change value of the field 'Text data' to anything else and fill in other fields.
- After creation you'll see information about created record:
- Status will be 'New'. This is defined in property defaultStatus in type config - src/main/resources/eapps/artifacts/model/type/demo-type.yml
- Task widgets will show active task for current user. BPMN process started because we have process definition in src/main/resources/eapps/artifacts/process/bpmn/demo-process.bpmn.xml with flags ecos:enabled="true" and ecos:autoStartEnabled="true".
- Click the 'Done' button in the current task widget.
- Task will disappear and external task will be started - ru.citeck.ecos.webapp.demo.exttask.DemoExternalTask.
- After ~5-10 seconds you can update your browser tab and see the new status 'Completed' and filled field 'Field generated in external task'. BPMN Process completed at this point.
- You can click 'Send demo email' to test custom action with email sending.
- Action class: ru.citeck.ecos.webapp.demo.actions.SendDemoEmailAction
- Action definition: src/main/resources/eapps/artifacts/ui/action/send-demo-email-action.yml
- Email template: src/main/resources/eapps/artifacts/notification/template/demo-email.html.ftl
- Result email can be found in mailhog (if you don't change default email settings) - http://localhost:8025/
- After email action testing you can call 'Create child entity' to test ability to create linked entities by action.
- Action definition: src/main/resources/eapps/artifacts/ui/action/create-child-entity-action.yml
- Documentation provides more in-depth information.
To run this application the following applications from ECOS deployment are needed:
- zookeeper
- rabbitmq
- ecos-model
- ecos-registry
To start your application in the dev profile, simply run:
./mvnw spring-boot:run
If your IDE supports starting Spring Boot applications directly, then you can easily run the class 'ru.citeck.ecos.webapp.demo.EcosDemoApp' without additional setup.
To build the application for production run:
./mvnw -Pprod clean package jib:dockerBuild -Djib.docker.image.tag=custom
To ensure everything worked, stop original ecos-demo-app container and start ecos-demo-app:custom instead of it.
To launch your application's tests, run:
./mvnw clean test
We welcome contributions from the community to make ECOS even better. Everyone interacting in the Citeck project’s codebases, issue trackers, chat rooms, and forum is expected to follow the contributor code of conduct.
If you need any assistance or have any questions regarding Citeck ecos-demo-app
, please create an issue in this repository or reach out to our support team.
Citeck ecos-demo-app
is released under the GNU Lesser General Public License.