Release of dependent datasets in one workflow
Author: tzumtobel
Publication Date: 10/14/2016 13:15
Hello. I am currently trying to implement a workflow in a firstspirit project, but I have some problems with referenced objects.
I have two datasets, one with press articles and one with press topics. Every article is linked to some press topic (for example, "Autos" or "IT").
The problem is that when I release a new press article record, the corresponding topic needs to be released too (if it's not yet), but this is not the case. Workflow works fine with related media and pages (it finds all dependencies and releases every referenced object), but doesn't work with datasets, it seems not to check it at all.
I am using standart workflow implementation from here.
I would appreciate any piece of advice concerning this problem, thank you.
Tags: api, basic_workflow, database, datenbank, workflow
-
Author: mbergmann - 10/14/2016 16:45
Hello Thomas,
I assume the articles are referencing the topics using a schema n:1 or n:m relation. In this case you will have to add the logic yourself either by using a separate script task in the workflow or by creating your own implementation of the BasicWorkflows.
Such a logic (which datasets should be released when others are released) is always project specific because if this would be done automatically, it would most likely result in the release of way too many datasets if the mechanism would follow every relation recursively. In your case you most probably only want to release all topics that belong to the released article, but NOT all articles those topics are referencing, all of THEIR topics and THEIR topics' articles and so on...
The decision where to stop such kind of traversal always depends on the project and thus has to be specifically implemented.
Michael
0
Please sign in to leave a comment.
Comments
1 comment