Closed matthias-ronge closed 4 years ago
I would suggest to deactivate the tab instead of hiding it for non-parallel tasks. That would be more in line with other UI elements that are normally available but cannot be used in specific situations. If we deactivate the tab instead of hiding it, we could also add a tooltip to the deactivated tab, explaining why it is not available for the selcted task in the workflow.
I’m going to look into it. I’m not sure if I have a mechanism at hand to distinguish parallel and non-parallel tasks.
Is it possible to just check the checked
state of the last checkbox of the first tab Properties
using Javascript?
Yes, that should work. Only if this is checked the tab gets activated.
But wait… why are non-parallel tasks not allowed to have a condition attached? What's the rationale behind that? If it's just a series of steps you could have a condition that makes a task optional. What am I missing?
@Erikmitk You are probably right. Even in a linear workflow it should be possible to skip individual tasks if corresponding condtions are not met.
Will the workflow engine also support this? What happens then? It skips the step and the next one is set to open? @frank-ulrich-weber, what do you think?
Will the workflow engine also support this? What happens then? It skips the step and the next one is set to open? @frank-ulrich-weber, what do you think?
That's what it's doing right now if I get that right. Check out the place were the condition is evaluated: https://github.com/kitodo/kitodo-production/blob/da20bbd0d27ecbcd0f550ef65bef0bcb80286ad7/Kitodo/src/main/java/org/kitodo/production/services/workflow/WorkflowControllerService.java#L598
If the condition is true the task will be opened, otherwise the next one is activated. This goes on until we find one we can work with.
Someone with a real dataset could simply try this and see what happens for real. I don't have enough data to do this.
You are right! A condition can be set to every task! So this Issue is not relevant anymore.
Workflow editor: The "Conditions" tab is irrelevant and irritated for non-parallel tasks. In this case, it should not be displayed.