Hi Bratislav,
i have the same problem as Mathias.
We try to add a file to the BPM-Process. The File is already uploaded to yuuvis and we select it on the form with the id.
For adding the file we use the syntax from the page linked by Mathias.
Our Scriptcode:
var dmsObjectId = $.variable("exchangedocumentid").value; // the id of the dms object to be added
$.log.info("Add Element: " + dmsObjectId);
var http;
if ($.file.get().length > 0) { // if any objects in the process file exist
http = $.http.put();
} else { // if not
http = $.http.post();
}
var response = http
.service('bpm')
.path('/api/bpm/process/'+$.process.id+'/file/'+dmsObjectId)
.param('processId', $.process.id)
.param('dmsObjectId', dmsObjectId)
.query('type', dmsObjectType)
.execute();
$.log.info(JSON.stringify(response));
$.done();
The Logs:
Add Element: 733E8FF0F2DA41C398668B87A4390123
{"status":"404","reason":"","data":{"key":"service.bpm.file.element.not.found","message":"File element not found."}}
The Element can be found by this ID.
Do you have any idea why there is this 404 error?
Jan