-
Notifications
You must be signed in to change notification settings - Fork 35
Add dedicated updateWorkflow API for content workflow metadata #11645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: rymsha <2891483+rymsha@users.noreply.github.com>
Co-authored-by: rymsha <2891483+rymsha@users.noreply.github.com>
Co-authored-by: rymsha <2891483+rymsha@users.noreply.github.com>
Co-authored-by: rymsha <2891483+rymsha@users.noreply.github.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #11645 +/- ##
=========================================
Coverage 86.66% 86.66%
- Complexity 19668 19696 +28
=========================================
Files 2529 2536 +7
Lines 66677 66776 +99
Branches 5340 5336 -4
=========================================
+ Hits 57784 57874 +90
- Misses 6308 6315 +7
- Partials 2585 2587 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
…, WorkflowInfo as source Co-authored-by: rymsha <2891483+rymsha@users.noreply.github.com>
All three items addressed in commit 0517a1d:
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: rymsha <2891483+rymsha@users.noreply.github.com>
d59c1f5 to
94b453e
Compare
ab297cf to
6e583c1
Compare
| @@ -0,0 +1,30 @@ | |||
| package com.enonic.xp.content; | |||
|
|
|||
| import java.util.Map; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy found an issue: Unused import - java.util.Map.
| this.contentService.setContentTypeService( contentTypeService ); | ||
| Mockito.when( contentTypeService.getByName( Mockito.isA( GetContentTypeParams.class ) ) ). | ||
| thenReturn( createContentTypeForAllInputTypes() ); | ||
| Mockito.when( contentTypeService.getByName( Mockito.isA( GetContentTypeParams.class ) ) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Workflow information is special content metadata that should not be modified through the general
updatemethod. This adds a dedicatedupdateWorkflowAPI method following the same pattern asupdateMetadata.Changes
Core API (
core-api)WorkflowEditorinterface andEditableWorkflowclass for editing workflow state and checksEditableWorkflowusesWorkflowInfoas source instead ofContentUpdateWorkflowParamsandUpdateWorkflowResultfor workflow update operationsContentService.updateWorkflow()methodImplementation (
core-content)UpdateWorkflowCommandexecutes workflow updates with version history trackingContentServiceImpl.updateWorkflow()applies changes to draft branch onlyContentAuditLogSupportJavaScript API (
lib-content)UpdateWorkflowHandlerbridges JS to Java APIWorkflowInfoMapperfor serializing WorkflowInfo to JavaScriptcontent.tsexportsupdateWorkflow()function with TypeScript definitionsUsage
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.