This guide is for application developers who want to use Chenile and Chenile Gen to create services from standard blueprints instead of hand-building every module from scratch.
What Chenile Gen Is
Chenile Gen lives in the neighboring chenile-gen repository. Its jgen tool generates Chenile application skeletons from blueprint plugins.
At a high level:
- choose a blueprint
- provide input values
- Chenile Gen copies a template tree
- it fills in names, packages, options, and conditional modules
- the generated project compiles against the standard Chenile runtime libraries
Main blueprints
The built-in blueprints include:
chenile-servicewfservicewfcustommybatisQuerychenile-interceptoritbatchminimonolithjgen-blueprint
For blueprint-based Chenile application generation, the most important ones are:
chenile-servicewfservicewfcustommybatisQuery
How the generated code uses Chenile
Examples:
mybatisQuerygenerates a project that depends onorg.chenile:chenile-query-controllerwfserviceandwfcustomgenerate projects that depend onworkflow-apiandworkflow-service- generated workflow builds also use
stm-generate-pumlfor workflow diagrams
Prerequisites
Before using Chenile Gen, make sure you have:
- Java installed
- Maven installed
- a shell environment such as
zsh,bash, or PowerShell
If you are building Chenile Gen from source:
cd ~/Documents/framework/chenile-gen
make all
source setpath.sh
The CLI entry point
chenile-gen/jgen/jgen-cli/bin/jgen.sh
Two ways to generate
Interactive mode
chenile-gen/jgen/jgen-cli/bin/jgen.sh
This starts a menu-driven prompt flow.
Input-file mode
This is the safer and more repeatable mode.
Generate a sample input file:
chenile-gen/jgen/jgen-cli/bin/jgen.sh -g wfservice -o wfservice-input.json
Then run generation:
chenile-gen/jgen/jgen-cli/bin/jgen.sh -f wfservice-input.json
Recommended workflow
- Choose the right blueprint.
- Generate a sample input file with
-g. - Edit the JSON file.
- Run generation with
-f. - Inspect the generated project.
- Build it with:
mvn install
Blueprint selection guide
chenile-service
Use this for a general Chenile service.
wfservice
Use this when the domain entity moves through states and events and you want a generated workflow-enabled service.
wfcustom
Use this when you already have workflow XML and want generation to derive wiring and support code from it.
mybatisQuery
Use this when you need query endpoints backed by metadata JSON and MyBatis XML.