Problem with retrieving open tasks in a project
Author: oschlueter
Publication Date: 9/2/2014 14:30
Dear community,
I'm currently developing a FirstSpirit module to provide a reset button which aims at resetting the entire project (e.g. deleting all content, structure, etc.). In order to achieve this, I also have to close all open tasks (shortcut Ctrl + T). According to this post it should be fairly easy, unfortunately I'm encountering a weird effect:
for (final IDProvider elementInWorkflow : agent.answer("fs.workflow = *")) {
final Task task = elementInWorkflow.getTask();
if (task != null) {
userService.closeTask(task);
} else {
// why would this happen?
System.out.println(elementInWorkflow.getId());
}
}
It would appear the items hitting the else-branch are elements of data sources that are currently not in a workflow and either have the release status IDProvider.CHANGED or IDProvider.NEVER_RELEASED. The call to getId() returns the id of the data source, the debugger provides more information regarding this matter, the instances are of class DatasetImpl.
A second effect is the fact that sometimes the query fails to retrieve elements of data sources that actually are in a workflow. Is there something I'm doing wrong here?
The FirstSpirit version is 5.1.107.
Regards,
Oliver
Tags: api, query, workflow
-
Author: pavone - 10/14/2014 8:41
Hello Oliver,
there is an internal ticket that addresses problems with the query "fs.workflows = ..." and it might cause your problem, too. The id of the ticket is 135567. You can contact our helpdesk for more information and support.
Best regards
Tim
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar