Asite Visual Workflow enables users to configure automatic file revision numbering based on its attribute details, via groovy scripts. Below is an example scenario to understand how this works.
Let's take an example of a project wherein automatic file revision numbering is to be configured based on a combination of purpose of issue and status. Considering that this project has below purpose of issues and file statuses configured. Also mentioned below is the expected automatic revision number sequence (based on the corresponding combination of purpose of issue and status).
In the below example, revision numbers starting with P can be considered as internal revision numbers while the ones starting with C can be considered as 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 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, user has to follow below steps:
Step 1: Configure a file system task for executing the groovy script. Below is an example groovy script that needs to be configured as a file system task.
|
Given below are details on how user can edit the script based on project requirements.
Part | Groovy Script | Description |
1 |
| This part helps user to configure the file revision number pattern, by editing the values within double quotes. 1. 'P' indicates the fixed character to be used in 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 to be used in 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 part helps user to configure the combinations of status and purpose of issue to use the start number that we defined in the point 2 in Part 1 above, by editing the values within double quotes.. This start number will be used as highlighted 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 either of abbreviation or full text of Purpose of Issue configured in the project. 2. 'Work In Progress' is the status value. You can use either of abbreviation or full text of Status configured in the project. 3. 'S0 (Update Only)' is the purpose of issue value. You can use either of abbreviation or full text of Purpose of Issue configured in the project. 3. 'S1' and 'S2' are the purpose of issue values. Pipe symbol is used as separator to separate the values. You can use either of abbreviation or full text of Purpose of Issues configured in the project. 4. 'Approved as Internal Share' and 'For External Share' are the status values. Comma is used as separator to separate the values. You can use either of abbreviation or full text of Statuses configured in the project. |
3 |
| This part helps user to configure the combinations of status and purpose of issue to use the start number that we defined in the point 2 in Part 1 above, by editing the values within double quotes. This start number will be used as highlighted in the following 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 either of abbreviation or full text of Purpose of Issue configured in the project. 2. 'Approved as External Shared' is the status value. You can use either of abbreviation or full text of Status configured in the project. 3. 'P1' and 'P2' are the purpose of issue values. Pipe symbol is used as separator to separate the values. You can use either of abbreviation or full text of Purpose of Issues configured in the project. 4. 'For Publishing' is the status value. You can use either of abbreviation or full text of Status configured in the project. |
4 |
| This part helps user to configure the combinations of status and purpose of issue to use the start number that we defined in the point 4 in Part 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. Pipe symbol is used as separator to separate the values. You can use either of abbreviation or full text of Purpose of Issues configured in the project. 2. 'Authorized as Published' is the status value. You can use either of abbreviation or full text of Status configured in the project. |
Step 2. Once the system task containing groovy script is configured, user can configure a file workflow trigger to run this system task upon 'Publish Documents' / 'Edit Attributes' event in a selected project folder in 'Post' task mode.
Step 3. To understand how the automatic revision numbering will actually work based on the above groovy script configuration, user can upload files into the folder as per 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 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