Skip to main content
To delete records from the record list, a ProcessModel entity is used. You can configure this entity so that it will delete either records or records and their associated documents from a knowledge center.

Creating a ProcessModel

  1. Open the ABBYYFlexiCapture application in Appian Designer and click New → ProcessModel. in the dialog box that opens, complete the Name field and specify the path to the folder where the process is to be saved. Click Create & Edit.
  2. Modify the process configuration by deleting the following nodes on the Process Modeler tab:
    • Start Event;
    • End Event;
    • XOR;
    • Delete Folder;
    • Delete Document;
    • Delete from Data Store Entities.
You can also double-click a node to modify it.
  1. Return to Appian Designer in order to add a dialog box that will prompt the user to confirm record deletion. To do this, click New → Interface, specify a name for the interface, and click Create & Edit.
  2. In the code editor that opens, switch from Design View to Expression View and paste the following code:
=a!formLayout(
label: "Delete?",
firstColumnContents: {
a!paragraphField(
labelPosition: "COLLAPSED",
readOnly: true,
value: "Submitting this form will delete your record and its attachments. The data will no longer exist or be visible in Tempo. After deletion, it is recommended to return to the records list, as this record will become unavailable."
)
},
buttons: a!buttonLayout(
primaryButtons: {
a!buttonWidgetSubmit(
label: "Delete",
style: "PRIMARY"
)
},
secondaryButtons: {
a!buttonWidgetSubmit(
label: "Cancel",
style: "NORMAL",
value: true,
saveInto: ri!cancel,
skipValidation: true
)
}
)
)
  1. In the Interface Input dialog box, add a cancel variable of type Boolean.
  2. Save he interface and go back to editing your process model. Click File → Properties and add the following variable on the Variables tab:
    • recordId of type Number (Integer)
    • DataStoreEntity of type Data Store Entity (a constant linking the data store to the data type)
  3. Open the Process Start Form tab, select the Select an interface option, and add the newly created interface that will ask for user confirmation when deleting a record. A dialog box will open asking you if you want to import the interface variables into the list of variables of the process. Click Yes. You will be able to use the added variables in the nodes.
    • The Cancel (XOR) node contains the following condition: if the user clicks Cancel, go to the End Event node; otherwise, go to the Delete Doc? node.
    • The Delete Doc? node checks if there are any documents in the folder linked to the record that is being deleted. If the folder is empty, it will be deleted; otherwise, the documents contained in the folder will be deleted first and then the folder itself will be deleted. Conditions: =length(folder(pv!recordId, “documentChildren”)) > 0;
    • The Delete Document node deletes all documents it receives as input. The list of documents is returned by the folder method with the “documentChildren”: =folder(pv!recordId, “documentChildren”) parameter.
    • The Delete Folder node deletes a folder based on its identifier: =pv!recordId.
    • The Delete from Data Store Entities node deletes records from the data store. The node receives the constant hat links the data store, the data type (of custom type “Table”), and the record ID (={{entity: pv!DataStoreEntity, identifiers: pv!recordId}}).
  4. Once you are done configuring the process, click File → Save & Publish, or press Ctrl + Alt + S.

Adding your process model to the records

Now you need to add the process to the record type as a related action. To do this:
  1. In Appian Designer, open Record Type.
  2. In the dialog box that opens, click New Relater Action, complete the ProcessModel field (enter the name of the newly created process), and specify the input variables of the process:
    • For Credit Card Application: Constant_CreditApplication_DSE
    • For the Account Payable Records: Constant_invoiceProcessing_DSE
  3. Add the new related action to the appropriate View Record Type.
Now when viewing records on the Summary tab in Tempo, a Delete button will be displayed at the top. When the user clicks this button, a confirmation dialog box will be displayed asking the user if he really wants to delete the record. Clicking Yes in this dialog box will delete the record.
Note: The user needs to refresh your browser window to make sure that the record has been completely deleted.

Deleting the Delete action from the Summary View

To make the record deletion button unavailable to the user, simply disable the Delete action in the Summary View properties. To do this:
  1. Open the ABBYYFlexiCapture application in Appian Designer.
  2. Open the record type that you want to modify.
  3. In the dialog box that opens, click Summary View and disable the Related Action Shortcuts option next to the Delete action.
  4. Click OK and save the changes you have made to the record type.
Now when records are viewed in Tempo, the Delete will no longer be displayed.