Search the FirstSpirit Knowledge Base
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
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
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
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 search also delivers elements of type DataSet. These elements hava the same id as their Content2 node.
A second effect is the fact that sometimes the query fails to retrieve elements of data sources that actually are in a workflow.
Do you have an example? I'm not sure what kind of element you mean with "data source".