Skip to content

claudivanmoreira/saga

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SAGA'S OPEN SOURCE BY KOTLIN

Use

  • By Maven Repository
  • Import GIT

Dependencies

  • Kotlin 1.3.71
  • Spring Boot Starter 2.2.6.RELEASE - test scope*

Example

// code away!

/* Extends Workflow class */
open class WorkflowTest( 
        override var data: Object? = null /* Overridden data type to your context */
        override var status: Object? = null /* Overridden status type to your context */
        var repository: JpaRepository<Object, UUID>? = null /* Added repository to your context */
) : Workflow(data = data, status = status) 
 /* Optional implements rollback error flow and updated status flow  */

@Service /* Build service class and implements business rules */
open class Service: WorkflowService()  

WorkflowTest() /* Execute sync or async and sequentially  */
  .save("INITIAL") /* Optional save workflow progress */
  .flow(service, async = true) /* Inject your sync/async service  */
  .save("PROCESSING")
  .insideFlow { conditional -> conditional.takeIf { that -> (that?.data as Product).goPay!! }
  ?.flow(paymentService) } /* conditional flow */
  .save("SUCCESS")
  /* Implements workflow rules */

Test Coverage

Package Class Class, % Method, % Line, %
all classes 100% (3/ 3) 50% (10/ 20) 57% (23/ 40)

Build Status

License

  • OPEN SOURCE

Article PT-BR

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 100.0%