yuuvis® RAD Q&A

0 votes
by (200 points)
edited by

Hi,

it' s possible to mark more than one objects in the client for simultaneously deliting?

Thanks for feedback.

3 Answers

+3 votes
by (1.2k points)
selected by
 
Best answer

Hello,
it is possible, if you use custom actions.
In our project it looks like this:
1) create new action
2) do not define object type, to allow to start this action on every object type
3) code:

var OBJECTS_TO_DELETE;

// Really delete?
var reallyDelete = confirm('Really?');
if(!reallyDelete) {
	scope.api.util.notifier.warning('Action was canceled', 'Objects were not deleted');
	return;
}

// Save all IDs to delete
OBJECTS_TO_DELETE = scope.objects.map(function(object) {
    return object.id;
})

// Delete all async
var promiseArray = [];
OBJECTS_TO_DELETE.forEach(function(objectID) {
    promiseArray.push(deleteThisObject(objectID));
})

// Each object take 755ms in our system
scope.api.util.notifier.info('Duration approximately: ' + Math.round(scope.objects.length * 0.755) + ' seconds', 'Delete was started');

Promise.all(promiseArray)
.then(function() {
    scope.api.util.notifier.success('Objects were deleted');
})
.catch(function(error) {
    scope.api.util.notifier.error(error.message, 'Objects were not deleted');
})

function deleteThisObject(objektID) {
    var url = '/dms/' + objektID;
    return scope.api.http.del(url);
}

I hope it helps.

Best regards,
Georgii

0 votes
by (14.8k points)
edited by

Yes and No. Not within the client. You have to use the management studio scripts capability:

example script: https://developer.enaio.org/redline/download/attachments/20743942/DeleteRootObjects.js?version=1&modificationDate=1547815998166&api=v2

or the rest-ws endpoint as given here:

http://redlinepm001.optimal-systems.de/rest-ws/#ENDPOINT:DmsBatchService.deleteObjects

by (15.8k points)
edited by
scripts are only supported in the enterprise-manager (legacy app). The management studio does not offer this and we recommend to use the REST API to delete objects - for example in a Talend job.
Keep in mind that the enterprise-manager is discontinued with version 6.
0 votes
by (14.8k points)

No. This feature is in the backlog without high priority. A workaround ist given by using management studios scripting capability:

https://developer.enaio.org/redline/download/attachments/20743942/DeleteRootObjects.js?version=1&modificationDate=1547815998166&api=v2

...