Databases Reference
In-Depth Information
At first glance, this looks like the standard Create Copy Operation window that we
use when carrying out assigns within BPEL (which in reality is exactly what it is).
The key difference is that we are using this to assign values to the input facts to be
submitted to the rules engines, so the Type on the To side of the copy operation is a
Business Rule Facts .
The reverse is true for an output fact, where we use this dialog to map the output
from the decision service back into a corresponding BPEL variable.
For our purpose, we just want to map the initial LeaveRequest in the process
inputVariable into the corresponding fact, as shown in the preceding screenshot.
Then we will map the output fact, which will contain our updated LeaveRequest
back into our inputVariable .
When JDeveloper opens the Decision Fact Map window, the Variables
folder for the Business Rules Facts (circled in the preceding screenshot) is
closed and it appears that there are no input facts. You must double-click
on this to open it and expose the facts.
We have now wired the rule invocation into our BPEL process, before finally running
our process; we need to modify our process to only invoke the workflow if the leave
request hasn't been automatically approved.
To do this, just drag a switch onto your process, and then drag your workflow task
into the first branch in the switch and define a test to check that the LeaveRequest
hasn't been approved. You are now ready to deploy and run your modified process.
Using functions
Our current rule only approves vacations of one day in duration, requiring all other
leave requests to be manually approved. Ideally, we would like to approve holidays
of varying duration as long as sufficient notice has been given, for example:
Approve vacations of one day in duration with a start date that's two weeks
or more in the future
Approve if for 2-3 days and more than 30 days in the future
Approve if 5 days or less and more than 60 days in the future
Approve if 10 days or less and more than 120 days in the future
 
Search WWH ::




Custom Search