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

7. APIs, SDKs, and Services

7. APIs, SDKs, and Services

Accessing List of Tasks Using SOAP UI

Accessing List of Tasks Using SOAP UI

To quickly see the WSHT API in action, you can use SOAP-UI or similar tool (such as the Eclipse's Web Services Explorer tool).
To use SOAP-UI, create a new WSDL Project in SOAP-UI using the endpoint address of the WSHT API service for the initial WSDL:
http://localhost:8080/active-bpel/services/AeB4PTaskClient-taskOperations
. Save the project after SOAP-UI has created the sample requests.
From SOAP-UI's Project Explorer, locate the project for the WSHT API and expand the
getMyTasks
operation and double click on the request to reveal its sample request.
Enter the username and password (for example,
loanrep1/loanrep1
) for this request using the Request Properties window shown in the bottom left of SOAP-UI application:
Send the following SOAP request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.example.org/WS-HT/api/xsd"> <soapenv:Header/> <soapenv:Body> <htdt:getMyTasks xmlns:htdt="http://www.example.org/WS-HT/api/xsd"> <htdt:taskType>TASKS</htdt:taskType> <htdt:genericHumanRole>POTENTIAL_OWNERS</htdt:genericHumanRole> <htdt:status>READY</htdt:status> <htdt:maxTasks>5</htdt:maxTasks> </htdt:getMyTasks> </soapenv:Body> </soapenv:Envelope>
This request fetches all unclaimed (status = READY) tasks that the current user can access. The response should contain one or more
<htdt:taskAbstract>
elements representing each task.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <htdt:getMyTasksResponse xmlns:htdt="http://www.example.org/WS-HT/api/xsd" xmlns:htda="http://www.example.org/WS-HT/api"> <htdt:taskAbstract> <htda:id>urn:b4p:5</htda:id> <htda:taskType>TASK</htda:taskType> <htda:name>ApproveLoan</htda:name> <htda:status>READY</htda:status> <htda:priority>2</htda:priority> <htda:taskInitiator>anonymous</htda:taskInitiator> <htda:potentialOwners> <htd:users xmlns:htd="http://www.example.org/WS-HT"> <htd:user>loanrep1</htd:user> <htd:user>loanrep2</htd:user> </htd:users> </htda:potentialOwners> <htda:businessAdministrators> <htd:groups xmlns:htd="http://www.example.org/WS-HT"> <htd:group>loanmgr1</htd:group> </htd:groups> </htda:businessAdministrators> <htda:createdOn>2009-04-23T19:12:21.615Z</htda:createdOn> <htda:createdBy>anonymous</htda:createdBy> <htda:activationTime>2009-04-23T19:12:21.615Z</htda:activationTime> <htda:isSkipable>true</htda:isSkipable> <htda:hasPotentialOwner>true</htda:hasPotentialOwners> <htda:startByExists>false</htda:startByExists> <htda:completeByExists>false</htda:completeByExists> <htda:presentationName>Loan Approval Demo</htda:presentationName> <htda:presentationSubject>Loan request for US$ 15000 from John Smith [taskid: urn:b4p:5]</htda:presentationSubject> <htda:renderingMethodExists>false</htda:renderingMethodExists> <htda:hasOutput>false</htda:hasOutput> <htda:hasFault>false</htda:hasFault> <htda:hasAttachments>false</htda:hasAttachments> <htda:hasComments>false</htda:hasComments> <htda:escalated>false</htda:escalated> <htda:primarySearchBy>123-45-6789</htda:primarySearchBy> </htdt:taskAbstract> </htdt:getMyTasksResponse> </soapenv:Body> </soapenv:Envelope>
You will need the
resultset
value for other task operations as it has the task ID, which is within the
<htda:id>task identifier</htda:id>
element. For example, to claim this task, the SOAP message is:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.example.org/WS-HT/api/xsd"> <soapenv:Header/> <soapenv:Body> <htdt:claim xmlns:htdt="http://www.example.org/WS-HT/api/xsd"> <htdt:identifier>urn:b4p:62</htdt:identifier> </htdt:claim> </soapenv:Body> </soapenv:Envelope>
Refer to the WSHT API WSDL, schemas, and documentation for information on other operations.