After Move events are executed when an artifact is moved from one repository to another.
From the Administration module, click Workers.
The Workers screen appears.
Select the New tab.
The Create Workers section appears that lists all the types of workers that you can create. The Artifactory section lists workers with a predefined action.
The Generic section lists workers that do not have a predefined action.
Click Add on the required type of worker.
Configure the worker in the After Move Worker screen.
Enter the name and description of the worker.
Create your worker code in the the code editor area.
As you type in the code, the editor provides you an auto-complete function that boosts your productivity.
Click the + symbol in the Repositories field to select the repositories that the worker monitors for events.
You can use filters to select the repositories and filter the artifacts and paths that the worker impacts.
For more information, see Worker Repository Filter.
Note
You can create a worker without specifying the repositories. But you cannot enable the worker without specifying the repositories.
Click Add Secret.
The Secrets screen appears, where you can add secrets to the worker.
Enter the name and a value for a secret.
Click Add Secret if you want to add more secrets.
You can edit the JSON payload in the AfterMoveRequest pane.
You can use this payload to be injected as the second parameter in your worker function. You can use this to simulate the payload the worker receives in the event.
Click Run Test to test the worker.
The results appear in the Execution Results pane.
You can enable the worker with the Enabled switch.
You can also save the worker and enable it only when required. You can enable the worker by editing the workers from the Configured tab in the Workers screen.
Click Save to save the worker.