|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Event Scripts > Workflow > OnSendWorkflowNotificationToUsers.LST script file |
It manages the event of sending a notification to the user(s) who submitted a document to the Workflow Module.
Options→Environment→Workflow
@USER_NAME |
the name of the user who submitted the approval request |
|---|---|
@WORKFLOW_PROCESS_RESULT |
0: rejected |
@DOCUMENT_UNIQUE_IDS |
comma separated list of the unique ids of the documents submitted |
@ECO_ID |
the current ECO_ID being approved |
.VBSCRIPT
sub main
DBWInit(TRUE)
userName = DBWInput("@USER_NAME")
workflowProcessResult = DBWInput("@WORKFLOW_PROCESS_RESULT")
documentUniqueIds = DBWInput("@DOCUMENT_UNIQUE_IDS")
DBWMsgBox "OnSendNotificationToUsers" & vbcrlf &_
"User Name:" & userName & vbcrlf &_
"Workflow Process Result:" & workflowProcessResult & vbcrlf &_
"Document Unique Ids:" & documentUniqueIds
end sub
.VBSCRIPT
sub main
DBWInit(TRUE)
userName = DBWInput("@USER_NAME")
workflowProcessResult = DBWInput("@WORKFLOW_PROCESS_RESULT")
documentUniqueIds = DBWInput("@DOCUMENT_UNIQUE_IDS")
if workflowProcessResult = 0 then exit sub
tokens = Split(documentUniqueIds," " )
for i = 0 to Ubound(tokens)
myT = DBWQueryByUID(tokens(i), "T")
myState = DBWQueryByUID(tokens(i), "STATE")
if (myT = "P" or myT = "A") and myState = "CHECKED_IN" then
DBWShell "IncrementRevisionState " & tokens(i)
end if
next
end sub