Asite Visual Workflow enables users to configure automatic file revision numbering based on its attribute details, via groovy scripts. The following is an illustrative example to help grasp how this functions.
Let us consider an example of a project in which automatic file revision numbering is to be configured based on a combination of the status and purpose for issuing the file. This project has the following purposes for issuing files and file statuses configured. The expected automatic revision number sequence is mentioned below, based on the corresponding combination of the purpose of the issue and status.
In the example below, revision numbers that begin with P are regarded as internal revision numbers, while the ones starting with C can be considered external revision numbers.
Purpose of Issue | Status | Revision Number |
S0 | Work In Progress | P01.01, P01.02,… P01.0n |
S0 (Update Only) | Work In Progress | (Same as per the previous 'Work In Progress' version) |
S1 | Approved as Internal Share For External Share | P01.01, P01.02,… P01.0n |
S2 | Approved as Internal Share For External Share | P01.01, P01.02,… P01.0n |
S3 | Approved As External Shared | P01, P02,… P0n |
P1 | For Publishing | P01, P02,… P0n |
P2 | For Publishing | P01, P02,… P0n |
A1 | Authorized as Published | C01, C02,… C0n |
To achieve the automatic file revision numbering in this example, the user has to follow below steps:
Step 1: Configure a file system task for executing the Groovy script. Below is an example of the Groovy script that needs to be configured as a file system task.
|
Below are details on how users can edit the script according to project requirements.
Section | Groovy Script | Description |
1 |
| This section helps the user to configure the file revision number pattern, by editing the values within double quotes. 1. 'P' indicates the fixed character designated for the internal revision number. 2. '01' indicates the start number to be included with the fixed character. This will auto-increment based on the number of file revisions uploaded with the same document reference. 3. 'C' indicates the fixed character designated as the external revision number. 4. '01' indicates the start number to be included with the fixed character for published file revisions. This will auto-increment based on the number of file revisions uploaded with the same document reference. |
2 |
| This section helps the user configure the combinations of status and purpose of the issue to use the start number that we defined in point 2 in Section 1 above, by editing the values within double quotes. The specified starting number gets applied as illustrated in the following revision number pattern: P01.01, P01.02,… P01.0n. This start number will be applicable based on the combinations of status and purpose of issue as stated below: 1. 'S0' is the purpose of issue value. You can use the abbreviation or the full text of the Purpose of Issue configured in the project. 2. 'Work In Progress' is the status value. You can use the abbreviation or the full text of the Status configured in the project. 3. 'S0 (Update Only)' is the purpose of the issue value. You can use the abbreviation or the full text of the Purpose of Issue configured in the project. 3. 'S1' and 'S2' are the purpose of issue values. The pipe symbol is used as a separator to separate the values. You can use the abbreviation or the full text of the Purpose of Issues configured in the project. 4. Approved as Internal Share and For External Share are the statuses. The comma is used as a separator to separate the values. You can use the abbreviation or the full text of the statuses configured in the project. |
3 |
| This section helps the user configure the combinations of status and purpose of the issue to use the start number that we defined in point 2 in Section 1 above, by editing the values within double quotes. This start number will be used as highlighted in the pattern: P01, P02,… P0n This start number will be applicable based on the combinations of status and purpose of issue as stated below: 1. 'S3' is the purpose of issue value. You can use the abbreviation or the full text of the Purpose of Issue configured in the project. 2. Approved as External Shared is a status. You can use the abbreviation or full text of the status configured in the project. 3. 'P1' and 'P2' are the purpose of issue values. The pipe symbol is used as a separator to separate the values. You can use the abbreviation or the full text of the Purpose of Issues configured in the project. 4. 'For Publishing' is the status value. You can use the abbreviation or the full text of the Status configured in the project. |
4 |
| This section helps the user configure the combinations of status and purpose of the issue to use the start number that we defined in point 4 in Section 1 above, by editing the values within double quotes. This start number will be used as highlighted in the following pattern: C01, C02,… C0n This start number will be applicable based on the combinations of status and purpose of issue as stated below: 1. 'A1' and 'A2' are the purpose of issue values. The pipe symbol is used as a separator to separate the values. You can use the abbreviation or the full text of the Purpose of Issues configured in the project. 2. 'Authorized as Published' is a file status. You can use the abbreviation or full text of the status configured in the project. |
Step 2. Once the system task containing the groovy script is configured, the user can configure a file workflow trigger to run this system task upon the 'Publish Documents' / 'Edit Attributes' event in a selected project folder in the 'Post' task mode.
Step 3. To understand how the automatic revision numbering will work based on the above Groovy script, you can upload files into the folder according to your related workflow trigger configuration.
Below is a table explaining the automatic revision number of the file upon upload, based on the selected combination of file status and purpose of the issue mentioned above:
Ver No. | Purpose of Issue | Status | Revision Number |
1 | S0 | Work In Progress | P01.01 |
2 | S0 (Update Only) | Work In Progress | P01.01 |
3 | S1 | Approved as Internal Share | P01.02 |
4 | S2 | For External Share | P01.03 |
5 | S3 | Approved As External Shared | P01 |
6 | P1 | For Publishing | P02 |
7 | A1 | Authorized as Published | C01 |
8 | A2 | Authorized as Published | C02 |
Check: FAQs
Next Article: Extended QR Code on Files