Table Of Contents

Previous topic

5. Files

Next topic

7. Publication

This Page


Previous versions


6. Lifecycle

6.1. Adding a new lifecycle

A lifecycle must have at least 3 states:

  1. a draft state
  2. optional states
  3. an official state
  4. a deprecated state

6.1.1. Using the admin interface

First, you need to create all states: open the page http://server/admin/plmapp/state/add and create them. The only required field is the name of the state, this value will be displayed in the lifecycle page. It’s fine if a state is referred by several lifecycles.

Then you need to create a lifecycle: open the page http://server/admin/plmapp/lifecycle/add/ and create it. Two fields are required: its name (that will be shown in the creation page) and its official state.

Then you need to create objects (named lifecyclestates) that bound the states to the lifecycle. Open the page http://server/admin/plmapp/lifecyclestates/add/ and create one object per state. Three fields are required:

  1. The lifecycle
  2. The state
  3. A rank: this field (an integer) is used to order the states, the first state must have the lower rank.

6.1.2. Using the python shell

It is possible to programamtically create a lifecycle.

Open a python shell (./ shell):

>>> from openPLM.plmapp.models import Lifecycle
>>> from openPLM.plmapp.lifecycle import LifecycleList
>>> # arguments: name of the lifecycle, name of the official state, names off all states (ordered)
>>> lcl = LifecycleList("mylifecycle", "official", "draft", "state2", "state3", "official", "deprecated")
>>> Lifecycle.from_lifecyclelist(lcl) # create the lifecycle
<Lifecycle: Lifecycle<mylifecycle>>

See also


6.2. How to change the lifecycle of an object

If you have to change the lifecycle of an object, you have to:

  1. Edit its PLMObject page (via the admin interface): make sure its state is consistent with the new lifecycle
  2. Make sure there is one (not least, not more) signer assigned to each signing level (number of states minus one levels): Add/edit required PLMObjectUserLink (http://server/plmapp/plmobjectuserlink/). All missing roles must start with sign_.


If you have to select a signer role above 10, you will have to edit the code of plmapp/, find the following lines:

for i in range(10): # increase this number
    level = level_to_sign_str(i)
ROLE_READER = "reader"

increase the number 10 and restart your server.

(Yes, its annoying, but you should not change the lifecycle of an object).