-
Notifications
You must be signed in to change notification settings - Fork 39
Best Practises
Edvard Fonsell edited this page Mar 30, 2017
·
3 revisions
-
Do not make backward incompatible changes to existing workflow definitions. Instead, create a new workflow definition if the structure of the workflow would change.
-
Prefer embedding single-domain workflows to domain applications instead of one big multi-domain nFlow server. Benefits:
- Domain objects and workflows can be updated or created in a same non-distributed transaction.
- Workflow implementation is easier, when workflows can use domain services directly. No need to expose domain services over REST just for implementing workflows.
- System management is easier, when domain services and workflows are within the same deployable unit. Managing a monolithic workflow server with multi-domain dependencies is more difficult.
- Use WorkflowInstanceFactory.newWorkflowInstanceBuilder() to get the WorkflowInstance.Builder for creating new workflow instances. This way the builder is automatically initialized with proper object mapper that is required when setting state variables that are not plain strings.