Example
This is an example of use of file routing associated with a Contract, where a file is zipped and copied to a specific virtual path.
Let’s start by creating a rule that acts on the testAcademy1.txt file.
The file will be zipped, and it will keep its original filename without extension. Its new name will be testAcademy1.zip.
As output, we want the file to be copied to a VFS called filerouting-vfs, path /output.
By saving our rule, it will appear in the main page:
We now configure a Contract of type New File to which we associate the file routing workflow.
It is important to note that in the Source virtual path section, the Actor, VFS and VFS path must be those that trigger the new file contract for file routing.
To simplify, in this example, a virtual path configured in file routing VFS is used.
Also the Actor and File resources must be those of file routing:
The workareaPath must be the shared path configured in the storage class:
The Actor, VFS and VFS path of the workareaPath virtual path must be those of the file routing.
Once the file enters the system, the rule will be applied and the testAcademy1.zip file will be created.
Going to Monitoring > Jobs, we can see the AcademyRuleContractNewFile Contract is COMPLETED.
Going to Monitoring > Search File by Actor, we can see the testAcademy1.zip file in the output virtual path of the VFS.
Updated 26 days ago