It gives me immense pleasure to let you know that my book on “BPM Modeling Patterns” has been released.
Available at all leading stores worldwide, including –
Title – BPM Modeling Patterns (Oracle BPM 12c)
Demonstrate the perceptible regularity in the world of BPMN design and implementation while diving into comprehensive learning path of much awaited Oracle BPM Modeling and implementation patterns where readers will discover the doing rather than reading about the doing! Spectrum of book covers patterns and features from strategic alignment (goals and strategy model) to flow patterns. From conversation, collaboration and correlation pattern to exception handling and management patterns. From human task patterns & business-IT collaboration to adaptive case management and much more.
Description – Oracle BPM Patterns title is an opportunity to demystify various patterns required to be followed while developing a professional BPM solution. . It allows you to fill the GAPS and offers contents which allow you to use BPMN to its full potential. With this title in hand you will gain details and practical experience in using Oracle BPM effectively while using patterns as best practice for implementations. Patterns like split-join, multi-instance, loop, cycle, termination etc allows you to drill into basic and advance flow based patterns. Integration, invocation, interaction and correlation patterns demonstrate collaboration and correlation of BPM with other systems, processes, events and services. Human interaction pattern topic leaves no stone touched in covering task modelling, routing, dispatching, dynamic task assignment, rule-based assignments, list building and other advance topics. Exception handling patterns is a comprehensive guide to model and implement exception handling in Oracle BPM implementation and design. Case management offers details guide to patterns handling unstructured data and unpredictable scenarios. Adaptive case management features and patterns will empower you in developing a milestone oriented, state based, rule-governed, content outbid, event-driven, case management solution. Also witness patterns which brings in enhanced and dynamic Business-IT collaboration. Experience the magic of strategic alignment features which bring close the requirement and analysis gaps and make the organizational activities very much in line with the goals, strategies and objectives.
Who this book is for – This book is an invaluable resource for enterprise architects, solution architects, developers, process analysts, application functional and technical consultants who use business process and BPMN to model and implement enterprise IT applications, SaaS and cloud applications. Primary focus is to showcase BPM patterns which are generic and can be read by anyone allied with any BPM offering and hence if you are associated with any BPM, you can relate with this title.
Read Custom Escalation in Oracle BPM @ –
With Exception handling patterns chapter , we have covered patterns related to exception handling in Oracle BPM. Here let’s try to understand different levels of timeout and where to set the properties for them and equation to follow.
- Global java Transaction Timeout (JTA) :
- Navigation: WLS Console –> Domain –> Configuration –> JTA
- Description: You cannot catch fault if the timeout is occurring at JTA level. Neither a CATCH activity nor the fault policy will help in this scenario.
- Effect: Instance will get rollback to last dehydration point.
- EJB Timeout (JTA) :
- Navigation: WLS Console –> Deployments –> Control –> Expand SOA-INFRA –> Expand EJB node. Increase the “Transaction Timeout” (value in seconds) in the “Configuration” tab for the following EJB’s by clicking on them.
- Description: Many BPM engine EJB’s exist in “soa-infra” Enterprise application which process the message during runtime, each EJB has its own timeout parameter which need to configure and should be in relation with JTA and Resource timeout.
- Effect: You cannot catch fault if the timeout is occurring at JTA level. Neither a CATCH activity nor the fault policy will help in this scenario.Instance will get rollback to last dehydration point.
- Resource Timeout :
- Navigation: In composite.xml OR WLS EM –> Click on Project –> Service and References –> Click on the component. Example you are referencing a web service then you can set HTTP read timeout and HTTP Connection timeout from EM or you can set them in composite.xml at design time as properties in the reference section of the respective component. Same can be done for another JCA adapter like database adapter. You can set query timeout from EM console for the DB adapter. You can use catch or fault policy to handle such exceptions.
Equation to follow –
If the Request pattern is as follows –
Consumer –> DMZ/Firewall/Load balancer –> SOA Managed Server –> Provider System
Example – A portal application invokes a composite service which is referencing a database adapter to call a stored procedure.
Equation Can be –
Consumer System Timeout > DMZ System/Firewall/Load balancer timeout > JTA Timeout > EJB Timeout > Resource Timeout > Provider (Database)
Base equation to follow among the components discussed is –
JTA Timeout > EJB Timeout > Resource Timeout
Understanding BPM Event
Collaboration is the message exchange between processes while conversation is for grouping message exchange between processes and it also defines the state of collaboration between participants and the message exchange will follow the message exchange patterns. BPEL process, BPMN process, Human tasks, Business rules and references are termed as participants in this context. Oracle BPM offers send and receive task, message events, signal events, service tasks, call activities etc. to communicate with other processes, service and events. This chapter you will expose the scenario where we have assumed that the loan origination processes gets started from the bank’s back office (customer case/ back office center). There are other ways too to initiate loan like web, branch etc. Backoffice process interacts with loan origination process and once the loan origination process gets completed, Backoffice process initiates customer feedback process. While implementing the sample due care is taken to demonstrate most of the BPM features which provisions interprocess and collaborative communications.
Oracle BPM offers four kinds of events –
- Start event
- Throw event
- Catch event and
- End event
Start Event– Message Start, Signal Start and Timer Start are used to start a new process instance. Start event can be defined for a BPM process or can be a trigger type for the event Subprocess. Event Subprocess are used to handle a event and are referred as event Subprocess. They can either interrupt normal process flow or they can be non-interrupting. Event Subprocess can have message start, signal start, timer start and error start as the start trigger type. It’s only error trigger type for the event Subprocess which is interrupting in nature however all other trigger type can be both – interrupting and non- interrupting.
Intermediate events – Catch event and throw event are also termed as intermediate events as they establish interaction of a process with other process and services. Start events can only catch any triggers and end events which can throw triggers however intermediate events can throw and catch events. As you will check in above table – intermediate events are of throw type and catch type to throw and catch events.
Catch event can used in many variants in Oracle BPM. Catch event can be configured as wait activities which happen to wait for message, signal or timer event to take place. OR catch events can be configured as a boundary event on various activities and sub processes. These boundary catch event can be of interrupting or non-interrupting type , depends on the way they deal with the normal process flow. You can implement timer as boundary event to introduce a delay, SLA or a wait on an activity or a embedded Subprocess. You can use a receive activity in place of a catch event however they have there on use case which we have discussed in this chapter. Catch intermediate events are also used as boundary events to a Subprocess or activities of certain type. When any associated boundary event executes then the process flows to exception path. A boundary event can of interrupting or non-interrupting type. In non-interrupting boundary event, process flows to normal process flow and exception flow as both are mutually exclusive however in interrupting boundary event case, process flow moves to only exception flow.
Throw message intermediate event are, of asynchronous nature and can be turned into synchronous nature , used to send messages to external processes and services and a catch message intermediate event to receive callback message from other process or service. Throw signal intermediate event is used to publish a signal while catch signal intermediate event is to subscribe and catch a broadcasted signal. When you publish and subscribe to events you are dealing with Oracle SOA’s EDN.
Timer boundary events are use to handle timeout exceptions and they can be of interrupting and non-interrupting types. Interrupting timer boundary event drags the process flow to exception path as it interrupts the normal process flow while the non-interrupting boundary timer event will allow the process to continue on normal path and in parallel also executes the exception flow. You can use non-interrupting boundary timer in cases like notification or escalation etc. Throw event are use to send a message or a signal in the process. They are similar to send task.
End event – They introduces normal process end if the process ends with a message or a signal. However if the process ends with a terminate or an error it;s termed as abnormal process ending.
Note – N is specified for None start event as you cannot start a process instance by just having a none start event. You would need a receive task with create instance property or a initiator human task to create a process instance.
Importing SSL certificates to Trust Keystore
As you would be using GMAIL, for incoming messages, you have to import gmail ssl certificates to weblogic trust store.
- Download the Gmail IMAP and SMTP certificates. This can be done with OpenSSL by running the following from command prompt:
openssl s_client -connect smtp.gmail.com:465
openssl s_client -connect imap.gmail.com:993
2. Copy the contents from –Begin Certificate– to –End Certificate– and create two text files as smtp.txt and imap.txt which contains certificates generated using openssl for SMTP and IMAP respectively.
3. Using Java Keytool, import the two certificates into trust store. You can create a new store. However we would use the exisitng DemoTrust.jks trust store. DemoTrust.jks trust store can be found at %WL_HOME%/server/lib/DemoTrust.jks and the keeytool is available @ %JAVA_HOME%/bin.
4. Use following command to import certificates to trust store-
keytool -import -alias AliasName -keystore KeystoreLocation -file CertificateLocation
For Our example use –
keytool -import -alias gmailimap -keystore C:\Oracle\Middleware\wlserver\server\lib\DemoTrust.jks -file imap.txt
keytool -import -alias gmailsmtp -keystore C:\Oracle\Middleware\wlserver\server\lib\DemoTrust.jks -file smtp.txt
5. Enter “DemoTrustKeyStorePassPhrase” when prompt for DemoTrust store password.
6. Start/Restart the SOA server.
Configure Email Driver on WebLogic Server
- Login to WebLogic server as admin user (weblogic)
- Expand User Messaging Service
- Right Click usermessagingdriver-email and click on email driver properties as shown below –
4. Choose message exchange protocol as – MailAccessProtocol = IMAP
5. ReceiveFolder = INBOX
6. Furnish following details for incoming email server,port and SSL.
7. Let the incoming mail id be email@example.com. You can change as per your requirements.
- Enter Email ID password as cleartext password in IncomingUserPasswords.
- Click Apply to Apply Changes.
- Right-click on soa-infra under SOA and navigate to the → SOA Administration → Workflow Notification Properties
- Set the Notification Mode to ‘Email’ and enter the values which you wish to use for from, actionable and reply to email addresses.
- Click Apply and Restart SOA server for changes to persist.
Create a SOA/BPEL process to send email to “firstname.lastname@example.org”
To initiate the Loan Origination BPM process, you have to send email to email@example.com’s INBOX as email driver is configured to pick messages from this box.
Download the Project – “PushToEmail” associated with this post.
- Open the project PushToEmail in Jdeveloper.
- Click on Composite.xml
- Open SendToEmail UMS adapter configuration
- It;s based on outbound JNDI – eis/ums/UMSAdapterOutbound
- Operation name defined is Outbound Send Notification
- Change following details as per your email configuration –
- Notice the To address. It;s the address of the Loan Office which would receive the email in his/her Inbox from where the BPM process would initiate.
- Choose LoanOrigination schema associate with this blog and let the configuration of UMS be based on LoanOrigination schema.
- Create the BPEL process with default input and output
- Drag and assign values to UMS adapter input variable
- Save and Deploy the process.
Changing JCA Adapter properties using Configuration Plans
While moving from one environment to another (DEV à TEST àPRD), you typically must modify several environment-specific values like –JDBC connection strings,
- Host names of various servers,
- Port details etc.
Composite.xml – Here you can replace following –
- Any composite,
- Service component,
- Service and
- Binding properties.
Bindings – bindings.ws
- Attribute values for bindings
- Schema Location attribute of an import in a WSDL file
- Location attribute of an include in a WSDL fi
- Schema Location attribute of an include, import, and redefine in an XSD file
- Any properties in JCA adapter files
- Modify and add policy references for the following
- Service component
- Service and reference binding components
Solution is to use configuration plan. Configuration plans enable you to modify these values using a single text (XML) file called a configuration plan. The configuration plan is created in either Oracle J-Developer or from the command line. During process deployment, the configuration plan is used to search the SOA project for values that must be replaced to adapt the project to the next target environment.
This blog we will check how to replace properties in JCA adapter files –
Use Case – Changing the Physical path for File Adapter from which it will read/write the contents.
While developing the Application; you design the adapter to have following path
The .jca file in this case will look like
<connection-factory location=”eis/file/R12Fileadapter” adapterRef=””/>
<endpoint-interaction portType=”Write_ptt” operation=”Write”>
<property name=”PhysicalDirectory” value=”/u01/fs/dev/filelocation “/>
<property name=”Append” value=”false”/>
<property name=”NumberMessages” value=”1″/>
- Generate a configuration for your composite
- Use the following code in configuration file to change the file location (Physical directory property of File Adapter ) –
<jca:property name=”PhysicalDirectory”><replace>/u01/fs/crp/filelocation</replace> </jca:property> </wsdlAndSchema>
- You will get the Physical Directory path replaced to – u01/fs/crp/filelocation
Similarly; you can replace the Topic/Queue name for the JMS adapter using following
<!– replace jms destination for jms adapter –>