Show/Hide Toolbars

Therefore Web API Programming Interface 1.0

The ExecuteWorkflowQueryForAll operation can be used to find all running and/or finished instances of all workflow processes. The guide and code sample below teach you how to do that. The reference page of the ExecuteWorkflowQueryForAll method contains more details on parameters and usage.

 

If you want to get all instances of one workflow process, the ExecuteWorkflowQueryForProcess operation can be used.

 

 

 

 // 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 requested parameters

 ExecuteWorkflowQueryForAllParams parameters = new ExecuteWorkflowQueryForAllParams();

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

 

 // 4. Execute the query on the server

 ExecuteWorkflowQueryForAllResponse response = service.ExecuteWorkflowQueryForAll(parameters);

 

 // Optional 5. Display the results in the message box

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

 

 

 

© 2024 Therefore Corporation, all rights reserved.