APS Action AMP - placeholders in process options aren't replaced when referenced property name contains a hyphen (-)

Description

When configuring a folder rule in Share using the APS Action, the process options allow for placeholders that will be resolved to item properties of the content node attached to the process. However, if one of the placeholders refers to a property with a hyphen in its name (for example liz:test-property), the property value is not substituted and the placeholder appears unchanged in APS instead.

This seems to be because hyphens in the property name are not considered in the regex pattern used to replace the placeholders with property values:
https://github.com/Alfresco/activiti-repo-connector/blob/master/src/main/java/com/activiti/alfresco/action/ExecuteProcessAction.java#L223

Steps to reproduce

  1. Set up a Share instance with the APS Action AMP installed and configured against an APS instance

  2. Navigate to Model Manager and create and activate a model with a custom aspect containing a custom property with a hyphen in the name, for example liz:custom-property

  3. Include the custom property in the layout for the aspect

  4. Create a site and folder within the site

  5. Navigate to the folder and click "Manage Rules"

  6. Create new rule and under Define Rule - When:, select "Items are updated"

  7. Under Perform Action, select "Start Process"

  8. Click the "Options…" button

    1. For the process definition, select "Ad hoc task"

    2. Set the process name to contain the custom property defined earlier, for example set the following value:
      Please Review {liz:custom-property}

    3. Under Additional form fields select Assignee and set it to an existing user ID in APS

  9. Click "OK" to close the dialog, then click "Create" to save the rule

  10. Create or upload a file to the folder with the rule set up

  11. Add the custom aspect to the file (note: this will trigger one instance of the process in APS)

  12. Set a value for the custom property (for example "Test Document"), then inspect the process started in APS by this update

Expected Behaviour
New process is started in APS with process name "Please Review Test Document", i.e. the value of the custom property is substituted into the process name.

Observed Behaviour
New process is started in APS with process name "Please Review {liz:content-property}" - the placeholder is not replaced with the respective property value.
When a property named liz:contentProperty is used instead, the property value is inserted as expected.

Environment

None

Testcase ID

None

Assignee

Unassigned

Reporter

Elisabeth Wetchy

Labels

None

ACT Numbers

01020622

Security Issue

None

Patch Attached

None

Premier Customer

None

Prioritization Score

None

Delivery Team

None

Build Location

None

Cloud or Enterprise

None

Bug Priority

Category 3

Work Funnel End

None

Escalated By

None

Dependent Version/s

None

Regression Since

None

Code Branch

None

Components

Fix versions

Affects versions