@RuleType(name="nuclos.ruletype.statechangerule.name", description="nuclos.ruletype.statechangerule.description") public interface StateChangeRule
StateChangeRule
is the interface that should be used to make an rule
applicable for StateChange-Events.
Classes implementing this interface can be attached to state transitions. In case of an StateChange-Event the method changeState is called.
Modifier and Type | Method and Description |
---|---|
void |
changeState(StateChangeContext context)
StateChangeContext is the context providing all attributes and methods that are relevant for StateChange-operations. |
void changeState(StateChangeContext context) throws BusinessException
StateChangeContext
is the context providing all attributes and methods that are relevant for StateChange-operations.
To get the BusinessObject
the method getBusinessObject() can be called.
Note: Only BusinessObject
/ Entities that are 'stateful', i.e. using a statemodel - can be used in StateChange-Event.
If a BusinessObject
cannot be used in this context check wether the entity is set 'use a statemodel'
context
- BusinessException
Copyright © 2024. All rights reserved.