How to create an application including an EventFlow fragment that provides resources only
book
Article ID: KB0081191
calendar_today
Updated On:
Description
When the application archive project includes an eventflow fragment that only has schemas and other resource files but no StreamBase fragment to run, starting the node produces error:
[A.cluster] switch:applicationStarted failed : FAILED: EventFlow engine default-engine-for-com.example.sbapplication class path requires at least one EventFlow main module
What is the correct project structure to use and include a fragment that only provides reference files and schemas and no code?
Issue/Introduction
Project organization guidance
Resolution
The "resource only" project that contains schemas and other files but no running modules should not be included as a direct dependency of the Application archive project since it will not be run as its own engine. Instead the fragment with the shared resources should be a dependency of the EventFlow fragment projects that use it only.
The correct overall structure is:
1) The resource-provider project:
. SchemaProvider (ep-eventflow-fragment)
. com.example
. Schemas.sbint
2) The EventFlow fragment project:
. SchemaUser (ep-eventflow-fragment)
. com.example
. SBApplication.sbapp
. pom.xml (dependency on SchemaProvider)
3) The Application-archive project:
. Application
. pom.xml (dependency on SchemaUser)
When the SchemaUser fragment is built, it automatically contains the SchemaProvider project. The Application project doesn't need to know about the "resource only" project at all.
Feedback
thumb_up
Yes
thumb_down
No