yuuvis® RAD Q&A

0 votes
by (1.9k points)

Hi OS-Team,

in your documentation of the BPM-API, there is a part where i can add a process file to a running process. See here.

Unfortunately, this script does not work. I get this error: "File element not found". The script works as long as I set the dmsObjectId to the id of the object the process was started with. But it fails with every other id.

The use case is that a workflow is started on a folder-object and some objects are added to this folder during the process. Now, I want to display an object (which object depends on the workflow step) instead of the folder.

In the digest for version 6.2 a similar example is mentioned.

1 Answer

0 votes
by (5.4k points)

Hi Mathias,

I have tested the functionality and it works here.
Could you please open a support call and provide the project + server logs?
(core-service and bpm-service)


by (120 points)
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
    .param('processId', $.process.id)
    .param('dmsObjectId', dmsObjectId)
    .query('type', dmsObjectType)

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?