Table Of Contents

Previous topic

1. Part and document cloning: specifications

Next topic

3. Publication

This Page

Languages

Previous versions

1.2
1.1

2. Lifecycle

Warning

The following rules may not have been implemented.

TODO: Add examples, list tests validating these rules.

2.1. Standard lifecycles

  1. All standard lifecycles shall have an official status
  2. All standard lifecycles shall have a deprecated status
  3. All standard lifecycles shall have one or more status before official status (draft, to be validated, ...)
  4. Only one object with the same type/reference shall be at official status

2.1.1. Promote rules for Standard lifecycles

2.1.1.1. Parts

  1. Part without children shall have at least one linked official document before being promoted

    Examples:
    • Can promote:

      digraph {
    node [fontsize=10, shape="box", width=".2", height=".2"];

    subgraph g {
        part [label="Part\ndraft"]
        doc [label="Document\nofficial", shape="folder"]
        doc -> part;
    }

    subgraph g2 {
        part1 [label="Part\ndraft"]
        doc1 [label="Document\nofficial", shape="folder"]
        doc2 [label="Document\ndeprecated", shape="folder"]
        doc1 -> part1;
        doc2 -> part1;
    }

    subgraph g3 {
        part3 [label="Part\ndraft"]
        doc31 [label="Document\nofficial", shape="folder"]
        doc32 [label="Document\ndraft", shape="folder"]
        doc31 -> part3;
        doc32 -> part3;
    }

}

    • Can not promote:

      digraph {
    node [fontsize=10, shape="box", width=".2", height=".2"];

    subgraph g1 {
        part [label="Part\ndraft"]
    }

    subgraph g2 {
        part1 [label="Part\ndraft"]
        doc1 [label="Document\ndraft", shape="folder"]
        doc2 [label="Document\ndeprecated", shape="folder"]
        doc1 -> part1;
        doc2 -> part1;
    }

    subgraph g3 {
        part3 [label="Part\ndraft"]
        doc31 [label="Document\ndraft", shape="folder"]
        doc31 -> part3;
    }
}

    Tests:
    • plmapp.PartControllerTest.test_is_promotable1
    • plmapp.PartControllerTest.test_is_promotable_no_document
    • plmapp.PartControllerTest.test_is_promotable_no_official_document
    • plmapp.PartControllerTest.test_is_promotable_one_official_document

2.1.1.2. Documents

  1. Document shall not be promoted without a file in it or equivalent

    Examples:
    • Can promote:

      digraph {
    node [fontsize=10, shape="box", width=".2", height=".2"];

    subgraph g {
        file [label="File\nunlocked", shape="note"]
        doc [label="Document\ndraft", shape="folder"]
        doc -> file;
    }

    subgraph g2 {
        file1 [label="File\nunlocked", shape="note"]
        file2 [label="File\nunlocked", shape="note"]
        doc2 [label="Document\ndraft", shape="folder"]
        doc2 -> file1;
        doc2 -> file2;
    }

}

    • Can not promote:

      digraph {
    node [fontsize=10, shape="box", width=".2", height=".2"];

    subgraph g1 {
        doc [label="Document\ndraft", shape="folder"]
    }
}

    Tests:
    • plmapp.DocumentControllerTest.test_is_promotable_no_file
    • plmapp.DocumentControllerTest.test_is_promotable_one_unlocked_file
    • suversion.SubversionRepositoryTestCase.test_is_promotable
  2. Document shall not be promoted if one of their files is locked

    Examples:
    • Can promote:

      digraph {
    node [fontsize=10, shape="box", width=".2", height=".2"];

    subgraph g {
        file [label="File\nunlocked", shape="note"]
        doc [label="Document\ndraft", shape="folder"]
        doc -> file;
    }

    subgraph g2 {
        file1 [label="File\nunlocked", shape="note"]
        file2 [label="File\nunlocked", shape="note"]
        doc2 [label="Document\ndraft", shape="folder"]
        doc2 -> file1;
        doc2 -> file2;
    }

}

    • Can not promote:

      digraph {
    node [fontsize=10, shape="box", width=".2", height=".2"];

    subgraph g {
        file [label="File\nlocked", shape="note"]
        doc [label="Document\ndraft", shape="folder"]
        doc -> file;
    }

    subgraph g2 {
        file1 [label="File\nlocked", shape="note"]
        file2 [label="File\nunlocked", shape="note"]
        doc2 [label="Document\ndraft", shape="folder"]
        doc2 -> file1;
        doc2 -> file2;
    }

}

    Tests:
    • plmapp.DocumentControllerTest.test_is_promotable_one_locked_file
    • plmapp.DocumentControllerTest.test_is_promotable_one_unlocked_file
    • plmapp.DocumentControllerTest.test_is_promotable_two_unlocked_files

2.1.2. Promote rules to official for Standard lifecycles

  1. Promoting one object to official status shall push the prior official revision to deprecated status

    Tests:
    • plmapp.ControllerTest.test_promote_to_official_revision_previous_is_official
  2. Promoting one object to official status shall push all prior non official revisions to cancelled lifecycle

    Tests:
    • plmapp.ControllerTest.test_promote_to_official_revision_previous_is_editable
  3. Parent part shall not be promoted to a status higher than its child’s status:

    Warning

    What to do if the lifecycles are different?

2.1.3. Cancel rules

  1. An object can only be cancelled by its owner

    Tests:
    • plmapp.ControllerTest.test_cancel_not_owner
    Tests:
    • plmapp.ControllerTest.test_cancel_owner
  2. When an object has more than one revision, none of its revisions can’t be cancelled

    Tests:
    • plmapp.ControllerTest.test_cancel_revised
  3. Non draft objects can’t be cancelled

    Tests:
    • plmapp.ControllerTest.test_cancel_draft
    • plmapp.ControllerTest.test_cancel_not_draft
  4. If a part is wether a child or a parent, it can’t be cancelled

    Tests:
    • plmapp.PartControllerTest.test_cancel_has_child
    Tests:
    • plmapp.PartControllerTest.test_cancel_has_parent
  5. If a part is related to a document and inversely, it can’t be cancelled.

    Tests:
    • plmapp.PartControllerTest.test_cancel_has_document_related
    Tests:
    • plmapp.DocumentControllerTest.test_cancel_has_part_related

2.1.4. Ownership

  1. When an object is official, ownership shall switch from one user to Company

    Tests:
    • plmapp.ControllerTest.test_promote_to_official_status
  2. When an object is deprecated, ownership shall stay to Company

    Tests:
    • plmapp.ControllerTest.test_promote_to_deprecated_status
  3. Non official objects can’t switch to Company ownership

    Tests:
    • plmapp.ControllerTest.test_set_owner_error2

2.1.5. Visibility

  1. Object is visible only by its group’s users when its status is before official

    Tests:
    • plmapp.ControllerTest.test_is_readable_group_ok
    • plmapp.ControllerTest.test_is_readable_group_invalid
    • plmapp.ControllerTest.test_is_readable_owner
    • plmapp.ControllerTest.test_is_readable_company
  2. Object is visible by all users when its status is official

    Tests:
    • plmapp.ControllerTest.test_is_readable_not_editable
  3. Object is visible by all users when its status is deprecated

    Tests:
    • plmapp.ControllerTest.test_is_readable_not_editable

2.1.6. Edit/Modification

  1. Object can only be edited by its owner

    Tests:
    • plmapp.MechantUserViewTest.test_edit_attributes
  2. Part links can be created/removed only by its owner

    Tests:
    • plmapp.PartControllerTest.test_add_child_error_not_owner
    • plmapp.PartControllerTest.test_delete_child_error_not_owner
  3. Part links can’t be removed at official status

    Tests:
    • plmapp.PartControllerTest.test_delete_child_error_official_status
  4. Part’s child links can’t be created/removed at official status

    Tests:
    • plmapp.PartControllerTest.test_add_child_error_official_status
    • plmapp.PartControllerTest.test_delete_child_error_official_status
  5. Part’s parent links can be created/removed at official status

    Tests:
    • plmapp.PartControllerTest.test_add_child_error_official_status
    • plmapp.PartControllerTest.test_delete_child_error_official_status
  6. Owner can create/remove links between draft Documents and parts at all status

  7. Ownership and other signature rights can be modified only by its owner

2.1.7. Revision

  1. All users who can see an object can revise it

  2. Only the last revision can be revised

  3. An object can be revised whatever is its status (except deprecated)

    Tests:
    • plmapp.ControllerTest.test_revise_error_deprecated_object
    • plmapp.Controller.test_revise
    • plmapp.Controller.test_revise_official
  4. The user who revises an object can change the group of the revised object? ??

2.1.8. Notification

  1. When an object is promoted to official status, all members of the group shall be notified by e-mail
  2. When an object is promoted the next signer shall be notified by e-mail
  3. When an object is demoted the previous signer shall be notified by e-mail

2.2. Cancelled lifecycle

  1. Shall have only one status: Cancelled

  2. Object is visible by all users

  3. Ownership is Company

  4. Object is cancelled if it is pushed by another promoted to official status

    Tests:
    • plmapp.ControllerTest.test_promote_to_official_revision_previous_is_editable
  5. All part-part and part-document links shall be removed

  6. Cancelled objects can’t be edited nor modified

  7. Users can’t revise an object with cancelled status

    Tests:
    • plmapp.ControllerTest.test_revise_error_cancelled_object