Search This Blog

Saturday, September 24, 2016

Create WLST Project in Eclipse

Create WLST Project in Eclipse
File -> New -> Project and Select Faceted Project



Select Java -> 1.6 or 1.7



select Oracle WLST , Oracle Weblogic Utility Module Extensions , Utility Module


In the Runtime tab select Oracle Weblogic Server and click on Finish



and click on Finish 

File->New -> Select Another 


This creates test1.py with some sample code. Please change the password and the serverurl and run the project.







Tags: Publish
September 25, 2016 at 11:04AM
Open in Evernote

Thursday, September 22, 2016

How to Automate Email Server setting's for Human WorkkFlow in SOA 11g and and 12c

How to Automate Email Server setting's for Human WorkkFlow in SOA 11g and and 12c
How to Automate Email Server setting's for Human WorkFlow in SOA 11g 


First run the program

c:\jdk1.7.0_79\jre\bin\java.exe -classpath D:\fmw1117\Middleware\Oracle_SOA1\soa\modules\oracle.soa.workflow_11.1.1\bpm-services.jar;D:\fmw1117\Middleware\wlserver_10.3\server\lib\wljmxclient.jar oracle.bpel.services.notification.util.ConfigureNotification

and then run with the getConfig option , this creates a blank notification.properties with all the properties if you have n't configured email previously

c:\jdk1.7.0_79\jre\bin\java.exe -classpath D:\fmw1117\Middleware\Oracle_SOA1\soa\modules\oracle.soa.workflow_11.1.1\bpm-services.jar;D:\fmw1117\Middleware\wlserver_10.3\server\lib\wljmxclient.jar oracle.bpel.services.notification.util.ConfigureNotification localhost 7001 weblogic Welcome1 WLS notification.properties getConfig

This writes the file notification.properties in the following format ,

+++

c:\jdk1.7.0_79\jre\bin\java.exe -classpath  D:\bpm12cqs\soa\soa\modules\oracle.soa.workflow_11.1.1\bpm-services.jar;D:\bpm12cqs\wlserver\server\lib\wljmxclient.jar oracle.bpel.services.notification.util.ConfigureNotification  iscsoavm21.idc.oracle.com 7001 weblogic Welcome1 WLS notification.properties getConfig
Hostname :[iscsoavm21.idc.oracle.com] Port :[7001] AdminUser :[weblogic] AppServer :[WLS] propertyfile :[notification.properties] flag :[getConfig]
Retrieving usermessagingdriver-email-driverconfig ....
OutgoingMailServer=
OutgoingMailServerPort=25
OutgoingMailServerSecurity=None
OutgoingEmailId=
OutgoingUsername=
OutgoingPassword=
MailAccessProtocol=IMAP
IncomingMailServer=
IncomingMailServerPort=
IncomingMailServerSSL=false
IncomingEMailId=
IncomingUsername=
IncomingPassword=
ImapAuthPlainDisable=false
RetryLimit=-1
MailDelFreq=600
AutoDelete=false
Debug=false
CheckMailFreq=30
ReceiveFolder=INBOX
ProcessingChunkSize=100
Retrieving worklfow-notification-config ....
HWFMailerNotificationMode=NONE
ASNSDriverEmailReplyAddress=no.reply@yourdomain.com
ASNSDriverEmailFromAddress=accountId@yourdomain.com
ASNSDriverEmailRespondAddress=respondToaccountId@yourdomain.com
Storing the config to the properties file....
Done.

+++

Now open the notification.properties and edit the values as shown below ,

# User Messaging Email Driver config
OutgoingMailServer=localhost
OutgoingMailServerPort=25
OutgoingMailServerSecurity=None
OutgoingEmailId=bpelsender@localhost
OutgoingUsername=bpelsender@localhost
OutgoingPassword=Welcome1
MailAccessProtocol=IMAP
IncomingMailServer=localhost
IncomingMailServerPort=143
IncomingMailServerSSL=false
IncomingEMailId=bpelreceiver@localhost
IncomingUsername=bpelreceiver@localhost
IncomingPassword=Welcome1
ImapAuthPlainDisable=false
RetryLimit=-1
MailDelFreq=600
AutoDelete=false
Debug=false
CheckMailFreq=30
ReceiveFolder=INBOX
ProcessingChunkSize=100
# HWF config
HWFMailerNotificationMode=EMAIL
ASNSDriverEmailReplyAddress=no.reply@yourdomain.com
ASNSDriverEmailFromAddress=bpelsender@localhost
ASNSDriverEmailRespondAddress=bpelreceiver@localhost

Now run the command

c:\jdk1.7.0_79\jre\bin\java.exe -classpath D:\fmw1117\Middleware\Oracle_SOA1\soa\modules\oracle.soa.workflow_11.1.1\bpm-services.jar;D:\fmw1117\Middleware\wlserver_10.3\server\lib\wljmxclient.jar oracle.bpel.services.notification.util.ConfigureNotification localhost 7001 weblogic Welcome1 wls notification.properties setConfig

This will set the required properties for the Email Server Configuration.

To cross check the values you have set run with the getConfig options agian

c:\jdk1.7.0_79\jre\bin\java.exe -classpath  D:\bpm12cqs\soa\soa\modules\oracle.soa.workflow_11.1.1\bpm-services.jar;D:\bpm12cqs\wlserver\server\lib\wljmxclient.jar oracle.bpel.services.notification.util.ConfigureNotification  localhost 14001 weblogic Welcome1 WLS notification.properties getConfig

Please note that this is not available with SOA 12c.



Tags: Publish
September 15, 2016 at 03:25PM
Open in Evernote

Stop DERBY Server in a SOA Quick start Install

Stop DERBY Server in a SOA Quick start Install
Open the file $DOMAIN_HOME/bin/setDomainEnv.sh

and set DERBY_FLAG="false" by default it is set to true.

# Set DERBY_FLAG, if derby is available.

if [ -f ${WL_HOME}/common/derby/lib/derby.jar ] ; then
        DERBY_FLAG="false"
        export DERBY_FLAG
fi




Tags: Publish
September 22, 2016 at 02:54PM
Open in Evernote

Monday, September 19, 2016

Create EMAIL Server Profile in 12c

Create EMAIL Server Profile in 12c
import javax.management.openmbean.CompositeDataSupport;
if __name__ == '__main__':
    from wlstModule import *#@UnusedWildImport
print 'starting the script ....'
username = 'weblogic'
password = 'Welcome1'
url='t3://localhost:14001'
profileName='testemail'
MailAccessProtocol = 'IMAP'
OutgoingMailServer = 'localhost'
OutgoingMailServerPort = '25'
OutgoingMailServerSecurity = 'None'
OutgoingDefaultFromAddr = 'bpelsender@localhost'
OutgoingUsername = 'bpelsender@localhost'
OutgoingPassword = 'Welcome1'
IncomingMailServer = 'localhost'
IncomingMailServerPort = '143'
IncomingMailIDs = 'bpelreceiver@localhost'
IncomingUserIDs = 'bpelreceiver@localhost'
IncomingUserPasswords = 'Welcome1'
ASNSDriverEmailFromAddress='bpelsender@localhost'
ASNSDriverEmailRespondAddress='bpelreceiver@localhost'
ASNSDriverEmailReplyAddress='no.reply@yourdomain.com'
HWFMailerNotificationMode='EMAIL'
connect(username,password,url)
servers = cmo.getServers()
domainRuntime()
for server in servers:
    serverName = server.getName()
    print 'server: ' + server.getName()
    EmailProfileConfigobj = ObjectName('oracle.ucs.messaging:type=UmsDomainConfig,name=UmsDomainConfiguration')
    print 'Common Properties for soa_server1'
   
    mbs.invoke(EmailProfileConfigobj,'removeDriverConfig',[profileName,'email'],['java.lang.String','java.lang.String'])
   
    mbs.invoke(EmailProfileConfigobj,'createDriverConfig',[profileName,'email'],['java.lang.String','java.lang.String'])
    print mbs.invoke(EmailProfileConfigobj,'getDriverConfig',[profileName,'email'],['java.lang.String','java.lang.String'])
   
    EmailDriverConfigobj = ObjectName('oracle.ucs.messaging:name='+profileName+',type=UmsDomainConfig.DriverConfig,driverType=email,UmsDomainConfig=UmsDomainConfiguration')
    mbs.invoke(EmailDriverConfigobj,'setProperty',['MailAccessProtocol',MailAccessProtocol],['java.lang.String','java.lang.String'])
    mbs.invoke(EmailDriverConfigobj,'setProperty',['OutgoingMailServer',OutgoingMailServer],['java.lang.String','java.lang.String'])
    mbs.invoke(EmailDriverConfigobj,'setProperty',['OutgoingMailServerPort',OutgoingMailServerPort],['java.lang.String','java.lang.String'])
    mbs.invoke(EmailDriverConfigobj,'setProperty',['OutgoingMailServerSecurity',OutgoingMailServerSecurity],['java.lang.String','java.lang.String'])
    mbs.invoke(EmailDriverConfigobj,'setProperty',['OutgoingDefaultFromAddr',OutgoingDefaultFromAddr],['java.lang.String','java.lang.String'])
    mbs.invoke(EmailDriverConfigobj,'setProperty',['OutgoingUsername',OutgoingUsername],['java.lang.String','java.lang.String'])
    mbs.invoke(EmailDriverConfigobj,'setProperty',['OutgoingPassword',OutgoingPassword],['java.lang.String','java.lang.String'])
    mbs.invoke(EmailDriverConfigobj,'setProperty',['IncomingMailServer',IncomingMailServer],['java.lang.String','java.lang.String'])
    mbs.invoke(EmailDriverConfigobj,'setProperty',['IncomingMailIDs',IncomingMailIDs],['java.lang.String','java.lang.String'])
    mbs.invoke(EmailDriverConfigobj,'setProperty',['IncomingUserIDs',IncomingUserIDs],['java.lang.String','java.lang.String'])
    mbs.invoke(EmailDriverConfigobj,'setProperty',['IncomingUserPasswords',IncomingUserPasswords],['java.lang.String','java.lang.String'])
    props1 = mbs.getAttribute(EmailDriverConfigobj, 'Properties')
   
    for props2 in props1:
            print str(props2.get('name')) +' = ' + str(props2.get('value'))
   
    WorkflowNotificationObj = ObjectName('oracle.as.soainfra.config:Location='+serverName +',name=human-workflow,type=HWFMailerConfig,Application=soa-infra')
    mbs.setAttribute(WorkflowNotificationObj, Attribute('ASNSDriverEmailFromAddress', ASNSDriverEmailFromAddress))
    mbs.setAttribute(WorkflowNotificationObj, Attribute('ASNSDriverEmailRespondAddress', ASNSDriverEmailRespondAddress))
    mbs.setAttribute(WorkflowNotificationObj, Attribute('ASNSDriverEmailReplyAddress', ASNSDriverEmailReplyAddress ))
    mbs.setAttribute(WorkflowNotificationObj, Attribute('HWFMailerNotificationMode', HWFMailerNotificationMode))
   
    print 'HWFMailerNotificationMode' +' = '+ mbs.getAttribute(WorkflowNotificationObj, 'ASNSDriverEmailReplyAddress')
    print 'ASNSDriverEmailFromAddress' +' = '+ mbs.getAttribute(WorkflowNotificationObj, 'ASNSDriverEmailFromAddress')
    print 'ASNSDriverEmailRespondAddress' +' = '+ mbs.getAttribute(WorkflowNotificationObj, 'ASNSDriverEmailRespondAddress')
    print 'HWFMailerNotificationMode' +' = '+ mbs.getAttribute(WorkflowNotificationObj, 'HWFMailerNotificationMode')
   


Tags: Publish
September 19, 2016 at 03:45PM
Open in Evernote