A060 – Create a state model
How to create a state model on a business object using a wizard:
- Create state transitions
- Give access to state transitions to group of rights
- Translate transition actions


STEP 1: Access
Then Click on the button Add state model this action appears when the object has a Enumeration type field and the object does not have already a state diagram.
Exercise:
- Open the business object diagram
- Insert the object
AppClient
if it is not already there - Double-click on
AppClient
STEP 2: Prerequisite
If the action button is not visible and the object does not have a list of values of the different states, first add it using the Add field wizard and choose :
- A Enumeration (simple) type
- Mandatory because an object state follows business logic rules
- Non-functional key
- With a forced default on the initial state of the object (ex.
PRO
)
Exercise:
- Create the
cliType
field on theAppClient
object if it is not already done (see Creating a field )
STEP 4: Select the field
- By clicking on Add state model from the configuration object screen, the first step is to select the field that will support the state model.
It is possible to have several Enumeration field on one object, but only one can be associated with a state model.
Click on Next
Exercise:
Select cliType
list
STEP 5: Create transition states

This step will create all possible transitions:
- At the left, lines show the states
- At the top, column values present the target states
The diagonal cannot be selected (there is no transition from one state to itself).
Exercise:
Create the following transitions:
- PRO => CTM: to allow the transition from state Lead to Customer.
- PRO => ABO: to allow to close a lead
- CTM => ABO: to allow to close an active customer
- ABO => PRO: In order to reactivate an abandoned lead
STEP 6: Grant transitions

This step is to give rights to each transition previously created:
- The checkboxes on the top of the screen allow to display the states transitions as action buttons. If none of the box is checked, then the transition can be made through the dropdown list field.
Exercise:
- Associate transitions to actions
- Grant all transitions to the group
MyAdminGroup
- Other checkbox used to indicate what rights groups can perform each transition.
- Click on Next
STEP 8: Clear cache and test
The action buttons can be changed in Administration / Action to change their translations. All states and transitions are updatable in the Business Process/State and State Transition.
Exercise :
- Log in as a user with rights to the business object and to make transitions
- Create a
Lead
type customer. 2 buttons must appear to put theLead
intoCustomer
or to abandon it.
STEP 10: Create the state model diagram

When a list of values is associated with a state model, a Modeller/Data model access button appears:
- Click on the button Edit model (green icon puzzle with a small pencil)
- In the extra box on the right, a blank template is generated
- With a right click on the diagram, insert the states
- Save the diagram with the Save button on the action bar.
This model can be used to update the state diagram:
- Double-click on a state: opens the state to change its translation
- Double-click on a transition: opens the transition to update the Action button or grant groups
- Link creation mode: possibility of adding transition drawing an arrow between two states
- Create a condition: to add a state by selecting a value from the list (it is necessary that the list of values know all the values)
- Color, line states, the group container, add notes, etc.
Exercise:
- Show the three possible states of the customer, and transitions
- Change the label of an action button (double-click a transition, navigate to its action / translation tab)
- Save the diagram