Saturday, 17 June 2017

OER-How To Retrieve Authtoken And Use In REX Calls Uing Bpel

How to Retrieve an AuthToken and use in REX Calls  Using Bpel

a)To invoke Rex API  from Bpel Use the below mentioned wsdlurl -

http://host:port/oer/services/RexAPI?wsdl


b)Create a Simple bpel service and bind the wsdl using SOAP Binding.Download the wsdl from url as mentioned in previous step.

















c) Drag An Invoke Activity and map with REX API external references created in step b ,use Operation  ‘Authtokencreate’ for this activity as shown in below screenshot.


















d) Drag an assign activity and update username and password accordingly











e) Go to composite.xml make sure –wsdl location for Reference API is updated accordingly






f)Testing And Comments :
Deploy your services ,On testing it should response with AuthToken  as  highlighted  in below screenshot:






OER -AUTHTOKEN AND USE IN REX CALLS USING JAVA

AuthToken and use in REX Calls  Using Java

a)Import the below mentioned jars from OER Installation path àMW_HOME/oer/applications/oer-app/WEB-INF/lib

* aler-axis-jaxrpc.jar
* client.rex.jar
* jaxp.jar
* saaj.jar
* soap.jar
* activation.jar
* xercesImpl.jar
* orawsdl.jar
* aler-axis.jar
* commons-discovery.jar
* commons-logging.jar
* http_client.jar
* mail.jar
* jdom.jar
* xalan.jar

b)Go to OER console à Enable the OpenAPI within the OER if it is not already enabled
Go to Admin --> System Settings
Search for cmee.extframework.enabled
Make sure the cmee.extframework.enabled property is set to True  as shown in below screenshot –








Save the settings

c) Add  the downloaded jars as mentioned in step: a to classpath which are available under WEB-INF/lib  folder.



















d) Compile the java code as shown below  --

packagecom.example.flashlineclient;

importcom.flashline.registry.openapi.entity.AuthToken;
import com.flashline.registry.openapi.service.v300.FlashlineRegistry;
import com.flashline.registry.openapi.service.v300.Flas




hlineRegistryServiceLocator;

import java.net.URL;

public class TestAuthToken {

FlashlineRegistry repo = null;

AuthTokenauthTokAdmin = null;

publicTestAuthToken() {
try {       
URL url = new URL("http://host:port/oer/services/FlashlineRegistry");
repo = new FlashlineRegistryServiceLocator().getFlashlineRegistry(url);
authTokAdmin = repo.authTokenCreate("username", "password");
System.out.println(authTokAdmin);
} catch (Exception e) {
e.printStackTrace();
}
}

/**
* @paramargs
*/
public static void main(String[] args) {
TestAuthToken test = new TestAuthToken();
System.out.println("success");
}

}



e) Test Your Services

On testing  it should print the authtoken as shown in below screenshot




Monday, 12 June 2017

Compensation Handler


Compensation Handler -

Compensation occurs when the BPEL process cannot complete a series of operations after some of them have already completed, and the BPEL process must backtrack and undo the previously completed transactions.
For example, if a BPEL process is designed to book a rental car, a hotel, and a flight, it may book the car and the hotel and then be unable to book a flight for the right day. In this case, the BPEL flow performs compensation by going back and unbooking the car and the hotel.




1)      Create  a Simple Bpel Code with below mentioned xsd parameters-


<?xml version="1.0" encoding="UTF-8"?>
<schema attributeFormDefault="unqualified"
                elementFormDefault="qualified"
                targetNamespace="http://xmlns.oracle.com/Application1/compensation_practice/Compensation_Practice"
                xmlns="http://www.w3.org/2001/XMLSchema">
                <element name="process">
                                <complexType>
                                                <sequence>
                                                                <element name="input" type="integer"/>
<element name="input1" type="integer"/>
                                                </sequence>
                                </complexType>
                </element>
                <element name="processResponse">
                                <complexType>
                                                <sequence>
                                                                <element name="addition" type="integer"/>
<element name="subtraction" type="integer"/>
<element name="multiplication" type="integer"/>
                                                </sequence>
                                </complexType>
                </element>
</schema>


2)      Below Is the complete bpel flow -




3)      How It Works ?-In this flow we will create a simple scope for addition and one for division. If input has 0 it will throw  an error and flow control will go to catch all block from where compensate will revert back all previous assigned values.









First -Create a scope for addition. Inside assign, logic will be –   [ input 1 + input 2 ] as shown below –








Next- Add compensation block  on the same scope by selecting arrow button  on left side,add assign activity and update  values as shown below  -











Create one more scope for division. Here logic is- if value for input1 is 0 it would throw an error and move to catch all block  as shown below –






















Logic For Catch All Block –

Here in catch all- compensate activity will revert back all previous values and  assign  new one based on  logic written in compensation handler block within each scope.








Testing –


Provide the input parameters  as shown below –(positive test case) –










Response –



Compensation Test Case –


Provide 0 in input1 as shown below –











Response    ( It compensates the addition value and resets to 0 )










Thursday, 8 June 2017

OER-How to invoke OER Using Java Rex Api

Perform below steps to update oer Console --

Start OER Server 
Enable the OpenAPI within the OER if it is not already enabled 
Go to Admin --> System Settings 
Search for cmee.extframework.enabled 
Make sure the cmee.extframework.enabled property is set to True 
Save the settings 


Java Jars -


Compile the Sample code using Java Compiler by specifying the following Jar files to classpath which are available under WEB-INF/lib folder 


* aler-axis-jaxrpc.jar 
* client.rex.jar 
* jaxp.jar 
* saaj.jar 
* soap.jar 
* activation.jar 
* xercesImpl.jar 
* orawsdl.jar 
* aler-axis.jar 
* commons-discovery.jar 
* commons-logging.jar 
* http_client.jar 
* mail.jar 
* jdom.jar 
* xalan.jar 


Code To Authenticate  With OER Server:



import java.net.URL; 

import com.flashline.registry.openapi.entity.AssetType; 
import com.flashline.registry.openapi.entity.AuthToken; 
import com.flashline.registry.openapi.query.AssetTypeCriteria; 
import com.flashline.registry.openapi.service.v300.FlashlineRegistry; 
import com.flashline.registry.openapi.service.v300.FlashlineRegistryServiceLocator; 


public class TestAuthToken { 

FlashlineRegistry repo = null; 

AuthToken authTokAdmin = null; 

public TestAuthToken() { 
try { 
URL url = new URL("http://ABCD/oer/services/FlashlineRegistry"); 
repo = new FlashlineRegistryServiceLocator().getFlashlineRegistry(url); 
authTokAdmin = repo.authTokenCreate("admin", "welcome1"); 
System.out.println(authTokAdmin); 
} catch (Exception e) { 
e.printStackTrace(); 



/** 
* @param args 
*/ 
public static void main(String[] args) { 
TestAuthToken test = new TestAuthToken(); 

Tuesday, 6 June 2017

SOA CLOUD SERVICES -CONCEPTS

What is SOA Cloud Service ?


Oracle SOA Cloud Service provides a PaaS (Platform as a Service) computing platform solution for running the following applications in the cloud:
  • Oracle SOA Suite
  • Oracle Service Bus
  • Oracle API Manager
  • Oracle Managed File Transfer
  • Oracle Real-Time Integration Business Insight
  • Oracle Business Activity Monitoring
  • Oracle B2B



          Advantages -

          Reduce costs-You can reduce IT maintenance and administrative costs. Oracle handles all                   platform provisioning, installation, and domain configuration. Oracle SOA Cloud Service is 
          subscription-based, meaning you only pay when using the service          .

  • Create test environments in the cloud. You can quickly subscribe to Oracle SOA Cloud Service to create application test environments in the cloud. There is no need to provision and configure your own servers. Move workloads to the cloud, from cloud to cloud, and from cloud to on-premises environments. When testing is done, you can release your subscription.
  • Monitor and manage your environment. You can initiate backups, patching, scaling, and recoveries with minimal configuration from the cloud. These tasks are handled for you by Oracle.




How To Deploy Oracle OSB Into SOA CLOUD SERVICES?



Please follow below url to learn more -


http://www.oracle.com/webfolder/technetwork/tutorials/obe/cloud/sscs/DeployingOSBApp_Cloud/sb-app-cloud-deployment.html




Difference between SOA And Cloud  -


Some features of Oracle SOA behave differently in the cloud than in an on-premises environment-

  • Because shared disk is currently not available, writing to a shared file from multiple managed servers running in a cluster is not possible. To make this work in the cloud, managed servers would have to write to a file on their own local disks, and then an additional process would have to consolidate the files on one of the VMs.
  • File adapter read actions — each managed server only reads from its local directory.
  • JMS store and JTA transaction logs must use the Oracle database instead of file stores.
  • Connectivity between Oracle SOA Cloud Service adapters and on-premises applications might be blocked by your corporate firewall. Connections can be established by using an SSH tunnel from the application server to which the adapter connects.
  • The SOA debugger and automatic SOA composite application tester (unit tester) in Oracle JDeveloper are not supported when connecting to the SOA Cloud Service server.
  • Reports are not supported in Oracle Real-Time Integration Business Insight, installed as part of the Integration Analytics Cluster service type.
  • The iWay application adapters listed under Application Adapters (iWay) on Oracle Cloud Adapters Documentation are not supported by Oracle SOA Cloud Service.
  • The Oracle Traffic Director high availability features 12.2.1.2/12.1.3 are not supported with Oracle SOA Cloud Service.
  • Dehydration does work in the cloud as it does in the on-premises environment as described in Fusion Middleware Administering Oracle SOA Suite and Oracle Business Process Management Suite 12.2.1.2/12.1.3


Thursday, 1 June 2017

Oracle CLOUD Concepts-Public Cloud,Private Cloud,Saas,Paas

What Is Cloud ?



The cloud is a metaphor for the Internet. In very simplistic terms, cloud computing means that your Microsoft Office 365 applications or software, data, and computing needs are accessed, stored, and occur over the Internet or the cloud.

Perhaps one of the best ways to illustrate the concept of cloud computing is through the story of how Saleforce grew from a start-up in a rented apartment to the world’s fastest growing software company in less than a decade.

Marc Benioff describes how he saw an opportunity to deliver business software applications in a new way. He wanted to make software simpler to use without the complexities of installation, maintenance, and constant upgrades. His vision was to sell software as a service.

Companies would pay a monthly fee, per user, only for those services they used delivered via the Internet. The idea was to host the software on a website and for it to be available to companies anytime, anywhere.


Simply put, cloud computing is the delivery of computing services—servers, storage, databases, networking, software, analytics and more—over the Internet (“the cloud”). Companies offering these computing services are called cloud providers and typically charge for cloud computing services based on usage, similar to how you are billed for water or electricity at home.




What Is Public Cloud ?



Public clouds are owned and operated by a third-party cloud service provider, which deliver their computing resources like servers and storage over the Internet. Microsoft Azure is an example of a public cloud. With a public cloud, all hardware, software and other supporting infrastructure is owned and managed by the cloud provider. You access these services and manage your account using a web browser.

Another example -

Salesforce started as Software as a Service (SAAS) CRM company. Salesforce now provides various software solutions and a platform for users and developers to develop and distribute custom software.



What is a Private Cloud?

A private cloud is a particular model of cloud computing that involves a distinct and secure cloud based environment in which only the specified client can operate. As with other cloud models, private clouds will provide computing power as a service within a virtualised environment using an underlying pool of physical computing resource. However, under the private cloud model, the cloud (the pool of resource) is only accessible by a single organisation providing that organisation with greater control and privacy.



What Is Hybrid Cloud ?

Hybrid cloud is a cloud computing environment which uses a mix of on-premises, private cloud and third-party, public cloud services with orchestration between the two platforms.



What Is Saas?

Software as a service (or SaaS) is a way of delivering applications over the Internet—as a service. Instead of installing and maintaining software, you simply access it via the Internet, freeing yourself from complex software and hardware management.

SaaS applications are sometimes called Web-based software, on-demand software, or hosted software. Whatever the name, SaaS applications run on a SaaS provider’s servers. The provider manages access to the application, including security, availability, and performance.


Advantage-

SaaS customers have no hardware or software to buy, install, maintain, or update. Access to applications is easy: You just need an Internet connection.


A multitenant architecture, in which all users and applications share a single, common infrastructure and code base that is centrally maintained. Because SaaS vendor clients are all on the same infrastructure and code base, vendors can innovate more quickly and save the valuable development time previously spent on maintaining numerous versions of outdated code.


Improved access to data from any networked device while making it easier to manage privileges, monitor data use, and ensure everyone sees the same information at the same time.


What is Paas?


Issues -

Building and running on-premise applications has always been complex, expensive, and slow. Each application required hardware, an operating system, a database, middleware, Web servers, and other software. Once the stack was assembled, a team of developers had to navigate frameworks like J2EE and .NET. A team of network, database, and system management experts was needed to keep everything up and running..


PaaS provides all the infrastructure needed to develop and run applications over the Internet. Users can access custom apps built in the cloud, just like their SaaS apps, while IT departments and ISVs can focus on innovation instead of complex infrastructure.


Example - IBM Bluemix is a cloud platform as a service (PaaS) developed by IBM. It supports several programming languages and services as well as integrated DevOps to build, run, deploy and manage applications on the cloud.

Other Example -Windows AzureHerokuForce.comGoogle App Engine.




What is Iaas?



Infrastructure as a service (IaaS) is an instant computing infrastructure, provisioned and managed over the Internet. Quickly scale up and down with demand and pay only for what you use.
IaaS helps you avoid the expense and complexity of buying and managing your own physical servers and other datacenter infrastructure. Each resource is offered as a separate service component and you only need to rent a particular one for as long as you need it. The cloud computing service provider manages the infrastructure, while you purchase, install, configure and manage your own software—operating systems, middleware and applications.


Typical things businesses do with IaaS include:
Test and development. Teams can quickly set up and dismantle test and development environments, bringing new applications to market faster. IaaS makes it quick and economical to scale up dev-test environments up and down.
Website hosting. Running websites using IaaS can be less expensive than traditional web hosting.
Storage, backup and recovery. Organisations avoid the capital outlay for storage and complexity of storage management, which typically requires a skilled staff to manage data and meet legal and compliance requirements. IaaS is useful for handling unpredictable demand and steadily growing storage needs. It can also simplify planning and management of backup and recovery systems.
Web apps. IaaS provides all the infrastructure to support web apps, including storage, web and application servers and networking resources. Organisations can quickly deploy web apps on IaaS and easily scale infrastructure up and down when demand for the apps is unpredictable.
High-performance computing. High-performance computing (HPC) on supercomputers, computer grids or computer clusters helps solve complex problems involving millions of variables or calculations. Examples include earthquake and protein folding simulations, climate and weather predictions, financial modeling and evaluating product designs.



Excellent Video -- 


https://www.youtube.com/watch?v=A00bQ6UqV20&feature=youtu.be




Platform Differences Between the Cloud and On-Premises Environments


This table describes high-level differences between running Oracle SOA in the cloud and on-premises environments.
Oracle SOA Cloud ServiceOracle SOA Suite On-Premises
Available by subscription.
You install Oracle SOA Suite on your own hardware.
Provisioning of Oracle SOA Cloud Service automatically includes Oracle Java Cloud Service, which provides an Oracle WebLogic Server domain.
You create the complete domain.
Oracle SOA Cloud Service provides OPC-based backup services.
You must develop your own archival infrastructure.
During Oracle SOA Cloud Service provisioning, you select the database (Oracle Database Cloud Service) to use.
Note: You must provision Oracle Database Cloud Service prior to provisioning Oracle SOA Cloud Service.
You must install a database.
High availability functionality is provided by default using a virtual machine restart.
You must set up an environment based on your high availability requirements.
Load balancing is provided by the built-in Oracle Traffic Director.
Oracle HTTP Server serves as the load balancer.
Application deployment directly from Oracle JDeveloper to the cloud is not supported. You must use one of the deployment mechanisms described in Deploying and Undeploying Applications for an Oracle SOA Cloud Service Instance.
Applications can be deployed directly from Oracle JDevelope




Metered Vs Non Metered Cloud Services -




Metered Services are a Pre-paid offering, also referred to as "a-la-carte" or "committed" offerings. A Metered cloud service like Java Cloud Service (JCS) or Database Cloud Service (DBCS) is where you are charged based on the actual usage of the service resources on an hourly or monthly basis. A Metered service allows the customer to select resource configurations for a service and virtually any volume or capacity to meet their requirements. For instance, you can select the number of Oracle Compute Processor Units (OCPUs) or the amount of memory. Customers can change their service capacity as needed and that will increase/decrease their bill



Non-metered Services are a subscription based offering, also referred to as "standard subscription" or "un-committed" offerings.  A Non-metered service is essentially a monthly or annual subscription for a fixed service configuration which you typically cannot change. If a service is Non-metered it means that we sell it in well-known sizes or fixed configurations, let's say small, medium and large, and Oracle does not measure whether the entire capacity is used or not. A Non-metered subscription has a fixed monthly charge. While you can stop a service instance to take the service offline for a few hours or days within a month, charging does not stop, and your service will be charged for the entire month


What is Elastic Computing ?

Elastic computing is a concept in cloud computing in which computing resources can be scaled up and down easily by the cloud service provider. Elastic computingis the ability of a cloud service provider to provision flexible computing power when and wherever required

The elasticity of these resources can be in terms of processing power, storage, bandwidth, etc.


the resources are elastic in nature, i.e. they can be easily scaled depending upon the underlying resource requirements on run time without even disrupting the operations and this ability is known as elastic computing. On a small scale this is done manually, but for larger installations, the scaling is automatic. For example, a larger provider of online video could setup a system so that the number of webservers online scaled during peak viewing hours.


What is Single Tenant Enviorment?


In the cloud single tenant environment is a host machine dedicated entirely to a single customer whereas multi tenant environment is a host machine in a virtual machine model that hosts multiple customers.  


Factors Asked when providing service to customers for their org needs ---



»»Available CPU sizes: How much processing power
do your applications and workloads require?


»»Metered vs. unmetered pricing: Do you need a
“pay-as-you-go” option or the option to pay


Single tenant or multitenant: Do your security
and compliance requirements necessitate
infrastructure that is dedicated solely to your
organization?

»»Migration of KVM/VMware workloads: Do you
need to migrate KVM/VMware dev/test or demo
workloads off premises?

»»Hosted on-premises: Do you need an entire rack
of dedicated hardware (fully managed and
serviced) in your own data center?

»»Support for containers: Are your developers
actively writing next-generation applications
utilizing Docker as their primary container?





Oracle Bare Metal Cloud Service -

Oracle Bare Metal Cloud Services is a set of complementary cloud services that enable you to build and run a wide range of applications and services in a highly-available hosted environment. Oracle Bare Metal Cloud Services offers high-performance compute capabilities (as physical hardware instances) and storage capacity in a flexible overlay virtual network that is securely accessible from your on-premises network.