10.4.6. Editing Lifecycle Attributes

Engineering Knowledge Manager

Administration Guide | Chapter 10: Defining and Configuring Lifecycles | 10.4. Defining Lifecycles in EKM Studio |

10.4.5. Opening Lifecycle Files |  | 10.5. Enabling Lifecycles
Prev |  | Next

### 10.4.6. Editing Lifecycle Attributes

Once you have defined your lifecycle diagram as described in Steps for Defining New Lifecycles, you need to specify which object types that the lifecycle will be applied to, and whether the lifecycle will be enabled when an object of that type is created. You can also select the scripting language to be used for macros and expressions.

To define the object types that a lifecycle will be associated with:

1. Select Edit > Lifecycle Attributes from the menu bar to open the Edit Lifecycle Attributes dialog box.

   Figure 10.6: Edit Lifecycle Attributes Dialog

2. Click Insert to add a row to the Types table.

3. Click in the New Type box and select an object type from the drop-down list.

4. If you want an object of that type to be enabled automatically by EKM whenever it is uploaded to a repository or created, check the Enabled by default box. If you do not enable an object type by default, then the lifecycle can manually be enabled by any user who has `Lifecycle` permission for the object using the Enable Lifecycle action. See Enabling Lifecycles for more details.

5. From the Language drop box, select the scripting language (Python or BeanShell) that you would like to use for macros and expressions.

   Python is a powerful and easy-to-use scripting language that is very popular. EKM uses Jython 2.7 to handle Python syntax. To learn more about Jython, refer to http://www.jython.org/index.html. To learn more about Python, refer to http://www.python.org. Jython 2.7 allows the use of Python 2.7 language features. In addition, you can use any Java classes offered by JDK 1.8.

   BeanShell is a scripting language that can execute code written in standard Java syntax while providing scripting conveniences such as loose types. For more information on BeanShell and to see its detailed documentation, refer to http://www.beanshell.org. With BeanShell you have full access to all classes provided by Java’s JDK. EKM uses JDK 1.8, so you can use any of its classes in macros defined using BeanShell.

   If you change the Language setting, you will be prompted to edit any existing macros and expressions after you click OK in the Edit Lifecycle Attributes dialog:

   All expressions and scripts in the lifecycle should be consistent with the Language specified in your lifecycle attributes. If you have not defined any macros or expressions in the current lifecycle, you can disregard this warning message.

6. Repeat this process to add more object types to the lifecycle template. To remove a type, select it in the list and click Delete.

Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

Prev | Up / Contents | Next

Release 18.2 - © ANSYS, Inc. All rights reserved.