Programmer's Guide to the wftk: getting and setting status

[ wftk documentation home ] [ wftk programmer's guide home ]


The status (or state) of a process, you would think, is a simple thing. It's not. The status of a process is a string, which may be "active", "complete", or any other arbitrary value. The "complete" value has special meaning, of course, and when status is set to complete, a task index has the option of deleting the process entry, a datasheet repository may archive the datasheet, and so forth. But just as importantly, different implicit tasks may be exposed depending on the status of the process. The most important of the implicit tasks is "!start", which allows a newly defined process to start its defined workflow up. (The reason workflow isn't started immediately upon definition, of course, is that initial data may be required, and the list of required data is available only after the process is defined.)

At any rate, even though the status of the process is stored in the datasheet XML, you need to use these functions to get or set that value, just in case the wftk needs to do something along the way.


const char * wftk_status_get (void * session, XML * datasheet);
int    wftk_status_set (void * session, XML * datasheet, const char *status);


wftk_status_get returns const char *
void * session,
XML * datasheet
Returns a pointer to the current status of the process. This is a string. Special values include "start" and "complete".

wftk_status_set returns int
void * session,
XML * datasheet,
const char * status
Sets the status of a process. Specially meaningful values are acted upon by the wftk (like 'complete').

Copyright (c) 2001 Vivtek. Please see the licensing terms for more information.