Delete Media

This post is referring to Vahana 2 (beta version). To check the document for production, please go to vDesigner-v1.0

This task deletes media based on the configured identifiers or file path. By using the configured identifiers or file path, it deletes the media from DMS (Document Management System) or a specified file path. When you configure properties to delete the media, you also choose one of the following deleting options:

  • Soft Delete
  • Hard Delete

The Delete Media task’s property panel has the soft delete option selected by default.

Steps to Configure

  1. On the <<task group’s name>> page, see the Task panel.
  2. In the Task panel, search and find the Delete Media task.
  3. Drag the Delete Media task from the Task panel to the Execution panel.
  4. Under Delete Media, a group of boxes comes into view.
  5. In boxes, configure related properties as follows:
Property
Name
DescriptionMandatory
Reference NameThe reference name specifies the name of the task. In the Reference Name box, enter the name of the task. The reference name works as a name identifier. You can use it to search and find the current task from the list of multiple tasks.Yes
Hard DeleteThis property contains two options. You can use them as follows:
1. Yes:- When you choose this option, the Delete Media task deletes media from DMS (Document Management System) completely.

2. No:- When you choose this option, the Delete Media task does not delete media from DMS but turns its flag to inactive. You cannot use media in the external application if the media’s flag is inactive.
No
MediaThis property allows you to delete media by using one of the following options:
a. Identifier:- In the Media list, select this option to configure Doc ID, Doc Bundle ID, Object Type, and others as unique identifiers for deleting media.

b. Path:- In the Media list, select this option to configure the file path for deleting media.
Yes
Record IDThis property contains a non-editable value, this.ID. The expression, this.id, points to a specific record in DMS (Document Management System) that you want to delete.

This expression is frequently used in the object oriented programming language.
No
Doc IDIn this box, define a unique Doc ID. Thus, the Delete Media task will delete media based on the doc ID. You can define the doc ID as follows:

a. STATIC function:- Use the STATIC function and then manually define the Doc ID in the STATIC function.

b. Attribute:- Create an entity in the Data Modeler module. Thus, define an attribute in the entity. Define a unique Doc ID (an alphabetic, an alphanumeric, or a numeric value) as the value of the attribute.

To know more about how to create an entity or attribute, click here.

Click in the Doc ID box, enter the attribute’s name, and then select it.

c. Element:- Select an element that contains the Doc ID.

d. Entity:- Create an entity in the Data Modeler module. After you create the entity, store the Doc ID in the entity by using Copy Data task or by other methods.

When the application executes Copy Data task, it dynamically creates an attribute to store the Doc ID in the entity.

In the Doc ID box, enter the entity’s name, and then select it.

e. Functions:- You can use the vDesigner function, such as the STATIC function or other functions, to store the value of the Doc ID identifier.
No
Doc Bundle IDIn this box, define a Doc Bundle ID. In DMS (Document Management System), the Doc Bundle ID points to a group of multiple documents. Thus, the Delete Media task will delete media based on the Doc Bundle ID.

You can define the doc bundle ID by using the following ways:
a. Static Function
b. Attribute
c. Element
d. Entity
e. Function


To know more about how to define the Doc Bundle ID, see the description of the Doc ID property in this table.
No
File CaptionIn this box, define the caption or name of the file. Thus, the Delete Media task will delete media based on the caption of the file or media.

You can define the caption of the media by using the following ways:
a. Static Function
b. Attribute
c. Element
d. Entity
e. Function


To know more about how to define media, see the description of the Doc ID property in this table.
No
Business RuleIn this box, you can configure a business rule to determine the execution of the Delete Media task. If the user’s action satisfies the condition in the business rule, the Delete Media task is executed.

To configure the business rule:
–> In the Business Rule box, click the application tree icon (), and the Business Rule panel opens.
–> In the Business Rule panel, click Create New to configure a new business rule.
No
  1. After you configure the related properties, click Save to configure the Delete Media task.

Examples and Use Cases

You can use the Delete Media task in the following scenarios:

  • A user wants to delete media fle on application.
  • You want to archive media at the other location after a specific period.
  • You want to maintain data privacy and compliance in terms of personal and sensitive information.
  • Removal of deprecated and obsolete media files, and others.

Best Practices

  • First create a task group and then configure one or more tasks under the task group.
  • Use comprehensive and easy-to-remember terminology or naming conventions for the task group and tasks.
  • If possible, design a task group in such a way that you can use it as a reusable component in more than one place in the application.
  • In the task group, configure a task with a specific purpose.
  • To design a seamless application behavior, exercise and determine the order of tasks if you decide to configure multiple tasks in a specific order consecutively.
  • To delete multiple media files, use the Doc Bundle ID identifier in the place of the Doc ID or File Path.
Was this article helpful?
YesNo