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.
- Open the business object diagram
- Insert the object
AppClientif it is not already there
- Double-click on
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.
- Create the
cliTypefield on the
AppClientobject if it is not already done (see Creating a 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.
Click on Next
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).
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
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.
- Associate transitions to actions
- Grant all transitions to the group
- Other checkbox used to indicate what rights groups can perform each transition.
- Click on Next
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.
- Log in as a user with rights to the business object and to make transitions
- Create a
Leadtype customer. 2 buttons must appear to put the
Customeror to abandon it.
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.
- 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