The management of all the service transactions tips and heads is what the life cycle defines and addresses. It considers things like:
- allowing changes to be discarded without impacting the current state of the service instance data
- merging changes out to service transaction tips relating to the same service instance when user-saving/committing a non-activated service transaction
- merging changes out to service transaction tips relating to other service instances when a service transaction is applied/activated
- discarding service transaction tips for the same service instance when transitioning it to a new state e.g. pending → review, review → activated, etc.
- discarding service transaction tips for the same service instance when discarding the current tip or selecting to discard all
- only indexing service transaction details when they’re user-saved/committed
Commands quick reference
Below are the more important commands in the life cycle management arsenal. These rely on other commands, and most also have flags that can be set to change their behaviour, but these should be the only ones that might need to be called, and without any further settings other than their defaults, to handle most of the life cycle logic.
| Command | Description | Service transaction method |
|---|---|---|
| StartService | Used to start a service instance of any kind e.g. registration, maintain, view, search, correction, etc. | |
| Save | Basic save with indexing options (off by default) performed whenever a service transaction is changed. | save() |
| SaveCommit | A formal save which sets a service transaction as committed and handles appropriate merging and indexing (on by default) and also merges out changes to any other active service transaction tips relating to this service instance. | saveCommit() |
| Submit | For submitting a service instance. It validates, and if successful and there’s no reason not to continue and not a correction it calls SaveCommit and TransitionService then fires an event to be picked up by the workflow engine so that payment, task review, etc. can be handled. | submit() |
| ActivateVersion | Activates a service instance. This tends to result in the service instance becoming the current, active version of the registry data. | activateVersion() |
| ActivateCorrection | Activates a correction service instance. This may result in the corrected details becoming the current, active version of the registry data, if the service instance being corrected was the current, active version of the registry data, otherwise the correction just becomes a previous head version of the registry data. | activateVersion() |
| Load | Basic load that loads in a service transaction, performs integrity and security checks and builds out the view tree if required. | |
| NakedLoad | Similar to Load, but doesn’t load in the view tree and doesn’t support indexing. | |
| LoadCopy | Similar to Load, but creates a new service transaction referencing the one it’s based on in it’s prevSiblingId value and copying across the domain data. | loadCopy() |
| TransitionService | Used to transition a service instance from one high-level state to another. Typically these are status changes such as pending → review, review → activated, revise → cancelled etc. but can also be setting a service transaction to a ghost as a dead-end state. Using this command rather than just updating the service transaction status via some other means ensures related service transactions are updated/cleaned up in the appropriate way. | |
| DiscardService | Used to discard a service instance or service transaction. Like TransitionService, this is usually done via an end-state status such as cancelled, rejected, expired, but can also be done by setting it to a ghost if it has not been user-saved/committed yet. Again, like TransitionService, using this command rather than just updating the service transaction via some other means ensures related service transactions are also discarded in the appropriate way. | discard(), discardAll() |
For further technical details please read at CatDocs.
0

