[MGNLUI-3349] Task action availability should allow multiple or connected statuses Created: 12/Feb/15  Updated: 13/May/15  Resolved: 12/Feb/15

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: None
Fix Version/s: 5.4

Type: Improvement Priority: Neutral
Reporter: Espen Jervidalo Assignee: Espen Jervidalo
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
is depended upon by MGNLWORKFLOW-278 Allow tasks to be aborted Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Comments   
Comment by Espen Jervidalo [ 24/Feb/15 ]

commits on branch: https://git.magnolia-cms.com/gitweb/?p=magnolia_ui.git;a=shortlog;h=refs/heads/MGNLUI-3349_ej

Comment by Mikaël Geljić [ 11/Mar/15 ]
  • two test classes have missed the rename to align them to impl naming (ClaimHumanTaskActionTest.java and RejectHumanTaskActionTest.java)
  • So pre-checks are handled by availability now, which is great from the user point-of-view. But what happens if actions are invoked programmatically? should we keep those checks? (i.e. if you invoke an action with incorrect pre-conditions, then you'd still expect to get an IllegalStateException, because behavior of the action might become unpredictable somehow)
  • If not, add deprecation comment to AbstractTaskAction#canExecuteTask
Comment by Espen Jervidalo [ 11/Mar/15 ]

Thanks.
I don't think we should consider executing the actions programmatically. And we don't have any pre condition checks on other actions either. Except in some weird corner cases. Apart from that, I would recommend using commands for executing tasks programmatically.
I removed the catch for the IllegalStateException, It will still be caught in the general catch underneath.

Comment by Espen Jervidalo [ 11/Mar/15 ]

sorry, accidentally marked it as reviewed..

Comment by Mikaël Geljić [ 12/May/15 ]

Works as intended,

Random suggestions, not reopening anyway:

  • status plural is statuses
  • Thus we *could* have still supported both single status and multiple statuses on TaskAvailabilityRuleDefinition
    • with single status delegating to the list and/or throwing appropriate exception (e.g. get single status but list contains more)
    • would have made it more fluent to upgrade, not strictly requiring addition of the update task
Generated at Mon Feb 12 09:05:44 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.