- Deferred activity,
- How to make an activity a deferred activity and
- What are the signifiance of Minimum Threshold and Maximum Threshold parameter for workflow background process.
There are two ways to mark an activity as deferred activity.
- Assign a cost higher than a designated threshold to a background process. The engine then continues processing the next pending eligible activity that may occur in another parallel branch of the process.The default threshold for the Workflow Engine is 50 hundredths of a second. Activities with a cost higher than this are deferred to background engines.
where as Method#2 is to define an explicit defer activity.eg. Defer-Fulfillment or Invoice Interface - Deferred activities in Oracle Order Management Flow.
Please Note that out of 5 parameters that are assocaited with the workflow background process, 2 are Minimum Threshold and Maximum Threshold.
By using Minimum Threshold and Maximum Threshold we can create multiple background engines to handle very specific types of activities. For example, if we only want to process activities with a certain cost, we can set both the Minimum Threshold and the Maximum Threshold to that value. The default values for these arguments are 0 and 100 so that the background engine runs activities regardless of cost.
NOTE - These Threshold parameters are only to process the Defer activities that have been mark as defere because of cost > 50
Let me explain with example - let's say we have 3 processes
- First with default Cost (0) ,
- Second with cost 70 and
- Third with cost 80.
- 4th with cost 75
We can process 2nd/3rd/4th together by means of scheduling the workflow background process with Min Threshold parameter = 70 and Max threshold parameter = 80 or we can schedule 2 different process with
WBP#1 Min Threshold parameter = 70 and Max threshold parameter = 70
WBP#2 Min Threshold parameter = 70 and Max threshold parameter = 80
WBP#1 will pick activity with Cost 70 and WBP#2 will pick the activity with cosr = 80 amd 4th process will not be process at all.
Please Note that WBP#1/WBP#2 will not process any of the Defer activity where cost <>70/80 OR activity Defered because of the API WF_STANDARD.DEFER.
Hope that is helpful.