Databases Reference
In-Depth Information
The first value we need to specify is the Task Title . This is optional, since if we
don't specify a value, it will use the task title we specified earlier as part of the task
definition. We want to make the task title a bit friendlier, so first type in (without
the quotes):
Leave Request for
Then click on the calculator icon to the right of the Task Title field. This will launch
the now familiar Expression Builder . Here, from the inputVariable , just select
the element:
ns1:LeaveRequest/ns1:fullName
This expression will be appended to the end of our title text embedded between
<%%> to give the following:
LeaveRequestfor<%bpws:getVariableData('inputVariable','payload',
'/ns1:LeaveRequest/ns1:fullName')%>
At runtime, the BPEL process will evaluate the expression between <%%> and
substitute the result. For now, we won't specify a task initiator as this is optional,
and we will leave the Priority set to 3 .
The final thing to specify is the value of each of the Task Parameters defined to the
task. Click on the browse icon ( ) for the LeaveRequest parameter, and this will
bring up the Task Parameters window, which allows you to browse the variables
defined to the BPEL process. Select the LeaveRequest element passed in as part of
the inputVariable for the BPEL process.
This completes the configuration of the task, so click OK . This will return us to the
BPEL process, which will now contain our human task activity, followed by an
additional switch. If you expand the switch, you will see it contains a Case for each
of our task outcomes ( APPROVE or REJECT ), where we can specify the appropriate
next step in our process. For the purpose of this example, we don't need to do
anything. However, in a real system we might update the HR system with details
of the leave, if it was approved.
Your composite is now complete, so deploy it to the server in the normal way.
Creating the user interface to process the task
So far, we have defined the task that needs to be carried out and plugged it into a
simple BPEL process. What we need to do next is implement the part of the user
interface that allows someone to view the details of our specific task and then either
approve or reject the leave request.
 
Search WWH ::




Custom Search