Skip to content

Demo implementation of DaaS with Camunda DMN and cloud functions

Notifications You must be signed in to change notification settings

jpOlivo-uala/dmn-function

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Decisions as a Service (DaaS)

The business decisions can be modeled with DMN and these can be expose through a cloud function or a microservice. This implementation expose a decision modeled with DMN through Spring Cloud Function and Camunda DMN Engine

Starting the function

❯ ./mvnw spring-boot:run
  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v2.5.4)

2021-08-31 14:51:07.996  INFO 73769 --- [           main] com.demo.function.FunctionApplication    : Starting FunctionApplication using Java 11.0.11 on hostname.local with PID 73769 (/Users/guest/Dev/uala/dmn-function/target/classes started by guest in /Users/guest/Dev/uala/dmn-function)
...
2021-08-31 14:51:09.356  INFO 73769 --- [           main] o.s.c.f.web.mvc.FunctionHandlerMapping   : FunctionCatalog: org.springframework.cloud.function.context.catalog.BeanFactoryAwareFunctionRegistry@1f15e689
...
2021-08-31 14:51:09.393  INFO 73769 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2021-08-31 14:51:09.401  INFO 73769 --- [           main] com.demo.function.FunctionApplication    : Started FunctionApplication in 6.727 seconds (JVM running for 7.089)

Consuming a decision

❯ curl localhost:8080/voucherToApply -H "Content-Type: text/plain" -d "2021-08-30T20:09:17Z|47541920|PedidosYa*"
❯ PedidosYa_50_off
❯ curl localhost:8080/voucherToApply -H "Content-Type: text/plain" -d "2021-01-20T20:09:17Z|47541920|PedidosYa*"
❯ PedidosYa_30_off

Reference Documentation

For further reference, please consider the following sections:

About

Demo implementation of DaaS with Camunda DMN and cloud functions

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages