Restoring deleted activities
Use an administrative command to restore activities that were moved to the Trash view. After an activity is moved to the Trash view, and before the Trash is purged from the system, the activity can be preserved if it is restored.
You do not need to check the configuration file in and out nor restart the server when using administrative commands.
To run administrative commands, you must use the wsadmin client. See Starting the wsadmin client for details.
Open a command window and start the wsadmin command line tool. See Starting the wsadmin client for more details.
Start the Activities Jython script interpreter.
Use the following command to access the Activities configuration file:
If prompted to specify a service to connect to, type 1 to pick the first node in the list. Most commands can run on any node. If the command writes or reads information to or from a file using a local file path, you must pick the node where the file is stored.
Get a list of the activities and entries currently in the Trash view by entering the following command:
Identify the activity or entry that you want to restore from the returned list. See Narrowing down results for more information.
Enter the following command to restore the activity or entry:
TrashCollectionService.undeleteTrash( java.util.Vector trashVector)
where you specify the activity or entry that you want to restore as the trashVector parameter.
Here is an example where all activities are deleted that start with a_activities, a_activities1, a_activities2, ....
Trash=TrashCollectionService.fetchTrash() myactivities=ListService.filterActivitiesByName(Trash, "a_act.*") TrashCollectionService.undeleteTrash(myactivities)
Parent topic:Managing trash