STEP 7 - Test the worker End-to-End

Workers: Creating your First Worker - A Step By Step Example

AuthorFullName__c
Christopher Milazzo, Ravit Shapira, Sean pratt
articleNumber
000005917
ft:sourceType
Salesforce
FirstPublishedDate
2023-11-28T08:25:43Z
lastModifiedDate
2023-11-28
VersionNumber
8
Your worker is enabled and you can test it in a real context.
Go to the Artifacts page and upload a jar file to the repository “maven” using the following information, which does not match the repository path that we defined for the worker:

User-added image
Figure 15 - The artifact deployment popup with a configuration that uses a layout that does not match the pattern we defined in our worker.
The result is that the upload is canceled and an error message is generated:

User-added image
Figure 16 - The artifact deployment popup showing an error message for the deployment.

Next, run a test using the following configuration. This time your upload should succeed:

User-added image

Figure 17 - An example of a deployment configuration that matches the layout pattern we defined in our worker.

NOTE: Multiple uploads trigger multiple execution requests, one per file. If you send a JSON file and a jar file at the same time, Artifactory will handle them as if they were independent uploads and it will result in only one file being uploaded. In this case, the deployment will fail because not all the files would have been downloaded successfully.

User-added image

Figure 18 - Example of a multi-file deployment.

User-added image

Figure 19 - The multi-file deployment result. It shows that the file with the “json” extension has not been deployed because it does not match the layout pattern we defined in our worker.