Create datasource in weblogic by python script

Hi All,

If you want to create datasources in weblogic manually or through program. You can write a python script and invoke that python script with maven to use this in devops. This is quite common requirment. If you want to setup new environment using maven, this will be really helpful.

Below is follow script used for that

adminUserName='weblogic'
adminPassword='Weblogic1'
adminURL='t3://hostname:port'
databasehost='hostname'


connect(UserName, Password, adminURL)
edit()
startEdit()

cd('/')
cmo.createJDBCSystemResource('techartifactDS')

cd('/JDBCSystemResources/techartifact/JDBCResource/techartifactDS')
cmo.setName('techartifactDS')

cd('/JDBCSystemResources/techartifact/JDBCResource/JDBCDataSourceParams/techartifactDS')
set('JNDINames',jarray.array([String('jdbc/techartifactDS')], String))

cd('/JDBCSystemResources/techartifact/JDBCResource/JDBCDriverParams/techartifactDS')
cmo.setUrl('jdbc:oracle:thin:@' + databasehost + ':1521:xe')
cmo.setDriverName('oracle.jdbc.OracleDriver')
cmo.setPassword('passwordFortechartifactDS')

cd('/JDBCSystemResources/techartifact/JDBCResource/JDBCConnectionPoolParams/techartifactDS')
cmo.setTestTableName('SQL SELECT 1 FROM DUAL\r\n\r\n')

cd('/JDBCSystemResources/techartifact/JDBCResource/JDBCDriverParams/techartifactDS/Properties/techartifact')
cmo.createProperty('user')

cd('/JDBCSystemResources/techartifact/JDBCResource/JDBCDriverParams/techartifactDS/Properties/techartifact/Properties/user')
cmo.setValue('techartifact')

cd('/JDBCSystemResources/techartifact/JDBCResource/JDBCDataSourceParams/techartifactDS')
cmo.setGlobalTransactionsProtocol('OnePhaseCommit')

cd('/SystemResources/techartifact')
set('Targets',jarray.array([ObjectName('com.bea:Name=WCP_PORTAL,Type=Cluster')], ObjectName))

activate()

Happy coding with python with Vinay

Building ADF Taskflow for reuse

Hi All,

If you making taskflow for reuse either as jar or in portal and so on.Always make sure one property that Library Internal
This property makes an entry in task-flow-registry.xml and enable/disable taskflow to reuse.

Library Internal: This property controls the visibility of a task flow when packaged in an ADF library.
This helps developers to expose only those task flows that are indented for reuse.

taskflowProperties

if you check this property you will have task-flow-registry.xml as below

<?xml version = '1.0' encoding = 'UTF-8'?>
<task-flow-registry xmlns="http://xmlns.oracle.com/adf/controller/rc">
 <task-flow-descriptor path="../../main/public_html/WEB-INF/testTaskFlow.xml" id="" type="" uses-page-fragments="false" library-internal="true" remote-invocable="false" train="false"/>
</task-flow-registry>

 

So always make sure you never check this property if you want to reuse.Or if you have parent taskflow and 5 sub taskflow which is called by parent taskflow then you can have 5 sub taskflow as
internal library but parent should be as internal library false.

Happy reusing with Vinay in techartifact

Webcenter portal 12c released. An in-depth view of Webcenter portal 12c.

Oracle releases first FMW 12c platform which also includes ORACLE WEBCENTER 12.2.1. Oracle webcenter portal changed a lot in this release. Some of the interesting features includes :

– New User Experience
responsive12c111

admin

– Responsive UI
Two OOTB Responsive Page Templates – Mosaic and Unicorn

– Rigorous stress and performance testing allowed to achieve an average response time of
-Portal composer view is completely changed. Options of draft is available.
composer

– Multiple OOTB page style.
pagestyle

– Component wiring – Wiring between consumer and producer taskflow or pass value as parameter to component or Pass values to page components using values in page URLs. This is one of most likeable features in this version.

– Rapid application integration :

rad

OOTB Integration – integration between WCP and Oracle products is available OOTB (Oracle BPM, OBIEE or IDM – now, Oracle Mobile Cloud Service (MCS) or Catalog Service – in 12c.

– Wizard-driven tools for data integration via support for REST and SQL data sources, earlier we only had sql data source. Now we can perform crud operations through REST.
sqldatasource

sqll

– OOTB and custom visualization templates
– View/Update operations support
– Visualization can participate in components wiring
– Catalog of REST APIs from OSB

– Content manager in Webcenter Portal

Previous document explorer taskflow is not present in 12c. We have new content manager. After this you don’t need separate UI for webcenter content.

– ECM in the Portal – WC Content model of managing content, DAM
– Replacement to 11g Document Library taskflows
– Access to workflows, enterprise libraries, metadata and more
– WC Content tools – Mobile Apps, DIS, WebDAV
– Pin view to a particular configuration
– Portal events and parameters
– Works only with Framework folders
– Browse, View and Find documents similar to WebCenter Content UI
– You can leverage IRM, DAM inside portal directly.
– Add metadata for each document.
– easy merging of video using embed code for videos.
– Better development of content presenter directly in jdeveloper.

document

metadata

shared asset
– Portal life cycle

-Create portal server connection to production systems and Choose a server connection and deploy a portal to it.
Deployment happens on the UI with 4 clicks. Changes to a portal is propagated in a similar fashion. Shared Assets as well as (ADF) shared Libraries are transferred to the target server. Really cool.
– All the assets associated with a portal—including global assets—are deployed or the changes are propagated
– Shared libraries—including the linked shared libraries—are optionally deployed along with a portal
– Changes since the last deployment is clearly displayed prior to propagation
– Portal managers can deploy portals in a self-service manner.
– All portal deployments are audited. That means you can verify all the deployments.
– The details can be viewed after a deployment completes.

deply

– Round trip Asset development for portal.
– Same as before. Can create following assets
Layouts
Page Styles
Page Templates
Skins
Visualization Templates(New)
Content Presenter Templates

Summary –

New technologies and standards support:
ADF 12c stack uptake (JSF2 / Jersey 2 / Oracle REST standard / Alta look & feel)
Produce and Consume REST APIs (ADF REST DC with JSON Descriptors)
Responsive UI OOTB (Twitter Bootstrap, jQuery)
Native HTML5 tag support (camera, geospatial, phone)

–REST API for portal lifecycle & deployment to a remote Server (e.g. T2P)

–Easily configure role based security (simplification of roles)

Overall its quite a new and changed version in comparison with 11g. With addition of bootstap and Rest support, it make the webcenter portal really powerful. You can download portal here.
Webcenter portal release notes

Happy Learning Webcenter Portal 12c with Vinay. Stay tuned for more posts on webcenter portal 12c.