clamp-orchestrator / clamp-core

A microservices flow orchestrator and workflow manager.
https://clamp-orchestrator.github.io/clamp-orchestrator/
MIT License
9 stars 4 forks source link

Replace structs by-value usages with by-ref usages #95

Closed sivachandran closed 3 years ago

sivachandran commented 3 years ago

The following changeset replaces all most of the uses of struct by-value usage with by-ref usage.

Struct by-value usage incurs the cost of copying/cloning the struct data which should be avoided where it is not required.

The function CreateWorkflow is broken. It was supposed to assign an increasing id to the primary and on-failure steps. But the existing implementation didn't work as expected. So, now I added a test case to verify the expected behaviour and also fixed the CreateWorkflow function.