





















































In this article, Vivek Acharya, the author of the book, Oracle BPM Suite 12c Modeling Patterns, has discussed the various patterns in Oracle. The spectrum of this book covers patterns and scenarios from strategic alignment (the goals and strategy model) to flow patterns. From conversation, collaboration, and correlation patterns to exception handling and management patterns; from human task patterns and business-IT collaboration to adaptive case management; and many more advance patterns and features have been covered in this book. This is an easy-to-follow yet comprehensive guide to demystify the strategies and best practices for developing BPM solutions on the Oracle BPM 12c platform. All patterns are complemented with code examples to help you better discover how patterns work. Real-life scenarios and examples touch upon many facets of BPM, where solutions are a comprehensive guide to various BPM modeling and implementation challenges.
(For more resources related to this topic, see here.)
In this section, we will cover dynamic task assignment patterns in detail, while a glimpse of the strategic alignment pattern is offered.
Business processes need human interactions for approvals, exception management, and interaction with a running process, group collaboration, document reviews or case management, and so on. There are various requirements for enabling human interaction with a running BPMN process, which are accomplished using human tasks in Oracle BPM.
Human tasks are implemented by human workflow services that are responsible for the routing of tasks, assignment of tasks to users, and so on. When a token arrives at the user task, control is passed from the BPMN process to Oracle Human Workflow, and the token remains with human tasks until it's completed. As callbacks are defined implicitly, once the workflow is complete, control is returned back to the user task and the token moves ahead to subsequent flow activities.
When analyzing all the human task patterns, it's evident that it comprises various features, such as assignment patterns, routing patterns, participant list builder patterns, and so on. Oracle BPM offers these patterns as a template for developers, which can be extended. The participants are logically grouped using stages that define the assignment with a routing slip. The assignment can be grouped based on assignment modeling patterns. It could be sequential, parallel, or hybrid.
Routing of the tasks to participants is governed by the routing pattern, which is a behavioral pattern. It defines whether one participant needs to act on a task, many participants need to act in sequence, all the participants need to act in parallel, or participants need not act at all. The participants of the task are built using participant list building patterns, such as approval groups, management chains, and so on. The assignment of the participant is performed by a task assignment mechanism, such as static, dynamic, or rule-based assignment. In this section, we will be talking about the task assignment pattern.
The intent of the task assignment pattern is the assignment of human tasks to user(s), group(s), and/or role(s). Essentially, it's being motivated with the fact that you need to assign participants to tasks either statically, dynamically, or on derivations based on business rules. We can model and define task assignment at runtime and at design time. However, the dynamic task assignment pattern deals with the assignment of tasks at runtime.
This means the derivation of task participants will be performed at runtime when the process is executing. This pattern is very valuable in business scenarios where task assignment cannot be defined at design time.
There are various business requirements that need task assignments based on the input data of the process. As task assignment will be based on the input data of the process, task assignments will be evaluated at runtime; hence, these are termed as dynamic task assignments.
The following pattern table gives the details of the dynamic task assignment pattern:
Signature |
Dynamic Task Assignment Pattern |
Classification |
Human Task Pattern |
Intent |
To dynamically assign tasks to the user/group/roles. |
Motivation |
Evaluating task assignment at runtime. |
Applicability |
Dynamic task assignment is applicable where the distribution of work is required. It's required when you need multilevel task assignment or for the evaluation of users/roles/groups at runtime. |
Implementation |
Dynamic task assignment can be implemented using complex process models, business rules, organization units, organizational roles (parametric roles), external routing, and so on. |
Known issues |
What if the users that are derived based on the evaluation of dynamic conditions have their own specific preferences? |
Known solution |
Oracle BPM offers rules that can be defined in the BPM workspace. |
We will walk though an insurance claim process that has two tasks to be performed: the first task is verification, and the other is the validation of claimant information. The insurance claim needs to be verified by claim agents. Agents are assigned verification tasks based on the location and the business organization unit they belong to. An agent's skills in handling claim cases are also considered based on the case's sensitivity. If the case's sensitivity requires an expert agent, then an expert agent assigned to that organization unit and belonging to that specific location must be assigned.
Think of this from the perspective of having the same task being assigned to different users/groups/roles based on different criteria. For example, if the input payload has Regular as the sensitivity and EastCoast as the organization unit, then the verification task needs to be assigned to an EastCoast-Regular agent. However, if the input payload has EastCoast-Expert as the sensitivity and EastCoast as the organization unit, then the verification task needs to be assigned to an EastCoast-Expert agent. Then, we might end up with multiple swimlanes to fulfill such a task assignment model. However, such models are cumbersome and complicated, and the same activities will be duplicated, as you can see in the following screenshot:
The routing of tasks can be modeled in human tasks as well as in the BPMN process. It depends purely on the business requirements and on various modeling considerations. For instance, if you are looking for greater business visibility and if there is a requirement to use exceptional handling or something similar, then it's good to model tasks in the BPMN process itself. However, if you are looking for dynamism, abstraction, dynamic assignment, dynamic routing, rule-driven routing, and so on, then modeling task routing in human task assignment and routing is an enhanced modeling mechanism. We need an easy-to-model and dynamic technique for task assignment. There are various ways to achieve dynamic task assignment:
We can use business rules to define the condition(s), and then we can invoke various seeded List Builder functions to build the list of participants. This is one way of enabling dynamic task assignment using business rules. Within an organization, departments and divisions are represented by organizational units. You can define the hierarchy of the organization units, which corresponds to your organizational structure. User(s), group(s), role(s), and organizational roles can be assigned as members to organization units. When a task belonging to a process is associated with an organization unit, then the task is available for the members of that organization unit.
So, using the scenario we discussed previously, we can define organization units and assign members to them. We can then associate the process with the organization unit, which will result in task assignment to only those members who belong to the organization that is associated with the process.
Users have various properties (attributes) defined in LDAP or in the Oracle Internet Directory (OID); however, there are cases where we need to define additional properties for the users. Most common among them is the definition of roles and organization units as properties of the user. There are cases where we don't have the flexibility to extend an enterprise LDAP/OID for adding these properties. What could be the solution in this case?
Extended user properties are the solution in such scenarios. Using an admin user, we can define extended properties for the users in the BPM workspace. Once the extended properties are defined, they can be associated with the users. Let's extend the scenario we were talking about previously. Perform the following tasks:
The features of the use case are as follows:
In the course of achieving the use case scenario, we will execute the following tasks to define a group, organization units, extended properties, and parametric roles:
We have defined and assigned some new users and some of the already existing users to the ClaimAgents group. Now, we will define the organization units and assign users as members to the organization units. Perform the following steps:
The users are now assigned as members to organization units. Now, it's time to define the extended properties. Perform the following steps:
Property Name |
Value |
Sensitivity |
Expert, regular |
Location |
FL, CA, and TX |
User Name |
Sensitivity |
Location |
mmitch |
Regular |
FL |
fkafka |
Regular |
FL |
jverne |
Regular |
FL |
jausten |
Expert |
FL |
achrist |
Expert |
FL |
anju |
Expert |
FL |
rivi |
Expert |
CA |
buny |
Expert |
CA |
cdickens |
Regular |
CA |
wshake |
Regular |
CA |
rsteven |
Regular |
CA |
jstein |
Expert |
CA |
We will define the organizational role (the parametric role) and use it for task assignment in the case/BPM process. The organizational role (parametric role) as task assignment pattern is used for dynamic task assignment because users/roles are assigned to the parametric role based on the evaluation of the condition at runtime. These conditions are evaluated at runtime for the determination of users/roles based on organization units and extended properties. Perform the following steps:
Click on Save to apply the changes.
As we can see in the preceding screenshot, the organization unit is also available as a property that can be included in the condition.
We have configured the parametric role with a specific condition. The admin can log in and change the conditions as and when the business requires (changes at runtime, which bring in agility and dynamism).
We can create a BPM process which has a user task that builds a participant's list using the parametric role, as follows:
The schema (XSD) can be found in the DynamicTaskAssignment project in this article. You can navigate to the schemas folder in the project to get the XSD.
The validation task is implemented to demonstrate dynamic task assignment using multilevel organization units. We will check the working of this task when we perform the test. Perform the following steps:
Now, we will create a second task in the same process, which will be used to demonstrate dynamic task assignment using the organization role (the parametric role). Perform the following steps:
Enter the name of the organizational role as AgentRole, which is the organizational role we have defined previously:
This article contains downloads for DynamicTaskAssignment, which we have already created to facilitate verification. If you have not created the project by following the steps mentioned previously, you can use the project delivered in the download.
Log in to the EM console as an admin user to test the project; however, you can use any tool of your choice to test it. We can get the test data from the project itself. Navigate to DynamicTaskAssignment | SOA | Testsuites | TestData12c.xml to find the test data file.
Use the TestData.xml file if you are going to execute the project in the 11g environment. The test data contains values where the sensitivity is set to Expert, organization unit is set to Finance/EastCoastFinOrg, and state is set to CA. The following are the test results of the validation task:
Org Unit Input Value |
Validation Task Assignment |
Finance/EastCoastFinOrg |
mmitch, fkafka, jverne, jausten, achrist, anju, and jstein |
Finance |
jausten, jverne, mmitch, fkafka, achrist, cdickens, wshake, rsteven, rivi, buny, jstein, and anju |
Note that if you pass the organization unit as Finance, then all the users belonging to the finance organization's child organization will receive the task. However, if you pass the organization unit as Finance/EastCoastFinOrg (EastCoastFinOrg is a child organization in the finance parent organization), then only those users who are in the EastCoastFinOrg child organization will receive the task.
The process flow will move from the validation task to the verification task only when 50 percent of the participants act on the validation task, as parallel routing pattern is defined with the voting pattern of 50 percent.
The following are the test results for Verification Task:
Input |
Verification Task |
Sensitivity: Expert |
buny, rivi, and jstein |
Location: CA |
N/A |
Based on the extended properties mapping, the verification task will get assigned to the users buny, rivi, and jstein.
What if the users are derived based on the evaluation of dynamic conditions? To address this, Oracle BPM offers rules that can be defined in the BPM workspace. We will extend the use case we have defined. When we execute the verification process, the verification task is assigned to the buny, rivi, and jstein users. How will you address a situation where the user, buny, wants the task to be reassigned or delegated to someone when he is in training and cannot act on the assigned tasks? Perform the following steps:
The rule action constitutes of task reassignment or delegation, or we can specify a rule that takes no action. The rule action is to change task assignment or to allow someone else to perform on behalf of the original assignee, as described in the following points:
Execute the DynamicTaskAssignment project to run the verification process. When the verification task gets executed, log in to the EM console and check the process trace. As we can see in the following screenshot, the task gets reassigned to the jcooper user. We can log in to the BPM workspace as the jcooper user and can also verify the task in the task list. This is shown in the following screenshot:
The dynamic task assigned pattern brings in dynamism and agility to the business process. In the preceding use case, we have passed organization unit as the process input parameter. However, with Oracle BPM 12c, we can define business parameters and use them to achieve greater flexibility. The business parameters allow business owners to change the business parameter's value at runtime without changing the process, which essentially allows you to change the process without the inclusion of IT. Basically, business parameters are already used in the process and they are driving the process flow. Changing the value of business parameters at runtime is like changing the process flow at execution.
For the preceding use case, the insurance input schema (parameter) has an organization unit that is passed when invoking the process. However, what if there are no placeholders to pass the organization unit in the input parameter? We can define a business parameter in JDeveloper and assign the value to the organization unit. This is shown in the following screenshot:
Using the shown mechanism, a developer can enable business parameters; technically, the BPMN engine executes the following function to get the business parameter value:
bpmn:getBusinessParameter('Business Parameter')
Similarly, a process analyst can click on the BPM composer application and bring about changes in the process to define business parameters and changes in the process. Process asset manager (PAM) will take care of asset sharing and collaboration.
Business owners can log in to the BPM workspace application and change the business parameters by navigating to the following path to edit the parameter values to drive/modify the process flow:
Administration | Organization | Business Parameter
BPMN needs a solution to align business goals, objectives, and strategies. It also needs a solution to allow business analysts and function/knowledge workers to create business architecture models that drive the IT development of a process, which remains aligned with the goals and objectives. Oracle BPM 12c offers business architecture, a methodology to perform high-level analysis of business processes. This methodology adopts a top-down approach for discovering organizational processes, defining goals and objectives, defining strategies and mapping them to goals and objectives, and reporting the BA components. All these details are elaborated exclusively with use cases and demo projects in the book. The following pattern table highlights facts around the strategic alignment pattern:
Signature |
Strategic Alignment Pattern |
Classification |
Analysis and Discovery Pattern |
Intent |
To offer a broader business model (an organizational blueprint) that ensures the alignment of goals, objectives, and strategies with organizational initiatives. |
Motivation |
A BPMN solution should offer business analysts and functional users with a set of features to analyze, refine, define, optimize, and report business processes in the enterprise. |
Applicability |
Such a solution will only empower businesses to define models based on what they actually need, and reporting will help to evaluate the performances. This will then drive the IT development of the processes by translating requirements into BPMN processes and cases. |
Implementation |
Using BPM composer, we can define goals, objectives, strategies, and value chain models. We can refer to BPMN processes from the value chain models. Goals are broken down into objects, which are fulfilled by strategies. Strategies are implemented by value chains, which can be decomposed into value chains/business processes. |
Known issues |
The sharing of assets between IT developers, business architects, and process analysts. |
Known solution |
Oracle BPM 12c offers PAM, which is a comprehensive solution, and offers seamless asset sharing and collaboration between business and IT. This book covers PAM exclusively. |
In this article, we have just introduced the alignment pattern. However, in the book, alignment pattern is covered in detail. It shows how IT development and process models can be aligned with organization goals. While performing alignments, we will learn enterprise maps, strategy models, and value chain models. We will discover how models are created and linked to an organization. Capturing the business context showcases the importance of documentation in the process model phase. Different document levels and their methods of definition are discussed along with their usage. Further, we learned how to create different reports based on the information we have documented in the process, such as RACI reports and so on. The process player demonstration showcased how process behavior can be emulated in a visual representation, which allows designers and analysts to test and revise a process without deploying it. This infuses a preventive approach and also enables organizations to quickly find the loopholes, making them more responsive to challenges. We also elaborated on how round trips and business-IT collaboration facilitates the storing, sharing, and collaboration of process assets and business architecture assets. While doing so, we witnessed PAM and subversion as well as learnt versioning, save/update/commit, difference and merge, and various other activities that empower developers and analysts to work in concert.
In this book, we will learn various patterns in a similar format. Each pattern pairs the classic problem/solution format, which includes signature, intent, motivation, applicability, and implementation; the implementation is demonstrated via a use case scenario along with a BPMN application, in each chapter. It's a one-stop title to learn about patterns, their applicability and implementation, as well as BPMN features.
Further resources on this subject: