Thursday, January 24, 2013

Human worklist API TaskQueryService-querying tasks and updating outcome from J2ee application


Querying the task list


Method:  queryTasks


Input
   <soapenv:Header/>
   <soapenv:Body>
      <tas:taskListRequest>
         <com:workflowContext>
<com:credential>
               <com:login>georgethomas@geo.com</com:login>
               <com:password>welcome1</com:password>
               <com:identityContext>myrealm</com:identityContext>
            </com:credential>
           </com:workflowContext>
         <tas1:taskPredicateQuery startRow="0" endRow="0">
            <tas1:displayColumnList>
                   <tas1:displayColumn>title</tas1:displayColumn>
                   <tas1:displayColumn>state</tas1:displayColumn>
                  <tas1:displayColumn>createdDate</tas1:displayColumn>
                  <tas1:displayColumn>expirationdate</tas1:displayColumn>
                  <tas1:displayColumn>priority</tas1:displayColumn>
                  <tas1:displayColumn>taskNumber</tas1:displayColumn>
                  <tas1:displayColumn>instanceid</tas1:displayColumn>
              </tas1:displayColumnList>
          <tas1:predicate>             
            <tas1:assignmentFilter>My</tas1:assignmentFilter> 
              <tas1:clause joinOperator="AND" xmlns="http://xmlns.oracle.com/bpel/workflow/taskQuery">
                <tas1:column>state</tas1:column>
                <tas1:operator>eq</tas1:operator>
                <tas1:value>ASSIGNED</tas1:value>
                      </tas1:clause>
          </tas1:predicate>
         </tas1:taskPredicateQuery>
      </tas:taskListRequest>
   </soapenv:Body>
</soapenv:Envelope>




Output
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
   <env:Header/>
   <env:Body>
      <taskListResponse xmlns="http://xmlns.oracle.com/bpel/workflow/taskQueryService">
         <task xmlns="http://xmlns.oracle.com/bpel/workflow/task">
            <title>Approve Project Tasks :Project Name - SOA Suite Full Migration TaskName data</title>
            <priority>3</priority>
            <processInfo/>
            <systemAttributes>
               <assignedDate>2013-01-29T03:54:59-05:00</assignedDate>
               <assigneeUsers>
                  <id>georgethomas@geo.com</id>
                  <type>user</type>
               </assigneeUsers>
               <createdDate>2013-01-29T03:54:59-05:00</createdDate>
               <digitalSignatureRequired>false</digitalSignatureRequired>
               <expirationDate>2013-01-29T03:59:59-05:00</expirationDate>
               <fromUser>
                  <type>user</type>
               </fromUser>
               <numberOfTimesModified>1</numberOfTimesModified>
               <state>ASSIGNED</state>
               <systemActions>
                  <action>VIEW_TASK</action>
                  <displayName>VIEW_TASK</displayName>
               </systemActions>
               <taskId>eb792a23-7b1a-4c95-bda6-897fe8e88c5f</taskId>
               <taskNumber>200070</taskNumber>
               <updatedBy>
                  <id>workflowsystem</id>
                  <type>user</type>
               </updatedBy>
               <updatedDate>2013-01-29T03:54:59-05:00</updatedDate>
               <version>1</version>
               <taskDefinitionId>dev/TaskExecutionApprovalProcess!1.0/PMTaskApproval</taskDefinitionId>
               <workflowPattern>Participant</workflowPattern>
               <participantName>Project Manager Approval</participantName>
               <assignees>
                  <id>georgethomas@geo.com</id>
                  <type>user</type>
               </assignees>
               <isPartialTask>true</isPartialTask>
            </systemAttributes>
            <systemMessageAttributes/>
            <callback/>
            <sca/>
            <taskDefinitionId>dev/TaskExecutionApprovalProcess!1.0/PMTaskApproval</taskDefinitionId>
            <mdsLabel>soa_c0dc1fb9-f1b7-4e5c-80d2-6520f9eb96d8</mdsLabel>
            <customAttributes/>
         </task>
     
</taskListResponse>
   </env:Body>
</env:Envelope>


Updating the outcome of a task(without modifying payload)

Method:  updateTaskOutcome
Notes:  The tags which need to be modified for each invoke are shown.
The credentials will have to be the assignee of the task


Input
   <soapenv:Header/>
   <soapenv:Body>
      <tas:updateTaskOutcome>
         <com:workflowContext>
            <com:credential>
               <com:login>georgethomas@geo.com</com:login>
               <com:password>welcome1</com:password>
               <com:identityContext>myrealm</com:identityContext>

            </com:credential>

         </com:workflowContext>
         <tas:taskId>cffb7b12-c5ba-4e6b-85fb-961ee0504f4f</tas:taskId>
         <tas:outcome>APPROVE</tas:outcome>
      </tas:updateTaskOutcome>
   </soapenv:Body>
</soapenv:Envelope>

No comments: