ThingWorx Flow > Creating and Managing Custom Actions > Inheriting or Copying an Existing Action in ThingWorx Flow
Inheriting or Copying an Existing Action in ThingWorx Flow
Inherit an Action
Inheriting an existing action allows you to tweak the inputs and outputs of the action. However, you cannot modify the code or logic of the action.
The following video demonstrates the Inherit action for the Write File action under File:
Copy an Action
Copying an existing action allows you to tweak the inputs and outputs of the action. You can modify the code or logic of the action.
* 
By default, the Copy action is not supported for the following third-party services and utilities:
Azure, Dynamics 365 CRM, Excel Online, FTP, FactoryTalk MOM, OData, OSLC, SAP OData, SAP RFC, SOAP, SQL Connector, Swagger, ThingWorx, Twilio, Windchill, Windchill RV&S, Zendesk
You can modify the settings.json file to prohibit the Copy action for the other third-party services and utilities. For more information, see Modifying the settings.json File for Custom Actions.
The following video demonstrates the Copy action for the Make Folder action under OneDrive:
Code Differences—Inherit and Copy
The following table provides the key differences in the code while inheriting or copying the Delete File action of Box:
Inherit an Action
Copy an Action
In the inheritedConnector section, the ptc-box-connector module is inherited. This module contains all the code artifacts required to execute the action.
The action uses the request module, which is called by the code.
The this.execute section refers to the box-file-delete action that is available under the ptc-box-connector module. v2 specifies the action version. You can write your own code to process the input and outputs per your requirement, and add any other business logic around the inherited call.
The this.execute section provides complete code logic of the action. You can modify this logic per your requirement.
The code under the this.input, this.output and this.localization sections is the same.
Was this helpful?