Add states to the release process
Changing the state of a Model or Drawing is controlled by a data dictionary, an Access Control List, and the DT_STATEFLOW process.
In order to add states to the release process,
• In the Creo Elements/Direct Manager Server Client:
◦ Add new states to the data dictionary for the STATE attribute.
◦ Update the appropriate Access Control List (ACL).
◦ Add the state to the DT_STATEFLOW user table.
• In your custom xml file:
◦ Make sure that the <ReleaseProcess> definition is in sync with changes made to DT_STATEFLOW.
Add new states to the data dictionary
In a Design Data Management schema, the DT_DD_STATE data dictionary contains values for the STATE attribute. The default values are:
• approved
• archived
• for_approval
• locked
• released
• work
You add additional states by adding entries to this data dictionary.
Update the Access Control List (ACL)
In the ACL, the Change From State and Change To State permissions control whether a user can change state.
• DT_DOC_ELEM_ACL controls the state change permissions for Models and Drawings.
• DT_PART_ELEM_ACL controls the state change permissions for Masterdata.
In the appropriate ACL(s), add definitions for who can change to and from the new state. It is good practice to give sysadmin permission on everything.
Add the state to the DT_STATEFLOW table
The DT_STATEFLOW database class contains a list of the source and destination states available. Creo Elements/Direct Model Manager uses this when creating state change pick lists. For example, if there are multiple entries where the source state is work, all of the destination states allowed by the ACL for that user show up in the pick list. The STATE_ORDER attribute defines the order of the destination states in the pick list. Each entry is tied to the defined ACL to ensure that the listed state changes are valid.
DT_STATEFLOW controls the list of available states by the attributes of the DT_STATEFLOW elements:
|
ACL_NAME
|
This entry affects all elements with this element ACL.
|
|
USR_GRP
|
The user group for this entry.
|
|
SRC_STATE
|
Specifies the source (current) state for this entry.
|
|
DEST_STATE
|
Specifies the destination state for this entry.
|
|
STATE_ORDER
|
If there is more than one destination state available, this parameter controls the display order in the Change State pick list.
Default STATE_ORDER values:
|
|
STATE_ORDER
|
Goes to STATE
|
|
10
|
work
|
|
20
|
approved
|
|
30
|
released
|
|
40
|
archived
|
|
50
|
locked
|
DT_STATEFLOW User Table
To add an entry:
1. Log in as medmgr.
2. Open medmgr's packet. You must create new elements in a packet; you may want to remove the new element form the medmgr packet after it has been created.
3. Create an element of CLASS_TYPE GENERAL and class DT_STATEFLOW.
When you finish adding the entry, you may want to remove the new element from the medmgr packet.
Sample customization: Archive state behavior
Only one version of an element can be released at a time. Previously released versions automatically change to archived. The archived state is only a state and not related to the document file archiving process. In the standard configuration, an element in the archived state cannot be changed back to another state.
The following entry may be added to DT_STATEFLOW so that an element can be changed from archived back to released. Note that you also need to change DT_DOC_ELEM_ACL so the Releasers have Change From State permission in the archived state.
|
UNIQUE_ID_STRING
|
|
OWNER
|
STATE_ORDER
|
|
DT_DOC_ELEM_ACL
|
Releasers
|
archived
|
released
|
medmgr
|
30
|
Sample customization: Creating a private state
A private state can be used to allow a designer to work on ideas for designs that the designer doesn't want everyone to see. The access restrictions in this example allow the following:
• Only users in the designers group to move CAD data that they've created (owner) to the private state.
• Only the owner can move the data out of the private state.
• Data in the private state can only be changed back to the work state.
• Members of the SYSADMIN group have all privileges.
• No other users may query, load, change state, etc. data in the private state.
To create the private state,
1. Add private to the list of states in the DT_STATE data dictionary.
2. Add the following users and states to DT_DOC_ELEM_ACL:
OWNER
◦ User/Group/Role Name: OWNER
◦ State: private
◦ Permissions: All Element permissions selected, no other permissions selected.
SYSADMIN
◦ User/Group/Role Name: SYSADMIN
◦ State: private
◦ Permissions: All Element permissions selected.
3. Add the following DT_STATEFLOW elements:
Allow designers to move from work to private
◦ ACL_NAME: DT_DOC_ELEM_ACL
◦ USR_GRP: designers
◦ SRC_STATE: work
◦ DEST_STATE: private
◦ STATE_ORDER: 5
Allow designers to move from private to work
◦ ACL_NAME: DT_DOC_ELEM_ACL
◦ USR_GRP: designers
◦ SRC_STATE: private
◦ DEST_STATE: work
◦ STATE_ORDER: 8