A workflow can contain a Delete activity which allows you to delete an asset from the system.
You cannot use the Delete activity if the workflow trigger type is set to Schedule, or if the workflow is using a Request Type with an allocation of Asset Type or General.
Note: Ensure that assets targeted by this activity can be safely deleted, as it is not possible to retrieve assets after deletion.
Example
Summary: When a user marks an asset as inactive, this triggers a workflow to send a deletion request to a reviewer. If approved, the asset is deleted.
Workflow: A workflow is created with these properties:
- Trigger:
- Trigger Type: Item Changed
- Object Class: Business Asset
- Object Type: Business Term
- Conditions: The workflow is triggered when the 'Active?' Boolean field on a Business Term asset is set to 'False', indicating that the asset is no longer active.
- Form activity: The first step in the workflow is a Form activity that includes a Boolean field labeled 'Do you approve?'. If the reviewer rejects the update (sets the field to 'False'), the workflow ends without deleting the asset.
- Delete activity: If the reviewer sets the Form field to 'True', the workflow proceeds to a Delete activity, which deletes the asset.
- Email activity: After the Delete activity, an Email activity is triggered. This sends an email to the workflow initiator, notifying them that the asset has been deleted. The email body includes the
[OBJECT_NAME]token, which is replaced with the name of the deleted asset.