next up previous contents
Next: Workflow description Up: Client API Previous: Client API   Contents


Structure of client program

The structure of a client program is very close to the structure of usual DIET client. The general algorithm is as follow:

diet_initialize

create the workflow profile

call the method diet_wf_call

if success retrieve the results

free the workflow profile

diet_finalize

The table 14.1 shows a description of the different methods provided by the DIET workflow API.


Table 14.1: Diet workflow API
Workflow function Description
diet_wf_desc_t*
diet_wf_profile_alloc(const char* wf_file_name);
allocate a workflow profile to be used for a workflow submission.
wf_file_name : the file name containing the workflow XML description.
void
diet_wf_profile_free(diet_wf_desc_t * profile);
free the workflow profile.
diet_error_t
diet_wf_call(diet_wf_desc_t* wf_profile);
execute the workflow associated to profile wf_profile.
int
diet_wf_scalar_get(const char * id, void** value);
Retrieve a workflow scalar result.
id : the output port identifier.
int
diet_wf_string_get(const char * id, char** value);
Retrieve a workflow string result.
id : the output port identifier.
int
diet_wf_file_get(const char * id, size_t* size, char** path);
Retrieve a workflow file result.
id : the output port identifier.
int
diet_wf_matrix_get(id, (void**)value, nb_rows, nb_cols, order)
Retrieve a workflow matrix result.
id : the output port identifier.
void
void get_all_results();
print all the results of the current executed workflow.
 



next up previous contents
Next: Workflow description Up: Client API Previous: Client API   Contents
DIET Team - 2008-07-17