Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
454be57
test stage
Manas-Kenge Jun 2, 2025
c71e137
install-uninstall done
Manas-Kenge Jun 2, 2025
389698f
setup graph
Manas-Kenge Jun 13, 2025
57bbd13
state, transitions backend
Manas-Kenge Jun 23, 2025
fcb7a7f
fix toolbar
Tishasoumya-02 Jun 27, 2025
99c6b2f
remove unused icons
Tishasoumya-02 Jun 27, 2025
662e397
csrf protection, add state functionality
Manas-Kenge Jul 2, 2025
fa5e2f6
Merge branch 'test-1' into fix-toolbar
Manas-Kenge Jul 3, 2025
2914709
Merge pull request #1 from Manas-Kenge/fix-toolbar
Manas-Kenge Jul 3, 2025
596761e
change UI
Manas-Kenge Jul 3, 2025
c211827
sidebar WIP
Manas-Kenge Jul 6, 2025
099a97c
add transitions api
Manas-Kenge Jul 8, 2025
930f39e
Better graph performance
Manas-Kenge Jul 9, 2025
f1fa4b4
add transition actions and minor UI changes
Manas-Kenge Jul 9, 2025
04d39b6
layout api WIP & minor cleanup
Manas-Kenge Jul 18, 2025
28234c6
add update workflow api, modify get workflows api
Manas-Kenge Jul 18, 2025
8aff6c0
add transition reducers
Manas-Kenge Jul 18, 2025
871fe1f
workflow tab WIP
Manas-Kenge Jul 19, 2025
519360b
fix:sidebar,save field description
Tishasoumya-02 Jul 20, 2025
8affd0c
fix
Tishasoumya-02 Jul 20, 2025
7d29072
Merge pull request #2 from Manas-Kenge/workflowStore
Manas-Kenge Jul 21, 2025
c799e4d
Merge pull request #3 from Manas-Kenge/workflowtab
Manas-Kenge Jul 21, 2025
92b2ba3
add properties and transitions in state tab
Manas-Kenge Jul 22, 2025
d1634a8
add sanity check
Manas-Kenge Jul 23, 2025
dc4fbb9
stateTab WIP
Manas-Kenge Jul 24, 2025
f133617
Fix:routes
Tishasoumya-02 Jul 24, 2025
0728ab9
Merge pull request #5 from Manas-Kenge/stateTab
Manas-Kenge Jul 25, 2025
2747eae
migrate from sidebar
Manas-Kenge Jul 25, 2025
3ca4514
transitions tab WIP
Manas-Kenge Jul 26, 2025
07457fb
fix the graph
Tishasoumya-02 Jul 27, 2025
3226bb7
Merge branch 'workflowsettings' of github.com:Manas-Kenge/workflow-ma…
Tishasoumya-02 Jul 27, 2025
59d5d0b
remove sidebar
Manas-Kenge Jul 28, 2025
70802b5
fix workflow form
Manas-Kenge Jul 30, 2025
de06c10
Merge pull request #6 from Manas-Kenge/workflowsettings
Manas-Kenge Jul 30, 2025
93099a0
Merge pull request #4 from Manas-Kenge/sanity-check
Manas-Kenge Jul 30, 2025
9de0973
better graph styling
Manas-Kenge Jul 31, 2025
266a97b
move interfaces, types
Manas-Kenge Jul 31, 2025
cfbe266
add graph types
Manas-Kenge Aug 1, 2025
ca607de
add create transition dialog
Manas-Kenge Aug 2, 2025
664a9e4
Merge branch 'test-1' into migrate-types
Manas-Kenge Aug 5, 2025
bbb1e21
Merge pull request #7 from Manas-Kenge/migrate-types
Manas-Kenge Aug 5, 2025
e003190
fix validation/sanity-check
Manas-Kenge Aug 6, 2025
8a099d8
add transition dialog on connecting the nodes
Manas-Kenge Aug 11, 2025
4c3859f
Merge pull request #9 from Manas-Kenge/transition-dialog
Manas-Kenge Aug 12, 2025
dbea4ea
better data fetching
Manas-Kenge Aug 14, 2025
7a1cbfd
sidebar with tabs added
Manas-Kenge Aug 14, 2025
79bae2c
use BlockDataForm instead of Form
Manas-Kenge Aug 18, 2025
0348bb9
fix styling
Manas-Kenge Aug 18, 2025
6d9394a
Merge pull request #10 from Manas-Kenge/add-sidebar
Manas-Kenge Aug 18, 2025
839778d
fix css actions toolbar
Tishasoumya-02 Aug 18, 2025
981f222
fix classnames
Tishasoumya-02 Aug 18, 2025
b83c4f7
change assign workflow endpoint
Manas-Kenge Aug 19, 2025
cf2c2f6
use react-spectrum styling for sidebar
Manas-Kenge Aug 19, 2025
483ad22
Merge pull request #11 from Manas-Kenge/fix-css-actions-toolbar
Manas-Kenge Aug 19, 2025
1161e60
Merge branch 'test-1' into add-sidebar
Manas-Kenge Aug 19, 2025
650e5e2
move css to separate file
Manas-Kenge Aug 19, 2025
454dd85
add assign dialog
Manas-Kenge Aug 22, 2025
2f804fa
add aria labels
Manas-Kenge Aug 23, 2025
f563410
fix sidebar button
Tishasoumya-02 Aug 26, 2025
090d9ba
merge
Tishasoumya-02 Aug 26, 2025
d2d445c
WIP
Manas-Kenge Aug 26, 2025
c6124ff
Merge pull request #12 from Manas-Kenge/add-sidebar
Manas-Kenge Aug 26, 2025
3a5bc5e
fix margins for sidebar and formatting
Tishasoumya-02 Aug 27, 2025
186a09d
i18n
Tishasoumya-02 Aug 27, 2025
1308cff
remove unused components
Manas-Kenge Aug 27, 2025
dfd65fc
frontend lint
Manas-Kenge Aug 27, 2025
cf66959
Merge pull request #14 from Manas-Kenge/move-settings-to-sidebar
Manas-Kenge Aug 28, 2025
a7c4772
Merge pull request #21 from Manas-Kenge/fix-lint
Manas-Kenge Aug 28, 2025
611ecb7
change icon
Manas-Kenge Aug 28, 2025
b12a568
Merge pull request #13 from Manas-Kenge/assign-dialog
Manas-Kenge Aug 28, 2025
4934326
add sidebar picker border
Manas-Kenge Aug 28, 2025
27a6d18
Added delete buttons for state and transitions
Manas-Kenge Aug 28, 2025
9d4952e
add readme
Manas-Kenge Aug 29, 2025
2b291d0
use widget
Manas-Kenge Aug 29, 2025
492558d
fix: add the delete icon inside the blocksdataform for state and tran…
Tishasoumya-02 Aug 29, 2025
c9e0394
remove widget, change toast
Manas-Kenge Aug 29, 2025
c5c7271
Merge pull request #24 from Manas-Kenge/delete-button-sidebar
Manas-Kenge Aug 30, 2025
b3d633b
Merge pull request #25 from Manas-Kenge/add-readme
Manas-Kenge Aug 30, 2025
31cbd2d
cleanup
Manas-Kenge Aug 30, 2025
538a4b2
add helmet
Manas-Kenge Sep 1, 2025
7a72256
fix edge creation and workflow deletion
Manas-Kenge Sep 1, 2025
accfcd1
Merge remote-tracking branch 'origin/main' into test-1
Manas-Kenge Sep 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions backend/src/workflow/manager/api/services/workflow/transition.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import json
from Products.DCWorkflow.Transitions import TRIGGER_AUTOMATIC, TRIGGER_USER_ACTION
from Products.DCWorkflow.Expression import Expression
from plone.protect.interfaces import IDisableCSRFProtection
from plone.restapi.deserializer import json_body
from plone.restapi.services import Service
Expand Down Expand Up @@ -279,13 +280,21 @@ def reply(self):
guard = transition.getGuard()
guard_data = body['guard']
if 'permissions' in guard_data:
guard.permissions = tuple(guard_data['permissions'])
guard.permissions = tuple(
Expression('string:%s' % p) for p in guard_data['permissions']
)
if 'roles' in guard_data:
guard.roles = tuple(guard_data['roles'])
guard.roles = tuple(
Expression('string:%s' % r) for r in guard_data['roles']
)
if 'groups' in guard_data:
guard.groups = tuple(guard_data['groups'])
if 'expr' in guard_data:
guard.expr = guard_data['expr']
guard.groups = tuple(
Expression('string:%s' % g) for g in guard_data['groups']
)
if 'expr' in guard_data and guard_data['expr']:
guard.expr = Expression(guard_data['expr'])
else:
guard.expr = Expression('')
transition.guard = guard

if 'states_with_this_transition' in body:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ def reply(self):
self.request.response.setStatus(404)
return {"error": f"Workflow '{workflow_id}' not found."}

assigned_types = base.get_assigned_types_for(workflow_id)
# Safety Check: Prevent deletion if workflow is in use.
assigned_types = base._get_assigned_types_for(workflow_id)
if assigned_types:
self.request.response.setStatus(400)
return {"error": f"Cannot delete workflow. It is still assigned to: {', '.join(assigned_types)}"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,36 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. Default: "Assign"
#: components/Workflow/AssignWorkflow
msgid "Assign"
msgstr ""

#. Default: "Assign Workflow"
#: components/Workflow/AssignWorkflow
msgid "Assign Workflow"
msgstr ""

#. Default: "Assigning..."
#: components/Workflow/AssignWorkflow
msgid "Assigning..."
msgstr ""

#. Default: "Assignment Failed"
#: components/Workflow/AssignWorkflow
msgid "Assignment Failed"
msgstr ""

#. Default: "Block"
#: components/Workflow/WorkflowSidebar
msgid "Block"
msgstr ""

#. Default: "Cancel"
#: components/Workflow/AssignWorkflow
msgid "Cancel"
msgstr ""

#. Default: "Document"
#: components/Workflow/WorkflowSidebar
msgid "Document"
Expand All @@ -31,6 +56,16 @@ msgstr ""
msgid "Expand sidebar"
msgstr ""

#. Default: "Failed to delete workflow."
#: components/Controlpanel/WorkflowTable
msgid "Failed to delete workflow."
msgstr ""

#. Default: "Failed to rename workflow."
#: components/Controlpanel/WorkflowTable
msgid "Failed to rename workflow."
msgstr ""

#. Default: "No errors found in the workflow."
#: components/Workflow/ActionsToolbar
msgid "No errors found in the workflow."
Expand All @@ -41,6 +76,16 @@ msgstr ""
msgid "Order"
msgstr ""

#. Default: "Select a content type..."
#: components/Workflow/AssignWorkflow
msgid "Select a content type..."
msgstr ""

#. Default: "Select the content type you would like to assign this workflow to."
#: components/Workflow/AssignWorkflow
msgid "Select the content type you would like to assign this workflow to."
msgstr ""

#. Default: "Settings"
#: components/Workflow/WorkflowSidebar
msgid "Settings"
Expand Down Expand Up @@ -76,6 +121,11 @@ msgstr ""
msgid "The new transition has been added successfully."
msgstr ""

#. Default: "The workflow has been assigned successfully."
#: components/Workflow/AssignWorkflow
msgid "The workflow has been assigned successfully."
msgstr ""

#. Default: "Transition Created"
#: components/Transitions/CreateTransition
msgid "Transition Created"
Expand Down Expand Up @@ -105,3 +155,23 @@ msgstr ""
#: components/Workflow/WorkflowSidebar
msgid "Workflow"
msgstr ""

#. Default: "Workflow Assigned"
#: components/Workflow/AssignWorkflow
msgid "Workflow Assigned"
msgstr ""

#. Default: "Workflow Manager"
#: components/Controlpanel/WorkflowPanel
msgid "Workflow Manager"
msgstr ""

#. Default: "Workflow deleted successfully."
#: components/Controlpanel/WorkflowTable
msgid "Workflow deleted successfully."
msgstr ""

#. Default: "Workflow renamed successfully."
#: components/Controlpanel/WorkflowTable
msgid "Workflow renamed successfully."
msgstr ""
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,36 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. Default: "Assign"
#: components/Workflow/AssignWorkflow
msgid "Assign"
msgstr ""

#. Default: "Assign Workflow"
#: components/Workflow/AssignWorkflow
msgid "Assign Workflow"
msgstr ""

#. Default: "Assigning..."
#: components/Workflow/AssignWorkflow
msgid "Assigning..."
msgstr ""

#. Default: "Assignment Failed"
#: components/Workflow/AssignWorkflow
msgid "Assignment Failed"
msgstr ""

#. Default: "Block"
#: components/Workflow/WorkflowSidebar
msgid "Block"
msgstr ""

#. Default: "Cancel"
#: components/Workflow/AssignWorkflow
msgid "Cancel"
msgstr ""

#. Default: "Document"
#: components/Workflow/WorkflowSidebar
msgid "Document"
Expand All @@ -31,6 +56,16 @@ msgstr ""
msgid "Expand sidebar"
msgstr ""

#. Default: "Failed to delete workflow."
#: components/Controlpanel/WorkflowTable
msgid "Failed to delete workflow."
msgstr ""

#. Default: "Failed to rename workflow."
#: components/Controlpanel/WorkflowTable
msgid "Failed to rename workflow."
msgstr ""

#. Default: "No errors found in the workflow."
#: components/Workflow/ActionsToolbar
msgid "No errors found in the workflow."
Expand All @@ -41,6 +76,16 @@ msgstr ""
msgid "Order"
msgstr ""

#. Default: "Select a content type..."
#: components/Workflow/AssignWorkflow
msgid "Select a content type..."
msgstr ""

#. Default: "Select the content type you would like to assign this workflow to."
#: components/Workflow/AssignWorkflow
msgid "Select the content type you would like to assign this workflow to."
msgstr ""

#. Default: "Settings"
#: components/Workflow/WorkflowSidebar
msgid "Settings"
Expand Down Expand Up @@ -76,6 +121,11 @@ msgstr ""
msgid "The new transition has been added successfully."
msgstr ""

#. Default: "The workflow has been assigned successfully."
#: components/Workflow/AssignWorkflow
msgid "The workflow has been assigned successfully."
msgstr ""

#. Default: "Transition Created"
#: components/Transitions/CreateTransition
msgid "Transition Created"
Expand Down Expand Up @@ -105,3 +155,23 @@ msgstr ""
#: components/Workflow/WorkflowSidebar
msgid "Workflow"
msgstr ""

#. Default: "Workflow Assigned"
#: components/Workflow/AssignWorkflow
msgid "Workflow Assigned"
msgstr ""

#. Default: "Workflow Manager"
#: components/Controlpanel/WorkflowPanel
msgid "Workflow Manager"
msgstr ""

#. Default: "Workflow deleted successfully."
#: components/Controlpanel/WorkflowTable
msgid "Workflow deleted successfully."
msgstr ""

#. Default: "Workflow renamed successfully."
#: components/Controlpanel/WorkflowTable
msgid "Workflow renamed successfully."
msgstr ""
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,36 @@ msgstr ""
"X-Is-Fallback-For: es-ar es-bo es-cl es-co es-cr es-do es-ec es-es es-sv es-gt es-hn es-mx es-ni es-pa es-py es-pe es-pr es-us es-uy es-ve\n"
"X-Generator: Poedit 2.2.1\n"

#. Default: "Assign"
#: components/Workflow/AssignWorkflow
msgid "Assign"
msgstr ""

#. Default: "Assign Workflow"
#: components/Workflow/AssignWorkflow
msgid "Assign Workflow"
msgstr ""

#. Default: "Assigning..."
#: components/Workflow/AssignWorkflow
msgid "Assigning..."
msgstr ""

#. Default: "Assignment Failed"
#: components/Workflow/AssignWorkflow
msgid "Assignment Failed"
msgstr ""

#. Default: "Block"
#: components/Workflow/WorkflowSidebar
msgid "Block"
msgstr ""

#. Default: "Cancel"
#: components/Workflow/AssignWorkflow
msgid "Cancel"
msgstr ""

#. Default: "Document"
#: components/Workflow/WorkflowSidebar
msgid "Document"
Expand All @@ -38,6 +63,16 @@ msgstr ""
msgid "Expand sidebar"
msgstr ""

#. Default: "Failed to delete workflow."
#: components/Controlpanel/WorkflowTable
msgid "Failed to delete workflow."
msgstr ""

#. Default: "Failed to rename workflow."
#: components/Controlpanel/WorkflowTable
msgid "Failed to rename workflow."
msgstr ""

#. Default: "No errors found in the workflow."
#: components/Workflow/ActionsToolbar
msgid "No errors found in the workflow."
Expand All @@ -48,6 +83,16 @@ msgstr ""
msgid "Order"
msgstr ""

#. Default: "Select a content type..."
#: components/Workflow/AssignWorkflow
msgid "Select a content type..."
msgstr ""

#. Default: "Select the content type you would like to assign this workflow to."
#: components/Workflow/AssignWorkflow
msgid "Select the content type you would like to assign this workflow to."
msgstr ""

#. Default: "Settings"
#: components/Workflow/WorkflowSidebar
msgid "Settings"
Expand Down Expand Up @@ -83,6 +128,11 @@ msgstr ""
msgid "The new transition has been added successfully."
msgstr ""

#. Default: "The workflow has been assigned successfully."
#: components/Workflow/AssignWorkflow
msgid "The workflow has been assigned successfully."
msgstr ""

#. Default: "Transition Created"
#: components/Transitions/CreateTransition
msgid "Transition Created"
Expand Down Expand Up @@ -112,3 +162,23 @@ msgstr ""
#: components/Workflow/WorkflowSidebar
msgid "Workflow"
msgstr ""

#. Default: "Workflow Assigned"
#: components/Workflow/AssignWorkflow
msgid "Workflow Assigned"
msgstr ""

#. Default: "Workflow Manager"
#: components/Controlpanel/WorkflowPanel
msgid "Workflow Manager"
msgstr ""

#. Default: "Workflow deleted successfully."
#: components/Controlpanel/WorkflowTable
msgid "Workflow deleted successfully."
msgstr ""

#. Default: "Workflow renamed successfully."
#: components/Controlpanel/WorkflowTable
msgid "Workflow renamed successfully."
msgstr ""
Loading
Loading