Skip to content

Keep the action name and plugin id when cloning, fixes #5644#7542

Merged
hansva merged 1 commit into
apache:mainfrom
hansva:5644
Jul 16, 2026
Merged

Keep the action name and plugin id when cloning, fixes #5644#7542
hansva merged 1 commit into
apache:mainfrom
hansva:5644

Conversation

@hansva

@hansva hansva commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Resource export clones every action before serializing it, so a copy constructor that drops the name or plugin id corrupts the export:

  • ActionCheckFilesLocked delegated to this(), which reset the name to an empty string. The exported workflow then held an empty , and the server failed with a NullPointerException from WorkflowMeta.findAction() while resolving the hops.
  • ActionBase's copy constructor and ActionFtpPut used the two argument super(), which dropped the plugin id. The exported action was written without its , and the server failed to load the workflow with "Unable to load workflow info from XML node".

The ActionBase fix covers the eleven other actions that delegate to it.

Adds unit tests guarding the name/plugin id on clone, and integration test 0010 which runs a workflow containing a Check Files Locked action on a remote server through the resource export. The test fails on both bugs before this change.

Please add a meaningful description for your change here


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Run mvn clean install apache-rat:check to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
  • If you have a group of commits related to the same change, please squash your commits into one and force push your branch using git rebase -i.
  • Mention the appropriate issue in your description (for example: addresses #123), if applicable.

To make clear that you license your contribution under the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

Resource export clones every action before serializing it, so a copy
constructor that drops the name or plugin id corrupts the export:

* ActionCheckFilesLocked delegated to this(), which reset the name to an
  empty string. The exported workflow then held an empty <name>, and the
  server failed with a NullPointerException from WorkflowMeta.findAction()
  while resolving the hops.
* ActionBase's copy constructor and ActionFtpPut used the two argument
  super(), which dropped the plugin id. The exported action was written
  without its <type>, and the server failed to load the workflow with
  "Unable to load workflow info from XML node".

The ActionBase fix covers the eleven other actions that delegate to it.

Adds unit tests guarding the name/plugin id on clone, and integration test
0010 which runs a workflow containing a Check Files Locked action on a
remote server through the resource export. The test fails on both bugs
before this change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@hansva
hansva merged commit 92c2a50 into apache:main Jul 16, 2026
3 checks passed
@hansva
hansva deleted the 5644 branch July 16, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant