Table of Contents

Search

  1. Preface
  2. Overview, Downloading, and Installing
  3. Administration API
  4. Identity Service API
  5. Screenflow Programming and SDK
  6. ActiveVOS WSHT API
  7. Embedding Request Forms in Standalone Web Pages
  8. XML-JSON for Process Central

APIs, SDKs, and Services

APIs, SDKs, and Services

Claiming a Task Using WSHT4J API

Claiming a Task Using WSHT4J API

The following sample snippet shows how to claim task using the wsht4j API. Look at the
com.activevos.examples.wsht.BasicOperations
class for the complete example showing how to claim, start, set the output, and complete a task .
// Service port TaskOperations wshtServicePort = null; // // Code to create wshtServicePort similar to previous example // // Id of task we want to claim String taskId = "urn:b4p:5"; try { // claim wshtServicePort.claim(taskId); } catch(IllegalArgumentFault illegalArgumentFault) { //Fault due to invalid task id. System.out.println("IllegalArgumentFault: " + illegalArgumentFault.getFaultInfo()); } catch(IllegalStateFault illegalStateFault) { // Illegal state. For example, tried to claim a task that was not in a // a READY state (unclaimed). IllegalState illegalState = illegalStateFault.getFaultInfo(); // Sample: // illegalState.getStatus(): 'RESERVED' (already claimed) // illegalState.getMessage(): 'Task must be in the READY state to be claimed.' System.out.println("IllegalStateFault: " + "\n taskStatus=" + illegalState.getStatus() + "\n " + illegalState.getMessage()); }

0 COMMENTS

We’d like to hear from you!