kitodo / kitodo-production

Kitodo.Production is a workflow management tool for mass digitization and is part of the Kitodo Digital Library Suite.
http://www.kitodo.org/software/kitodoproduction/
GNU General Public License v3.0
62 stars 63 forks source link

Hide "Conditions" tab for non-parallel tasks #3362

Closed matthias-ronge closed 4 years ago

matthias-ronge commented 4 years ago

Workflow editor: The "Conditions" tab is irrelevant and irritated for non-parallel tasks. In this case, it should not be displayed.

solth commented 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.

Erikmitk commented 4 years ago

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.

solth commented 4 years ago

Is it possible to just check the checked state of the last checkbox of the first tab Properties using Javascript?

concurrent_task
Erikmitk commented 4 years ago

Yes, that should work. Only if this is checked the tab gets activated.

Erikmitk commented 4 years ago

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?

solth commented 4 years ago

@Erikmitk You are probably right. Even in a linear workflow it should be possible to skip individual tasks if corresponding condtions are not met.

matthias-ronge commented 4 years ago

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?

Erikmitk commented 4 years ago

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.

Kathrin-Huber commented 4 years ago

You are right! A condition can be set to every task! So this Issue is not relevant anymore.