|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Library Reference > Workflow > DBWorkflowGetUserList |
Returns in the array userList the list of the users allowed to take decisions on the assigned stateID.
Sub DBWorkflowGetUserList(StateID, byref UserList)
StateID |
the ID of the WorkFlow state |
The list is composed by records composed as
userID |
fullName |
phoneNumber |
eMailAddress |
read directly from the DBWORKS_USER table.
UserList |
it is the array containing userID, FullName, PhoneNumber and eMailAddress of the user |
Sub Main()
DBWInit(TRUE)
ReDim Preserve stateList(1)
DBWorkflowGetStateList "MODELS",stateList
for i=0 to ubound(stateList)-1
ReDim Preserve userList(1)
DBWorkflowGetUserList stateList(i),userList
for j=0 to ubound(userList)-1 step 4
MsgBox _
"state=" & stateList(i) & vbcrlf &_
" userId=" & userList(j) & vbcrlf &_
" fullName=" & userList(j+1) & vbcrlf &_
" phone=" & userList(j+2) & vbcrlf &_
" email=" & userList(j+3)
next
next
End Sub