zhuangchong opened a new issue, #18728:
URL: https://github.com/apache/dolphinscheduler/issues/18728

   ### Search before asking
   
   - [x] I had searched in the issues and found no similar feature requirement.
   
   ### Description
   
   In DolphinScheduler 3.2.x, the batch copy process definition API returned 
the copied process definition in the response data, including its target 
project code and newly generated process definition code.
   
   In the current version, the corresponding workflow definition API:
   
   `POST /projects/{projectCode}/workflow-definition/batch-copy`
   
   returns `Result<Void>`, so the copied workflow identifiers are no longer 
available in the response.
   
   This prevents systems that depend on the returned definition code from 
upgrading from 3.2.x. These systems typically copy a workflow and immediately 
use the returned code to open, update, or execute the copied workflow. After 
upgrading, they cannot reliably determine which workflow was created without 
performing an additional query. Matching by workflow name is unreliable because 
copied workflow names may be adjusted to avoid conflicts.
   
   #### Proposed change
   
   Return a list containing the target identifiers for every successfully 
copied workflow definition:
   
   ```json
   [
     {
       "projectCode": 123456789,
       "workflowDefinitionCode": 987654321
     }
   ]
   ```
   
   Each result item should contain only:
   
   - `projectCode`: the target project code
   - `workflowDefinitionCode`: the newly generated workflow definition code
   
   Returning a list supports the batch semantics of the endpoint while 
restoring the information that was available to callers in 3.2.x.
   
   The current shared batch-operation implementation uses an `isCopy` flag for 
both copy and move operations, although move does not need a return value. The 
copy and move paths should be separated so that:
   
   - batch copy returns the copied workflow identifiers;
   - batch move remains a void operation;
   - existing permission checks, failure handling, and transaction rollback 
semantics remain unchanged.
   
   #### Expected result
   
   Users upgrading from 3.2.x can continue obtaining the identifiers of copied 
workflows directly from the batch copy response.
   
   Callers can use the returned target project code and workflow definition 
code without performing an additional query.
   
   ### Are you willing to submit a PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's Code of Conduct.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to