DBWorkflowGetUserList

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Library Reference > Workflow >

DBWorkflowGetUserList

Description

Returns in the array userList the list of the users allowed to take decisions on the assigned stateID.

Syntax

Sub DBWorkflowGetUserList(StateID, byref UserList)

Parameters

StateID

the ID of the WorkFlow state

Remarks

The list is composed by records composed as

userID

fullName

phoneNumber

eMailAddress

 

read directly from the DBWORKS_USER table.

Return Values

UserList

it is the array containing userID, FullName, PhoneNumber and eMailAddress of the user

See also

DBWorkflowGetStateList

Example

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