Databases Reference
In-Depth Information
Using flex fields in the query predicate
Specifying the query predicate for the buyer isn't quite so simple, as we want to list
all tasks related to items bought by the specified buyer. So we will need to include
those items which have tasks currently assigned to various sellers.
Unlike the seller's query, we can't use the Creator value as our assignment filter,
and we can't use My either as this only returns tasks currently assigned to us. So the
only option we have is to use All as our assignment filter. However, this will return
all tasks currently in the system, so we need to find a way of restricting the list to just
those tasks required by the buyer.
As you may recall, we have already defined the flex field textAttribute1 to hold
the buyerId , so we just need to add an extra clause to our predicate to test for this
condition. This will give us a predicate , which looks as follows:
<predicatexmlns="http://xmlns.oracle.com/bpel/workflow/taskQuery">
<assignmentFilter> All </assignmentFilter>
<predicate>
<clause>
<columntableName=" WFTask ">
<columnName> TaskDefinitionName </columnName>
</column>
<operator> EQ </operator>
<value> OrderFulfillmentTask </value>
</clause>
<clausejoinOperator=" AND ">
<columntableName=" WFTask ">
<columnName> TextAttribute1 </columnName>
</column>
<operator> EQ </operator>
<value> $buyerId </value>
</clause>
</predicate>
</predicate>
Here, $buyerId needs to be substituted with the actual userId of the buyer.
 
Search WWH ::




Custom Search