Tuesday, 17 July 2018

Resolving "ORA-01033: ORACLE initialization or shutdown in progress.

Hi,

This error I was getting after I restarted my system; when i tried connecting to Oracle DB 12c.
 "ORA-01033: ORACLE initialization or shutdown in progress.

Tried restarting the service -- control panel -- oracle service ( but did not help )

So below is the method which helped.

Go to cmd

>sqlplus SYS/Oracle_1@orclpdb AS SYSDBA    ( here orclpdb is my oracle service name )

sql>alter pluggable database orclpdb open read write;

sql>connect hr/hr@orclpdb


This will help to resolve the error. DB gets connected again.

All good n fine!

Thanks!

Keep Learning!! :)

Thursday, 22 February 2018

Differences between BPEL1.1 and BPEL2.0Versions summarized

Hi All,

Both SOA suite 11g and 12c provides the users to use BPEL1.1 and 2.0 versions when creating a bpel process.

    BPEL 1.1                                                BPEL 2.0

1. We have Flow and FlowN                  1. We have Flow and <forEach>
2. <if>- <elseif>- <else>                        2. Replaced by Switch Activity
3. <terminate>                                        3. Replaced by <exit> Activity
4. No such activity                                 4. New activity <compensateScope> has been added
5. No such activity                                 5. Rethtrow Activity has been added to the Fault Handlers
6. No such activity                                 6. RepeatUntil Activity has been newly added. We canuse                                                                           this if we want the body of the activity to be executed                                                                             atleast once.

Other important differences are as noted below:

1. In BPEL 1.1 there is no defined behavior for a process that receives a message for a request-response operation and finishes without replying.
Similar scenario in BPEL 2.0 would have trigged a Fault message.

2. Xpath expressions are simplified using '$' while accessing variables in BPEL2.0
EX. $OutputVariable.payload/ns4:Result

Where as in BPEL 1.1 it is something like
EX: (bpws:getVariableData('OutputVariable','payload','/ns4:Result')

3.BPEL2.0 support multipart WSDL messages.
    a. toParts element in invoke and reply activities provides an alternative to explicitly creating                    multipart WSDL messages from the contents of BPEL variables
    b. The fromParts element retrieves data from an incoming multipart WSDL message and places               the data into individual variables


Hope this summarizes most of the points.. If missed anything kindly add in comment section.

Let's explore SOA! :)


Tuesday, 6 February 2018

Composite Sensors Explained

Hi All,

In this post I will try to demonstrate the use of composite sensors and this will help all of us to understand its importance.

Composite sensors helps to track required fields from the messages.
Ex: StudentID from StudentInfo Payload

We define composite sensors on service and reference binding components or
On service components that have business event subscriptions.

Composite sensors enable us to perform below tasks:

1. Monitor incoming and outgoing messages.
2. Create Search box for composite sensor details in the instances page of a SOA composite application in Enterprise Manager . This helps us to easily locate a particular instance.
3. Publish to JMS with data computed from incoming and outgoing messages.
4. Track composite instances initiated through business event subscriptions.

During runtime, composite sensor data is persisted in the database.

Demonstration:

1. Create a xsd as below:

2. Build OneWay bpel process accepting Student as input; expose it as soap service
In Composite.xml Choose the higlighted icon for creating sensors.

3. Choose as below


4. Create StudentID as the field to be tracked in the input payload ; under expression select variable and choose StudentID.


5. Choose EM console to manage sensors features.


6. Select StudentID click on apply and ok.


7. Save all your composite and deploy to the em console

Testing:

1. Provide inputs and test the webservice


2. Launch Flowtrace 

3. We can see a fields under Sensors Tab


4. Go to Dashboard in em console under Add Fields we will be able to see the composite sensor which we created 'StudentID'


5. Choose that Provide the StudentID which we entered earlier or from any previous test searches



6. Hola! here we obtain the same instance from our previous test case.

That's all!

We can easily track the instances by setting composite sensors on the required fields either from the payloads at service/reference sides and also on the components which are subscribed to events.


Let's keep exploring SOA! :)

Drop in your comments for any doubts .. :)
Will be happy to help!




Wednesday, 17 January 2018

Setting Composite Instance Title in Mediator involving concept of "Echo"

Hi All,

In this post we try to use "CompositeInstanceTitle" function which sets the composite instance title and returns it.

In BPEL we must assign the return value to a variable.
In Mediator we must assign it to a property.

Also in this composite , we are using Echo in Mediator.

Echo option is used when we don’t have target service available ,we expose Mediator functioanlity as taraget service and Echo a respone to intial caller .

Suppose we are doing qurey from target service but that target service is down due to some reason , in this case to test our Mediator we use Echo, we will create sample query response message and pass that to calling service as a Echo.

Demonstration:

Steps:
1. Create new application ; new soa Project; an empty composite

2. Create XSD


3. Create WSDL


4. Drop Mediator component; based on wsdl; expose as soap service



5. Create static routing rule; use echo option


6. Click on Assign
Assign Value From Expression to Property


Edit expression; Choose from Mediator Extension Function

expression:
med:setCompositeInstanceTitle(concat('Mediator Instance ID is',med:getCompositeInstanceId()))


Add Property ( literally Type ; as we do not find this property in the list )

Property:
tracking.compositeInstanceTitle




7. Save all and deploy

Testing: 

Checking the flow trace







Thus we are now able to set Composite Instance title using the function in Mediator.

Also we have successfuly exposed Mediator as service using Echo.

Let's Keep Exploring SOA!

Cheers to the next..
Krithika :) 

Tuesday, 16 January 2018

Setting Composite Instance Title in BPEL

Hi All,

This post is about naming your Composite Instance so that it can be easily identified among a pile of instances.

"setCompositeInstanceTitle function sets the composite instance title and returns it.  In  BPEL you must assign the return value to a variable"

Use case: Suppose we are getting orders for different items and we would like to identify each order based upon some Unique OrderID. Then instead of going through the audit trail/flow to find out; we can try to add unique id along with composite instance id in Composite Instance Title.

Such that it is easy to identify which instance is processing which OrderID.

Demonstration:

I am taking my previous developed composite - Correlation to demonstrate setting of Composite Instance Title.

Steps:

1. Add Assign activity after Receive like below:


2. Add a global variable Title of type String


3. Edit Assign then Add function to newly added variable Title:




Choose from Advanced Function; Ora:setCompositeInstancetitle() ; then 
add concat (orderID+CompositeInstanceID)

Actual xpath:

ora:setCompositeInstanceTitle(concat('OrderID',bpws:getVariableData('inputVariable','part','/client:Order/client:OrderID'),' ',' ','CompositeInstanceID-', ora:getCompositeInstanceId()))

4. Save all and Deploy

Test: 

1. Testing with inputs: OrderID - 03


 2. Checking Composite name:


Thus, we can see our use case has been achieved, now instance name has OrderID and InstanceID.

Let's keep exploring SOA!

More to come
- Krithika :) 

Friday, 12 January 2018

Correlation Set Concept to Interrupt the Flow of BPEL

Hi All,

To identify the messages (requests, delayed responses) in asynchronous communication, we can use Correlation Sets.
It correlate the messages when interacting with the Asynchronous systems.

In BPEL for asynchronous communications is implemented with WS-Addressing internally to identify the partner to whom we need to send the callback using the unique id.
We can override the default implementation (WS-Addressing) , using Correlation Sets.

You can use correlation sets in invoke, receive, pick, and reply activities to indicate which correlation sets occur in the messages that are sent and received.

The values of each correlation set uniquely identify the process instance. This is true even if the process instance has already reached an end state, such as the finished state

Use Case:
In typical business systems like “Order Management”, we will place an order request and to deliver the ordered items it may take some time. Once the requested items are delivered then the order request will be closed. In mean while we can cancel the order request as well.
To cancel the order request, we will be providing the unique data provided while placing the order request.

Steps in creating Correlation Set:

1. New SOA Application--> New Project --> New Composite
2. Create an asynchronous BPEL , expose it as soap service
3. Edit the XSD according to the requirement


4. Edit the wsdl


 Composite will look like below:




5. Create Process Logic inside .bpel, add wait activity




6. Edit Recieve add correlation Set for Recieve message


Select Correlations ( Demonstrating by Creating a new Correlation Set )






 Here query Does not get generated and we are not having a declarative method to create , So Click "CTRL+Space" and drill down to OrderID







Make Initiate as YES while creating correlation Set for recieve activity


7. Add OnMessage branch , Add Terminate




8. Edit OnMessage , Edit existing correlation Set to add a property for Cancellation message






generate query ( ctrl+space --> drill down to cancellation OrderID )



Now that we have added OrderID from cancellation message, we are having 2 properties under the same Correlation Set.





9. Now as we have built our composite it will look like below:



10. Deploy, test for OrderRequest Operation






10. Test for OrderCancellation Operation ( here we try to cancel the same order placed )


 The running Process gets Terminated and the on message branch gets executed




Thus our use case is justified! 

Let's Keep exploring SOA!
- Krithika :)