|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Event Scripts > Workflow > OnCheckForRequiredECR.LST script file |
This script allows to incorporate GROUPS/USERS/REVISIONS that could bypass (using filters) the forced existence of an ECR. Useful for most organizations that need to allow the default engineering groups to always be allowed to create new revisions, regardless if an existing ECR already exists.
Options→Environment→Workflow
@REVISION |
the document's revision |
|---|---|
@UNIQUE_ID |
the document's uniqueId |
@OKREQUIREDECR |
0: no ECR is required |
Here below is a table that summarizes the effects of different options settings.
Enable ECR workflow |
Use OnCheckForRequiredECR.LST |
Effect |
|---|---|---|
|
|
You can create any revision you like |
|
|
You CANNOT create any revision until you complete the creation of a new ECR and the approval of the ECR for the documents |
|
|
You can create any revision you like |
|
|
You CANNOT create any revision until you complete the creation of a new ECR and the approval of the ECR for the documents |
The following example shows how to create a OnCheckForRequiredECR.LST that forces the existance of an ECR for any user not belonging to the DBWorks Designer DBWArm group.
.VBSCRIPT
Sub main()
DBWInit(True)
revision = DBWInput("@REVISION")
uniqueId = DBWInput("@UNIQUE_ID")
resultTrueFalse = 0
If DBWGetUserGroup()<>"DBWorks Designer" Then
resultTrueFalse = 1
End If
DBWOutput "@OKREQUIREDECR", resultTrueFalse, ForWriting
End Sub