More of a general showcase of how to use the embedded rule and process engines.
|
|
4 лет назад | |
|---|---|---|
| src | 4 лет назад | |
| .gitignore | 4 лет назад | |
| COPYING | 4 лет назад | |
| README.md | 4 лет назад | |
| pom.xml | 4 лет назад |
A bunch of examples of using the Kie API to create an embedded rule or process engine and either evaluate rules or run various processes.
By package:
rulesSimpleMatch
simplesimpleFactIntegritySingle, FactIntegrityMultiple
integrityintegrityAssertAndQueryFacts
awardsfactsAgendaGroupsWrongOrderLog, AgendaGroupsRightOrderLog
agendaWrong, agendaRightagenda.wrong, agenda.rightprocessesProcessWithFacts
ruleflowruleflowruleflow.RulesRulesRulesProcessWithParams
ruleflowruleflowruleflow.RulesRulesRulesProcessWithParamsOnly
ruleflowParamsruleflow_paramsruleflow.RulesRulesRules (different package!)ProcessWithListParams
ruleflowParamsruleflow_paramsruleflow.RulesWithListParamsList<Customer>) do not match the rules. Facts must be presented
individually for the matching patterns to be able to see them. The
process was just modified to change parameter types and adjust I/O
mappings for BR tasks. No other logic changes.ProcessWithListSubProcess
ruleflowParamsruleflow_paramsruleflow.RulesWithListSubProcList as the driver. The sub-processes then iterate over the
lists, and a single script task in each of the two is used to insert the
facts into the working memory. Since there is the possibility that
multiple customers have been passed in for processing, the
congratulations task must also iterate over the list of awards and decide
whom to congratulate based on each award's state. Uses the kcontext
implicit global variable in script tasks, and is hence non-portable.use_restAll of the classes in this package use the serviceTasks knowledge base,
which only makes the service_tasks Kie package available to the engines.
UseSimpleJavaBeanService
servicetasks.JavaBeanServiceTaskbeans.GenerateCustomerUseRestEasyManualClient
servicetasks.JavaRestClientServiceTaskws_client.CustomerServiceClientRequest/Response approach. Note how the service task does not
change, in principle, it is the implementation that makes the difference.UseRestEasyProxyClient
servicetasks.JavaRestProxyServiceTaskws_client.CustomerServiceProxyshared-data-model
project. Much easier and safer.UseRestServiceTask
servicetasks.BpmnRestTasktaskName="Rest" attribute as the CodeReady tooling does not have a
definition of a REST custom task, and regularly chokes on it, or else,
without the taskName attribute, the engine complains that the
custom task has no type and dies.Just contains a single class, UseRemoteKieArtifact, which loads a RHPAM
project with GAV coordinates of
net.p0f.samples.rhpam-fuse-integration:pam-simple-process:1.0.0-SNAPSHOT
using a remote KieContainer, and then just for the sake of the example,
also creates a KieScanner which has the ability to reload that container
and update it to latest version in order for new sessions to be able to use the
updated artifacts.