When the "procstart" action is taken by the wftk, a "Requester" role is assigned automatically to the user performing the procstart action. This usage of roles will probably be expanded in the future, so that there will be some number of system-standard roles (maybe "admin", for instance).
A role may be de-assigned either by assigning it a new user, or by passing it a blank string to denote that no user will own it.
int wftk_role_list (void * session, XML * datasheet, XML * list); const char * wftk_role_user (void * session, XML * datasheet, const char * role); int wftk_role_assign (void * session, XML * datasheet, const char * role, const char * userid);
int
Lists the roles defined for a given process. Note that roles have meaning only within a process, so all the functions in the role API take a datasheet explicitly.void * session,
XML * datasheet,
XML * list
const char *
Names the user (if any) assigned to the named role. Creates the role if it wasn't there before.void * session,
XML * datasheet,
const char * role
int
Assigns the named user to the named role. Creates the role if it wasn't already there; creates a user involvement entry if it wasn't already there. No authentication or verification of the username is performed; you're presumed already to have done that.void * session,
XML * datasheet,
const char * role
,
const char * user