Show/Hide Toolbars

Therefore Web API Programming Interface 1.0

Besides searching for document operations, you can find all running and/or finished instances of a specified process. The guide and code sample below illustrates a typical workflow query. The reference page of the ExecuteWorkflowQueryForProcess operation contains more details on parameters and usage.

 

If you want to get all instances of all workflow processes, use the ExecuteWorkflowQueryForAll operation.

 

 

 

 // 1. Create a channel factory to the web service endpoint

 ...

 ChannelFactory<IThereforeServicechannelFactory = new ChannelFactory<IThereforeService>(bindingendpoint);

 

 // 2. Create a channel to the web service endpoint

 IThereforeService service = channelFactory.CreateChannel();

 

 // 3. Create request parameters

 ExecuteWorkflowQueryForProcessParams parameters = new ExecuteWorkflowQueryForProcessParams();

 parameters.ProcessNo = 1;

 parameters.WorkflowFlags = Therefore.WebAPI.Service.Contract.v0001.Enums.WSWorkflowFlags.AllInstances;

 

 // 4. Execute the query on the server

 ExecuteWorkflowQueryForProcessResponse response = service.ExecuteWorkflowQueryForProcess(parameters);

 

 // 5. Display the results in a message box

 MessageBox.Show("Number of rows returned: " + response.WorkflowQueryResult.ResultRows.Count);

 

 

 

© 2024 Therefore Corporation, all rights reserved.