Oracle OSB-SOA-BPEL Interview Question and Answer – Part 8

In this article, we will discuss interview question with their justification on Oracle OSB, SOA and BPEL

This is part-8 of Oracle OSB-SOA-BPEL interview question series

Q) What is SOA Governance ?

  • Service-Oriented Architecture (SOA) governance is a concept used for activities related to exercising control over services in a SOA

Q) Difference between pick activity and receive activity ?
Q) What is the use of pick activity ?
Q) Difference between while activity and pick activity ?
Q) What’s a Pick activity ?
Q) What is the use of PICK activity in BPEL PM ?

  • Main difference is in pick activity have one or more onMessage and onAlarm activities where as in receive it contain only one
  • In a receive activity you can set a timeout, while in a pick activity it’s possible in the onAlarm and not in the onMessage.
    They are both causes the process to be Durable (dehydration mode)
  • Pick activity is used when you call a service and if there is a business requirement like after calling, you cannot wait more than certain time, you can configure that waiting time in on alarm branch
  • The other way of using it is, when you have a service with multiple operations, and then a pick activity is used at the starting of the BPEL process with one on-message branch for each operation, so a bpel process can definitely start with a pick activity
  • Pick activity can act as a multiple receive activity in some business scenarios
  • If we have two inbound operations and both can trigger the bpel process then we will go with pick activity as we can’t have two receive activity with createInstance box checked

 Q) How does pick activity differ from a receive activity ?

  • Pick activity can act as a multiple receive activity in some business scenarios
  • If we have two inbound operations and both can trigger the bpel process then we will go with pick activity as we can’t have two receive activity with createInstance box checked

Q) What is a pick activity? Can I have a pick activity with no onMessage branch ?

  • No, onMessage branch is mandatory

Q) Explain Oracle BPEL PM – Dehydration Store ?

  • Oracle BPEL PM utilizes a database to store metadata and instance data during runtime
  • The process of updating process state in the database is called Dehydration
  • This data is stored in what is known as the Dehydration store, which is simply a database schema (also called dehydration store, BPEL schema, BPEL tables)
  • The Dehydration Store database is used to store process status data, especially for asynchronous BPEL processes, like BPEL’s metadata and instance data
  • This exists in x_SOAINFRA schema created by running RCU
  • Oracle BPEL Process Manager uses the dehydration store database to maintain long-running asynchronous processes and their current state information in a database while they wait for asynchronous callbacks
  • Storing the process in a database preserves the process and prevents any loss of state or reliability if a system shuts down or a network problem occurs

Q) What is the use of correlation? What’s correlation and why is it needed ?
Q) Assume that a BPEL process is calling another asynchronous BPEL, how do you take care of correlation in this case ?Q) How do you maintaining correlations in business processes ?
Q) What is the use of PICK activity in BPEL PM ?

  • Correlation is basically the process of matching an inbound message to the BPEL engine with a specific process.  Normally this matching is hidden from us
  • Synchronous calls have no need of correlation because the conversation context is maintained on the stack or across a TCP connection
  • Consenting BPEL processes will usually correlate messages using WS-Addressing headers to pass around magic tokens that act like the session cookies in a web application
  • At the start of a Business Process, a new process instance is created and it lives for the lifetime of the business process
  • Since there might be multiple business-process instances active at the same time in the BPEL Engine, all messages sent to the business process have to be delivered to the correct business process instance
  • BPEL process instances communicate with each other by invoking partner web services
  • The structure of the application-data passed around is transparent to the BPEL engine since BPEL partner services do not address each other by an identifier
  • However, the messages passed around contain key fields that can be correlated for the lifetime of the exchange
  • Since multiple business-process instances are active at the same time, business-application-specific data (like social security numbers, insurance-claim numbers, tax payer IDs, or any business-application-specific identifiers) available in the exchanged messages are used to maintain references to specific business process instances
  • This idea of associating business-application-specific data found in the messages to maintain references to specific business process instances is termed BPEL Correlation.
  • Any business-application-specific data used for correlation is contained in the messages exchanged by the BPEL partner services
  • The exact location of the correlation identifier varies from message to message and is specific to a business process
  • To specify which business-application-specific data to use for correlation, message properties defined in the WSDL file are used. To brook an analogy, think of how you define and use a primary key to access all records associated with this key from your domain model

Q) Difference between synchronous and Asynchronous process ?
Q) What are Sync and Asynchronous BPEL ?

Synchronous Process:

  • The synchronous process defines one two way operation port to receive the request and send the response
  • Using the invoke activity the client invokes the Synchronous BPEL process on this port and waits to receive the response on the same port
  • As soon as the client receives the response from the BPEL process it continues with its flow
  • On the BPEL process side, the Synchronous BPEL process gets instantiated on receiving the client request and sends back the reply using the reply activity on the same port on which the Client is waiting

Asynchronous Process:

  • In the asynchronous process two one way operations ports are defined to receive the request and send the response
  • On the client side, the client uses the invoke activity to invoke the asynchronous BPEL process and continues with its flow
  • It uses the receive activity to receive the response later in the flow. The asynchronous BPEL process receives the request on one of the ports and sends back the reply from another port (callback port)
  • To send the response the asynchronous BPEL process invokes the client on the callback port using the callback activity

Q) What’s the main difference from the WSDL perspective between synchronous and asynchronous services ?

  • Synchronous – one port for request/response only
  • Asynchronous – two ports with request/response (difference ports for request & receive)
<!-- Synchronous: one port -->
<wsdl:portType name="DemoSynchServiceCallout">
	<wsdl:operation name="process">
		<wsdl:input message="service:DemoSynchServiceCalloutRequestType" />
		<wsdl:output message="client:DemoSynchServiceCalloutResponseType" />
	</wsdl:operation>
</wsdl:portType>

<!-- Asynchronous: two ports -->
<!-- portType for BookService BPEL process -->
<portType name="BookServiceRequest">
	<operation name="initiate">
		<input message="tns:BookServiceRequestRequestType" />
	</operation>
</portType>
<!-- portType for BookService BPEL process for asynchronous callback purposes -->
<portType name="BookServiceResponse">
	<operation name="onResult">
		<input message="tns:BookServiceResponseType" />
	</operation>
</portType>

Q) Difference between URI and URL ?

  • A URI is an identifier for some resource, but a URL gives you specific information as to obtain that resource
  • A URI is a URL and as one commenter pointed out, it is now considered incorrect to use URL when describing applications
  • Generally, if the URL describes both the location and name of a resource, the term to use is URI
  • Since this is generally the case most of us encounter every day, URI is the correct term

Q) What is end point URI ?

  • The service endpoint means the actual URL to the service
  • If you open the WSDL of the service, you will find this URL in the location attribute of the address element

Q) What is service Virtualization ?

  • Service Virtualization helps insulate service infrastructure details such as service endpoint location, service inter-connectivity, policy enforcement, service versioning and dynamic service management information from service consumers
  • In service virtualization, clients never interact with service implementations/producer directly; they always communicate through the service intermediary/interface
  • The service intermediary is where the virtual service is hosted and exposed to consumers

Q) What is targetNamespace’s function ?

<schema xmlns="http://www.w3.org/2001/SchemaXML targetNamespace="http://www.example.com/name" xmlns:target="http://www.example.com/name"> 
  • the targetNamespace declares a namespace for other XML and XSD documents to refer to this schema
  • The target prefix in this case refers to the same namespace and you would use it within this schema definition to reference other elements, attributes, types, etc. also defined in this same schema definition

 

Folks, it’s your turn to comment & suggest for improvement

Note: We have taken inputs from various folks and other weblog for making this comprehensive set of Oracle SOA-OSB interview & answers

 

Read Also:

 

Happy Coding !!
Happy Learning !!

Oracle OSB-SOA-BPEL Interview Question and Answer - Part 9
Oracle OSB-SOA-BPEL Interview Question and Answer - Part 7