The easiest way to view it is to use an IDE like NetBeans, as shown below:
We are actively working with Maven Repository Manager and IDE teams to make this work for you across a variety of common tools you may use.
]]>Open your composite and drag a Human Task on to the composite. Hit OK, then double click on the new Human Task to open it.
In the Assignment tab, drag a Single Participant into Stage 1. Now double click on the participant and select Add User and add the weblogic user. This will route the human task to weblogic for approval.
Go to the Data tab. In the Data section, click on the green plus icon and select Add a string parameter. Hit OK to take the default name.
Now, open the BPEL process and drag in a Human Task from SOA Components. Double click on the Human Task activity to open its properties. In the Task Definition pull down box, select the Human Task you just created. Click on the “…” button in the parameters table, and assign something to the parameter. I just used one of the inputs.
Now we need to tell Maven about the MDS configuration. The simplest choice is to just use the file based MDS that is included in JDeveloper. It is already defined in the .adf/META-INF/adf-config.xml file in the SOA Application that was generated when you created the application (either with Maven or JDeveloper).
<adf-mds-config xmlns="<a href="http://xmlns.oracle.com/adf/mds/config"">http://xmlns.oracle.com/adf/mds/config"</a>>
<mds-config xmlns="<a href="http://xmlns.oracle.com/mds/config"">http://xmlns.oracle.com/mds/config"</a>>
<persistence-config>
<metadata-namespaces>
<namespace path="/soa/shared" metadata-store-usage="mstore-usage_1"/>
</metadata-namespaces>
<metadata-store-usages>
<metadata-store-usage id="mstore-usage_1">
<metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore">
<property name="metadata-path" value="${oracle.home}/integration"/>
<property name="partition-name" value="seed"/>
</metadata-store>
</metadata-store-usage>
</metadata-store-usages>
</persistence-config>
</mds-config>
</adf-mds-config>
If you are just going to be compiling on your own machine, this is going to be fine. However, if you want to be able to build the composite on another machine, like a build server, then you might want to configure MDS to point to a shared repository, like a DB-backed MDS repository that is accessible to your machine and to the build server too.
To do this, you just need to update the adf-config.xml to point to the correct MDS. Here is an example that is configured to point to a DB-backed MDS repository:
<adf-mds-config xmlns="<a href="http://xmlns.oracle.com/adf/mds/config"">http://xmlns.oracle.com/adf/mds/config"</a>> <mds-config xmlns="<a href="http://xmlns.oracle.com/mds/config"">http://xmlns.oracle.com/mds/config"</a>> <persistence-config> <metadata-namespaces> <namespace path="/soa/shared" metadata-store-usage="mstore-usage_1"/> </metadata-namespaces> <metadata-store-usages> <metadata-store-usage id="mstore-usage_1"> <metadata-store class-name="oracle.mds.persistence.stores.db.DBMetadataStore"> <property name="jdbc-userid" value="myuser_mds"/> <property name="jdbc-password" value="welcome1"/> <property name="jdbc-url" value="jdbc:oracle:thin://@my.database.server:1521/my.service.name"/> <property name="partition-name" value="soa-infra"/> </metadata-store> </metadata-store-usage> </metadata-store-usages> </persistence-config> </mds-config> </adf-mds-config>
You also need to update the POM to tell Maven where to find the adf-config.xml file. This is done with the appHome property, which needs to point the the SOA Application (not the SOA Project) directory. You can just uncomment it, as shown below:
You also need to tell Maven where your JDeveloper is installed. You can put this into the oracleHome property in the POM, or you can specify it on the command line, as shown in the example below:
C:\src2\soaApp1>mvn compile -DoracleHome=c:\bpm1213\soa
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.redstack:soaProject1:sar:1.0-SNAPSHOT
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] soaProject1
[INFO] soaApp1
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building soaProject1 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ soaProject1 ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\src2\soaApp1\soaProject1\src\main\resources
[INFO] Copying 1 resource
[INFO]
[INFO] --- oracle-soa-plugin:12.1.3-0-0:compile (default-compile) @ soaProject1 ---
[INFO] ------------------------------------------------------------------------
[INFO] ORACLE SOA MAVEN PLUGIN - COMPILE
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] ABOUT TO RUN oracle.soa.scac.ValidateComposite...
[INFO] compile: Executing: [cmd:[c:\java\jdk1.8.0_05\bin\java, -Djava.protocol.handler.pkgs=oracle.mds.net.protocol|oracle.fabric.comm
on.classloaderurl.handler|oracle.fabric.common.uddiurl.handler, oracle.soa.scac.ValidateComposite, C:\src2\soaApp1\soaProject1/SOA//co
mposite.xml, -level=1, -appHome=C:\src2\soaApp1\soaProject1/..]]
[INFO] Process being executed, waiting for completion.
[INFO] [exec] 2014-07-14 08:12:34.678/6.375 Oracle Coherence 12.1.3.0.0 <Info> (thread=main, member=n/a): Loaded operational configura
tion from "jar:file:/C:/Users/Mark/.m2/repository/com/oracle/coherence/coherence/12.1.3-0-0/coherence-12.1.3-0-0.jar!/tangosol-coheren
ce.xml"
[INFO] [exec] 2014-07-14 08:12:34.768/6.465 Oracle Coherence 12.1.3.0.0 <Info> (thread=main, member=n/a): Loaded operational overrides
from "jar:file:/C:/Users/Mark/.m2/repository/com/oracle/coherence/coherence/12.1.3-0-0/coherence-12.1.3-0-0.jar!/tangosol-coherence-o
verride-dev.xml"
[INFO] [exec] 2014-07-14 08:12:34.771/6.468 Oracle Coherence 12.1.3.0.0 <D5> (thread=main, member=n/a): Optional configuration overrid
e "/tangosol-coherence-override.xml" is not specified
[INFO] [exec] 2014-07-14 08:12:34.775/6.473 Oracle Coherence 12.1.3.0.0 <D5> (thread=main, member=n/a): Optional configuration overrid
e "cache-factory-config.xml" is not specified
[INFO] [exec] 2014-07-14 08:12:34.778/6.475 Oracle Coherence 12.1.3.0.0 <D5> (thread=main, member=n/a): Optional configuration overrid
e "cache-factory-builder-config.xml" is not specified
[INFO] [exec] 2014-07-14 08:12:34.780/6.477 Oracle Coherence 12.1.3.0.0 <D5> (thread=main, member=n/a): Optional configuration overrid
e "/custom-mbeans.xml" is not specified
[INFO] [exec]
[INFO] [exec] Oracle Coherence Version 12.1.3.0.0 Build 52031
[INFO] [exec] Grid Edition: Development mode
[INFO] [exec] Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
[INFO] [exec]
[INFO] [exec] 2014-07-14 08:12:34.890/6.587 Oracle Coherence GE 12.1.3.0.0 <Info> (thread=main, member=n/a): Created cache factory com
.tangosol.net.DefaultConfigurableCacheFactory
[INFO] [exec] Jul 14, 2014 8:13:51 AM oracle.fabric.common.wsdl.SchemaManager isIncrementalBuildSupported
[INFO] [exec] INFO: XMLSchema incremental build enabled.
[INFO] [exec] HumanTasks/Humantask1.task: warning: Task title not specified
[INFO] [exec] HumanTasks/Humantask1.task: warning: Empty Participant definition for Stage1.Participant1
[INFO] [exec] HumanTasks/Humantask1.task: warning: Task owner not specified
[INFO] [exec] HumanTasks/Humantask1.task: warning: Error assignee not specified
[INFO] [exec] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[INFO] [exec] >> modified xmlbean locale class in use
[INFO] [exec] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[INFO] compile: [cmd:[c:\java\jdk1.8.0_05\bin\java, -Djava.protocol.handler.pkgs=oracle.mds.net.protocol|oracle.fabric.common.classloa
derurl.handler|oracle.fabric.common.uddiurl.handler, oracle.soa.scac.ValidateComposite, C:\src2\soaApp1\soaProject1/SOA//composite.xml
, -level=1, -appHome=C:\src2\soaApp1\soaProject1/..]] exit code=0
[INFO] SOA COMPILE DONE
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building soaApp1 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] soaProject1 ....................................... SUCCESS [01:39 min]
[INFO] soaApp1 ........................................... SUCCESS [ 0.003 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:43 min
[INFO] Finished at: 2014-07-14T08:14:05+10:00
[INFO] Final Memory: 14M/347M
[INFO] ------------------------------------------------------------------------
C:\src2\soaApp1>
Now our compile connects to the DB-backed MDS and uses the XSDs there to build the composite with a Human Task in it. In the next post, let’s add an ADF User Interface for the Human Task and incorporate that into our Maven build as well.
]]>This is fairly simple to do – we just need to use the standard Maven archetype:generate goal and identify the SOA archetype we want to use.
There are two archetypes provided for SOA:
So let’s create a new SOA Application. Two notes on this command – first, you need to type it all on one line, or add continuation characters, and second – the archetypeRepository=local is optional – that just tells Maven not to bother looking in remote repositories for the archetype. If you leave that out, it will just take a little longer for the command to run while Maven checks for the archetype in Maven Central and any other repositories you have defined in your Maven settings.xml.
mvn archetype:generate
-DarchetypeRepository=local
-DarchetypeGroupId=com.oracle.soa.archetype
-DarchetypeArtifactId=oracle-soa-application
-DarchetypeVersion=12.1.3-0-0
You can also specify the remaining properties on the command line if you want to. In this example, we will just let Maven prompt us for them, as you see below. These are all the standard Maven properties that you would get prompted for on any archetype, except for projectName – that one is used to set the name of the SOA Project. You should make that different to the name of the SOA Application – otherwise the Maven coordinates will clash.
[INFO] Generating project in Interactive mode [INFO] Archetype defined by properties Define value for property 'groupId': : com.redstack Define value for property 'artifactId': : soaApp1 Define value for property 'version': 1.0-SNAPSHOT: : Define value for property 'package': com.redstack: : [INFO] Using property: adf = .adf [INFO] Using property: data = .data Define value for property 'projectName': : soaProject1 Confirm properties configuration: groupId: com.redstack artifactId: soaApp1 version: 1.0-SNAPSHOT package: com.redstack adf: .adf data: .data projectName: soaProject1 Y: : [INFO] ---------------------------------------------------------------------------- [INFO] Using following parameters for creating project from Archetype: oracle-soa-application:12.1.3-0-0 [INFO] ---------------------------------------------------------------------------- [INFO] Parameter: groupId, Value: com.redstack [INFO] Parameter: artifactId, Value: soaApp1 [INFO] Parameter: version, Value: 1.0-SNAPSHOT [INFO] Parameter: package, Value: com.redstack [INFO] Parameter: packageInPathFormat, Value: com/redstack [INFO] Parameter: package, Value: com.redstack [INFO] Parameter: version, Value: 1.0-SNAPSHOT [INFO] Parameter: projectName, Value: soaProject1 [INFO] Parameter: groupId, Value: com.redstack [INFO] Parameter: adf, Value: .adf [INFO] Parameter: data, Value: .data [INFO] Parameter: artifactId, Value: soaApp1 [WARNING] Don't override file C:\src2\soaApp1\pom.xml [WARNING] Don't override file C:\src2\soaApp1\src\META-INF [WARNING] Don't override file C:\src2\soaApp1\src\META-INF\jps-config.xml [WARNING] Don't override file C:\src2\soaApp1\.adf\META-INF [WARNING] Don't override file C:\src2\soaApp1\.adf\META-INF\adf-config.xml [INFO] project created from Archetype in dir: C:\src2\soaApp1 [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 13.386 s [INFO] Finished at: 2014-07-10T07:01:28+10:00 [INFO] Final Memory: 11M/298M [INFO] ------------------------------------------------------------------------
Now you can take a look in that new soaApp1 directory and you will see a new, empty SOA Application – exactly the same set of files and directories you get when you create a new SOA Application in JDeveloper.
Just for fun, you could go ahead and build a SAR by running:
mvn package
Of course, that SAR wont be terribly interesting because we have not added any SCA components to our composite yet, but nonetheless you will be able to deploy it if you want to. You will find the SAR in soaProject1/target (assuming you used the same names as I did).
Let’s open up our new application in JDeveloper and add a BPEL process to it!
In JDeveloper, select File/Import…/Maven Project. In the dialog box that appears, type in the location where your new application is located, and click on the Refresh button.
Tick the boxes for the POMs (as shown above) and click on OK. The Create Application dialog box will appear. Put in the same name and parent directory location (as shown below) and JDeveloper will create the JWS file right in the same directory. If you prefer, you can let JDeveloper copy the application to some other location – if you want to do this, make sure you tick the box next to Also import source files into application in the Import Maven Projects dialog box.
When you click on OK, JDeveloper will ask you to confirm you want to overwrite the application. Click on Yes. Don’t worry – it wont really overwrite anything, it will just go and add the JWS and JPR files.
Your new application will open in JDeveloper:
Now we are ready to add something to the application. Let’s just add a simple BPEL “echo” process. I am going to assume you are familiar with this, so here are the high level steps:
Now we have something we can deploy and look at.
At this point, you want to set up the POM with the details for your test server. You might want to use the embedded server in JDeveloper, or maybe you have a separate server to use.
Go ahead and open the pom.xml file in soaProject1 and switch to the Source view.
Here are the properties you will want to update to match your environment:
<serverUrl>http://my.server:7003</serverUrl> <user>weblogic</user> <password>welcome1</password>
While you are there, you might notice a few other useful properties you might want later on:
<overwrite>true</overwrite> <forceDefault>true</forceDefault> <regenerateRulebase>false</regenerateRulebase> <keepInstancesOnRedeploy>false</keepInstancesOnRedeploy>
Now save the POM.
We can now deploy our composite to the server using Maven. This can be done right in JDeveloper, or from the command line.
The Maven goal we want to use is pre-integration-test. This is not shown in the JDeveloper popup menu by default, so let’s go add it in. (This is a one time operation) We are going to want to use verify as well (later on) so let’s add it in to.
Right click on the POM, then select Manage Goal Profiles… In the dialog box (shown below) highligt verify and click on the little blue right arrow to add it to the selected list on the right. Then add pre-integration-test as well. Then click OK.
With that done, now we can right click on the POM and select Run Maven Goal Profile “Default” and then pre-integration-test.
To deploy from the command line, we just go to the application directory and run:
mvn pre-integration-test
Either way, you will get your composite deployed. You can go log on to FMW Control/Enterprise Manager and have a look at it.
In the next post, lets add some SCA Tests and see how we can execute them with Maven.
]]>If you hit this issue, you should log a service request with Oracle Support and ask for a patch for bug number 13088538. You will need to provide details about your JDeveloper environment, versions of plugins, etc.
Performing action Save[ from oracle.bpm.fusion.studio.editor.ProcessEditor ] Invoking command: [ from oracle.bpm.fusion.studio.editor.ProcessEditor ] Performing action Rebuild BoundaryEvents.jpr[ from oracle.bpm.fusion.studio.editor.ProcessEditor ] Invoking command: modify adf-config for soa Invoking command: [ from oracle.bpm.fusion.studio.editor.ProcessEditor ] Invoking command: Invoking command: Invoking command: Invoking command: Uncaught exception java.lang.NullPointerException net.miginfocom.layout.Grid.addLinkIDs() net.miginfocom.layout.Grid.<init>() net.miginfocom.swing.MigLayout.checkCache() net.miginfocom.swing.MigLayout.getSizeImpl() net.miginfocom.swing.MigLayout.preferredLayoutSize() o.bpm.ui.layout.MigLayout.preferredLayoutSize(MigLayout.java:114)]]>
Please note that this version does not support WebCenter, SOA and BPM development. You should continue to use 11.1.1.x for that kind of development.
]]>If you follow that example and put say a BPEL or BPMN process in your composite, or a reference to a web service, then it will all work fine. But, if you add a component that requires Metadata Services (MDS), then you will run into some trouble.
In this post, we will look at how we can expand on what we did previously so that we can handle components that require MDS. Two example are Business Rules and Human Tasks. Both of these will consume data definitions (XSDs) from MDS. If you go ahead and add one to your project, then search for “oramds” in your project, you will see the references that were added.
I will assume for this post that you know how to add a Human Task or Business Rule to your composite. Go ahead and do that now. If you do not know how, then we have an example of adding a human task here.
Once you have that taken care of, you will need to add a Maven POM to you project, as we did in the earlier post. We need to add a couple of additional items to handle building composites that include components that depend on MDS.
Here is the POM, discussion follows:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ScaProject2</groupId>
<artifactId>ScaProject2</artifactId>
<version>1.0-SNAPSHOT</version>
<scm>
<connection>scm:svn:https://[email protected]/svn/ScaProject2/trunk</connection>
<developerConnection>scm:svn:https://[email protected]/svn/ScaProject2/trunk</developerConnection>
</scm>
<dependencies>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sca-compile</id>
<phase>compile</phase>
<configuration>
<target>
<property name="scac.input" value="${basedir}/composite.xml" />
<property name="scac.application.home" value="${basedir}/.." />
<ant antfile="c:/Oracle/Middleware/Oracle_SOA1/bin/ant-sca-compile.xml"
dir="c:/Oracle/Middleware/Oracle_SOA1/bin"
target="scac" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>sca-package</id>
<phase>package</phase>
<configuration>
<target>
<property name="build.compiler" value="extJavac"/>
<property name="compositeName" value="${project.artifactId}" />
<property name="compositeDir" value="${basedir}" />
<property name="revision" value="${project.version}" />
<property name="scac.application.home" value="${basedir}/.." />
<ant antfile="c:/Oracle/Middleware/Oracle_SOA1/bin/ant-sca-package.xml"
dir="c:/Oracle/Middleware/Oracle_SOA1/bin"
target="package" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>sca-deploy</id>
<phase>deploy</phase>
<configuration>
<target>
<property name="serverURL" value="http://bpm.mark.oracle.com:7001" />
<property name="user" value="weblogic" />
<property name="password" value="welcome1" />
<property name="sarLocation" value="${basedir}/deploy/sca_${project.artifactId}_rev${project.version}.jar" />
<property name="overwrite" value="true" />
<property name="forceDefault" value="true" />
<property name="partition" value="default" />
<ant antfile="c:/Oracle/Middleware/Oracle_SOA1/bin/ant-sca-deploy.xml"
dir="c:/Oracle/Middleware/Oracle_SOA1/bin"
target="deploy" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<distributionManagement>
<!-- use the following if you're not using a snapshot version. -->
<repository>
<id>local</id>
<name>local repository</name>
<url>file:///c:/users/administrator/.m2/repository</url>
</repository>
<!-- use the following if you ARE using a snapshot version. -->
<snapshotRepository>
<id>localSnapshot</id>
<name>local snapshot repository</name>
<url>file:///c:/users/administrator/.m2/repository</url>
</snapshotRepository>
</distributionManagement>
</project>
First, notice we provide standard Maven coordinates (groupId, artifactId, version) for our project:
<groupId>ScaProject2</groupId> <artifactId>ScaProject2</artifactId> <version>1.0-SNAPSHOT</version>
Next, we have added the scac.application.home property to both the sca-compile and sca-package ‘executions.’ This needs to point to the location where the JDeveloper Application is located. For a bit of variety, this example was built on Windows 7 (64-bit Ultimate) so you can see the Windows-style filenames in the POM.
<execution>
<id>sca-package</id>
<phase>package</phase>
<configuration>
<target>
<property name="build.compiler" value="extJavac"/>
<property name="compositeName" value="${project.artifactId}" />
<property name="compositeDir" value="${basedir}" />
<property name="revision" value="${project.version}" />
<property name="scac.application.home" value="${basedir}/.." />
<ant antfile="c:/Oracle/Middleware/Oracle_SOA1/bin/ant-sca-package.xml"
dir="c:/Oracle/Middleware/Oracle_SOA1/bin"
target="package" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
Setting the scac.application.home is required when you use MDS-dependent components, as the build tasks will look for a configuration file called {scac.application.home}/.adf/adf-config.xml in order to find out where your MDS is located. If you do not set this parameter, the (ANT) build tasks will not be able to find your MDS and the build will fail.
Here we see where the POM and ADF config are located in the project:
You also need to add some details into this file to point to your MDS. Here is an example file, discussion follows:
<?xml version="1.0" encoding="windows-1252" ?>
<adf-config xmlns="http://xmlns.oracle.com/adf/config"
xmlns:config="http://xmlns.oracle.com/bc4j/configuration"
xmlns:adf="http://xmlns.oracle.com/adf/config/properties"
xmlns:sec="http://xmlns.oracle.com/adf/security/config">
<adf-adfm-config xmlns="http://xmlns.oracle.com/adfm/config">
<defaults useBindVarsForViewCriteriaLiterals="true"/>
<startup>
<amconfig-overrides>
<config:Database jbo.locking.mode="optimistic"/>
</amconfig-overrides>
</startup>
</adf-adfm-config>
<adf:adf-properties-child xmlns="http://xmlns.oracle.com/adf/config/properties">
<adf-property name="adfAppUID" value="ScaTest2-9609"/>
</adf:adf-properties-child>
<sec:adf-security-child xmlns="http://xmlns.oracle.com/adf/security/config">
<CredentialStoreContext credentialStoreClass="oracle.adf.share.security.providers.jps.CSFCredentialStore"
credentialStoreLocation="../../src/META-INF/jps-config.xml"/>
</sec:adf-security-child>
<adf-mds-config xmlns="http://xmlns.oracle.com/adf/mds/config">
<mds-config xmlns="http://xmlns.oracle.com/mds/config">
<persistence-config>
<metadata-namespaces>
<namespace metadata-store-usage="mstore-usage_1" path="/soa/shared"/>
</metadata-namespaces>
<metadata-store-usages>
<metadata-store-usage id="mstore-usage_1">
<metadata-store class-name="oracle.mds.persistence.stores.db.DBMetadataStore">
<property name="jdbc-userid" value="dev_mds"/>
<property name="jdbc-password" value="welcome1"/>
<property name="jdbc-url"
value="jdbc:oracle:thin://@localhost:1521:bpm"/>
<property name="partition-name" value="soa-infra"/>
</metadata-store>
</metadata-store-usage>
</metadata-store-usages>
</persistence-config>
</mds-config>
</adf-mds-config>
</adf-config>
The important section here is the metadata-store-usage part. In the example above you can see how a database-based MDS is defined. In this example, I have it pointing to the MDS on the SOA/BPM server where I will deploy the composite. The MDS is defined using the JDBC details to connect to the database that stores the MDS – you will have created it during the RCU (Repository Creation Utility) phase of the installation. You might not have noticed it or known what it was for – but you created a schema called DEV_MDS (or something similar) which contains your server’s MDS repository.
You can also see in the namespace entry it defines the path within the MDS repository as /soa/shared. This is the area in MDS where the common XSD schema are stored. You can browse through it and have a look at them by creating a SOA-MDS connection in JDeveloper. If you don’t know how to do that – you can find an example in this post, towards the end of the post.
If you prefer to use a file-based MDS, your adf-config.xml will need to contain a section a little more like this:
<metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore"> <property value="c:/oracle/middleware/jdeveloper/integration" name="metadata-path"/> <property value="seed" name="partition-name"/> </metadata-store>
This demonstrates using the file-based MDS repository that is included with JDeveloper. You can take a look at it by looking under your JDeveloper directory inside integration and then seed.
Once you have these two files in place, and have edited them to match your environment, you can go ahead and check in everything to Subversion, like we did in the earlier post. Make sure you get all the WSDL and XSD files and so on. You might need to go into the Pending Changes view to make sure you have everything you need. The default selections may not get everything. You can open this view from the View menu, then Team then Pending Changes.
Open the Candidates tab, click on Refresh (the little blue arrows icon), highlight anything that you will need – basically anything that is not in the classes or deploy directories, and add it using the little green plus icon.
Then go to the Outgoing tab, highlight all the files and click on the little green tick icon to commit the files to Subversion.
Set up a Hudson job, as described in the earlier post, and then run it. You should get your composite built and deployed to your server. Here is an example of my Hudson build output:
Started by an SCM change
Updating https://bpm.mark.oracle.com/svn/ScaProject2/trunk
A ScaProject2\Humantask1.componentType
A ScaProject2\.taskeditor\Humantask1_graphics.xml
A ScaProject2\xsd\Humantask1Payload.xsd
A ScaProject2\xsd\Humantask1WorkflowTask.xsd
A ScaProject2\Humantask1.task
At revision 39
Found mavenVersion 2.2.1 from file jar:file:/c:/apache-maven-2.2.1/lib/maven-2.2.1-uber.jar!/META-INF/maven/org.apache.maven/maven-core/pom.properties
Parsing POMs
[ScaProject2] $ c:\java\jdk1.6.0_25/bin/java -classpath c:\Oracle\Middleware\oracle_common\modules\oracle.mds_11.1.1\oramds.jar -cp C:\hudson\plugins\maven-plugin\WEB-INF\lib\maven-agent-2.0.0.jar;c:\apache-maven-2.2.1\boot\classworlds-1.1.jar hudson.maven.agent.Main c:\apache-maven-2.2.1 C:\hudson\war\WEB-INF\lib\hudson-remoting-2.0.0.jar C:\hudson\plugins\maven-plugin\WEB-INF\lib\maven-interceptor-2.0.0.jar 51179 C:\hudson\plugins\maven-plugin\WEB-INF\lib\maven2.1-interceptor-1.2.jar
<===[HUDSON REMOTING CAPACITY]===>channel started
Executing Maven: -B -f C:\hudson\jobs\ScaProject2\workspace\ScaProject2/pom.xml deploy
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Unnamed - ScaProject2:ScaProject2:jar:1.0-SNAPSHOT
[INFO] task-segment: [deploy]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\hudson\jobs\ScaProject2\workspace\ScaProject2\src\main\resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] No sources to compile
[INFO] [antrun:run {execution: sca-compile}]
[INFO] Executing tasks
main:
scac:
Validating composite "C:\hudson\jobs\ScaProject2\workspace\ScaProject2/composite.xml"
[scac] BPEL 2.0 validation of "testBpel2" took 189.9 milliseconds
[scac] BPEL 2.0 validation of "testBpel2sub" took 26.0 milliseconds
[scac] ### clazz: interface scaproject2.myServiceInterface
[scac] warning: in Humantask1.task: Task owner not specified
[scac] warning: in Humantask1.task: Error assignee not specified
[INFO] Executed tasks
[INFO] [resources:testResources {execution: default-testResources}]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\hudson\jobs\ScaProject2\workspace\ScaProject2\src\test\resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] No sources to compile
[INFO] [surefire:test {execution: default-test}]
[INFO] No tests to run.
[HUDSON] Recording test results
[INFO] [jar:jar {execution: default-jar}]
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] [antrun:run {execution: sca-package}]
[INFO] Executing tasks
main:
[echo] oracle.home = c:\Oracle\Middleware\Oracle_SOA1\bin/..
[input] skipping input as property compositeDir has already been set.
[input] skipping input as property compositeName has already been set.
[input] skipping input as property revision has already been set.
clean:
[echo] deleting C:\hudson\jobs\ScaProject2\workspace\ScaProject2/deploy/sca_ScaProject2_rev1.0-SNAPSHOT.jar
[delete] Deleting: C:\hudson\jobs\ScaProject2\workspace\ScaProject2\deploy\sca_ScaProject2_rev1.0-SNAPSHOT.jar
init:
scac-validate:
[echo] Running scac-validate in C:\hudson\jobs\ScaProject2\workspace\ScaProject2/composite.xml
[echo] oracle.home = c:\Oracle\Middleware\Oracle_SOA1\bin/..
[input] skipping input as property compositeDir has already been set.
[input] skipping input as property compositeName has already been set.
[input] skipping input as property revision has already been set.
scac:
Validating composite "C:\hudson\jobs\ScaProject2\workspace\ScaProject2/composite.xml"
[scac] BPEL 2.0 validation of "testBpel2" took 210.1 milliseconds
[scac] BPEL 2.0 validation of "testBpel2sub" took 29.5 milliseconds
[scac] ### clazz: interface scaproject2.myServiceInterface
[scac] warning: in Humantask1.task: Task owner not specified
[scac] warning: in Humantask1.task: Error assignee not specified
package:
[echo] oracle.home = c:\Oracle\Middleware\Oracle_SOA1\bin/..
[input] skipping input as property compositeDir has already been set.
[input] skipping input as property compositeName has already been set.
[input] skipping input as property revision has already been set.
compile-source:
[echo] deleting .class files of C:\hudson\jobs\ScaProject2\workspace\ScaProject2/SCA-INF/classes
[javac] c:\Oracle\Middleware\Oracle_SOA1\bin\ant-sca-package.xml:183: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 2 source files to C:\hudson\jobs\ScaProject2\workspace\ScaProject2\SCA-INF\classes
[mkdir] Created dir: C:\hudson\jobs\ScaProject2\workspace\ScaProject2\dist
[copy] Copying 36 files to C:\hudson\jobs\ScaProject2\workspace\ScaProject2\dist
[copy] Copying 2 files to C:\hudson\jobs\ScaProject2\workspace\ScaProject2\dist\SCA-INF\classes
[jar] Building jar: C:\hudson\jobs\ScaProject2\workspace\ScaProject2\deploy\sca_ScaProject2_rev1.0-SNAPSHOT.jar
[delete] Deleting directory C:\hudson\jobs\ScaProject2\workspace\ScaProject2\dist
[INFO] Executed tasks
[INFO] [install:install {execution: default-install}]
[INFO] Installing C:\hudson\jobs\ScaProject2\workspace\ScaProject2\target\ScaProject2-1.0-SNAPSHOT.jar to C:\.m2\repository\ScaProject2\ScaProject2\1.0-SNAPSHOT\ScaProject2-1.0-SNAPSHOT.jar
[INFO] [deploy:deploy {execution: default-deploy}]
[INFO] Retrieving previous build number from localSnapshot
Uploading: file:///c:/users/administrator/.m2/repository/ScaProject2/ScaProject2/1.0-SNAPSHOT/ScaProject2-1.0-20110527.112732-11.jar
2K uploaded (ScaProject2-1.0-20110527.112732-11.jar)
[INFO] Retrieving previous metadata from localSnapshot
[INFO] Uploading repository metadata for: 'artifact ScaProject2:ScaProject2'
[INFO] Uploading project information for ScaProject2 1.0-20110527.112732-11
[INFO] Retrieving previous metadata from localSnapshot
[INFO] Uploading repository metadata for: 'snapshot ScaProject2:ScaProject2:1.0-SNAPSHOT'
[INFO] [antrun:run {execution: sca-deploy}]
[INFO] Executing tasks
main:
[echo] oracle.home = c:\Oracle\Middleware\Oracle_SOA1\bin/..
deploy:
[input] skipping input as property serverURL has already been set.
[input] skipping input as property sarLocation has already been set.
setting user/password..., user=weblogic
Processing sar=C:\hudson\jobs\ScaProject2\workspace\ScaProject2/deploy/sca_ScaProject2_rev1.0-SNAPSHOT.jar
Adding sar file - C:\hudson\jobs\ScaProject2\workspace\ScaProject2\deploy\sca_ScaProject2_rev1.0-SNAPSHOT.jar
INFO: Creating HTTP connection to host:bpm.mark.oracle.com, port:7001
INFO: Received HTTP response from the server, response code=200
---->Deploying composite success.
[INFO] Executed tasks
[HUDSON] Archiving C:\hudson\jobs\ScaProject2\workspace\ScaProject2\pom.xml to C:\hudson\jobs\ScaProject2\modules\ScaProject2$ScaProject2\builds\2011-05-27_21-27-10\archive\ScaProject2\ScaProject2\1.0-SNAPSHOT\pom.xml
[HUDSON] Archiving C:\hudson\jobs\ScaProject2\workspace\ScaProject2\target\ScaProject2-1.0-SNAPSHOT.jar to C:\hudson\jobs\ScaProject2\modules\ScaProject2$ScaProject2\builds\2011-05-27_21-27-10\archive\ScaProject2\ScaProject2\1.0-20110527.112732-11\ScaProject2-1.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 26 seconds
[INFO] Finished at: Fri May 27 21:27:38 EST 2011
[INFO] Final Memory: 22M/333M
[INFO] ------------------------------------------------------------------------
channel stopped
Finished: SUCCESS
]]>To do this, select Preferences from the Tools menu, then select File Types in the navigation tree on the left hand side. Open the Default Editors tab on the right, find JSP Source and change the default editor to Source using the drop down box at the bottom. Then click on OK.
You can also do this for other types of files.
]]>There are a lot of benefits to organisations in using this structured modeling approach in terms of visibility into their processes, optimisation/improvement of processes, especially through approaches like LEAN or Six Sigma, and documentation and compliance, just to name a few.
Organisations who adopt this approach may wish to take their operational processes and make them available to their integration developers so that they can be automated and have their execution managed by Oracle BPM Suite. This is the focus on this post.
JDeveloper can open a process from BPA so that it can have the ‘implementation’ tasks completed and can be deployed into an execution environment. This capability is enabled by installing an add-on from the BPA installation media.
In JDeveloper, you need to select Check for Updates from the Help menu, then select the option to Install from a Local File.
Click on the Browse button and navigate to the pcbpel directory inside the addons directory in the root of the BPA 11.1.1.3 install media. Select the pcbpel_bundle.zip file and click on Open.
Then click on Next, Finish to install the add-on. JDeveloper will then prompt you to restart itself. After it restarts, repeat this same process and choose the bpm_bundle.zip and install it. After the second restart, JDeveloper is properly configured to be able to read BPMN models from BPA.
Here is an example of a simple BPMN process in BPA:
This process is part of a bid preparation process. It has four roles: Bid Manager, Architect, Writer and Reviewer. And it has some decisions points and looping.
Once a process model in BPA is in a state where we are ready to implement it, i.e. after we have done all of the necessary analysis, used the simulation capability to optimise the performance of the process, got the necessary approvals, etc., we share it by right clicking on the process background to open the popup context menu, and then selecting Share Blueprint from the SOA sub-menu.
After a few moments, BPA will ask if you want to validate the model. You must validate the model before you share it, click on Yes to continue.
The validation will run, and a report will be displayed (like the one below) to tell you if there are any issues. If your BPMN model was not correct, for example, if you had a decision point with no out paths, you would get an error here and would not be able to proceed until you fixed that error.
After you have reviewed the validation report, you can close it. A message will be displayed to let you know the process is ready to access from JDeveloper:
In JDeveloper, create a new Application to hold our process by selecting New from the Application menu. In the wizard, give your application a name, I called mine RedStackBPAExample, and choose BPM Application as the application template. Then click on Finish.
This will create a new application, containing an empty project. Now we want to open the process from BPA. To do this, we select New from the File menu. The New Gallery will be displayed, as shown below. Select BPM Tier in the Categories on the left hand side, and then select BPM Project from BPA on the right hand side. Then click on OK.
The Create BPM Project from a BPA project wizard will open. Give your project a a name. I called mine PrepareBid. Then click on the Browse button next to the BPA Server field to browse the BPA database and find a process.
Since this is a new BPA database that we have not used before, we will need to tell JDeveloper how to connect to it. Click on the green plus icon to add a new connection.
In the BPA Server Connection dialog, you will need to provide the connection details for the BPA server and database you are using. In my case, I have BPA installed on the same machine, so I can choose the Local Server option. If you have a central BPA server, you would need to choose Remote Server and provide the connection details.
You will also need to give your connect a name, I called mine RedStack, and choose the correct database from the dropdown list called Database. You will also need to provide the Username and Password to connect to BPA. If you have not set these up specifically, the defaults are system and manager respectively.
When you have completed the necessary details, press OK to continue. If you wish, you can use the Test tab to make sure you have everything correct. To do this, switch to the Test tab and press the Test Connection button. If you have set the parameters correctly you will see a message like the one below.
Now you can navigate through your database to find the process model you just shared a few moments ago. Select the model you want (as shown below) and press OK and then Finish to open it.
After a few moments, JDeveloper will open and display the process as shown below.
Now the integration developer can carry out any necessary tasks needed and deploy the process to an execution environment. In this example, he/she would just need to create the human task definition and user interfaces, update the conditions to use the outcomes of the tasks and then deploy the process. It would also be necessary to assign the roles (Bid Manager, Architect, Writer, Reviewer) to some actual users so that they could run the process.
]]>Andrew Rosson has written a helpful post (here) that provides a simple solution.
]]>Each post will contain a note to let you know what version of JDeveloper was used for that post.
If you use multiple operating systems, and a mixture of 32-bit and 64-bit (like me) then you should grab the “base install” version, which is a generic JAR file that can be installed on any platform (provided you have a supported JDK). I have installed this version on 32-bit Windows and Linux, and 64-bit Windows, Linux, Mac OS X and Solaris. If you are going to use Mac OS X, you might want to check the hints here.
]]>The process is as follows:
That’s it, all done!
]]>You can work around this issue by adding a line to the JDeveloper configuration file at <JDEV_HOME>\jdev\bin\jdev.conf as follows:
AddVMOption -Dide.user.dir=c:/jdev/jdevhome
You need to set the path name at the end to something without a space in it.
Note that this will “forget” about your old “mywork” directory, so you may want to copy your applications to the new location.
]]>I found the newly released JDeveloper 11g (the one that came with the Fusion Middleware 11g release and added SOA and WebCenter development on top of Java EE, web services, ADF, etc.) had a strange issue when building. It would place its temporary files in /var/folders/ye and use some strange characters in the temporary file names, like + for example.
The end result of all this is that you cant really build anything – somewhat limiting.
Anyway, it turns out it is a known issue, and only occurs with a certain version of Apple’s Java software, and that it is easy to fix!
You need only to add the following line to the end of your ?/Oracle/Middleware/jdeveloper/jdev/bin/jdev-Darwin.conf file:
AddVMOption -Djava.io.tmpdir=/var/tmp
After this, everything works as expected. If you have a Mac and you have not tried JDeveloper on it, I would encourage you to give it a go! The first time you see WebLogic Server fire up on the Mac, and log in to its admin console – its kinda special.
–
Also, if you didn’t catch the very discreet announcement – the Oracle database is also available for Mac OS X now – on Intel 64-bit machines. Enjoy!
]]>I attended Thomas Kurian’s Middleware General Session/Keynote, where Thomas annouced Oracle Application Grid, and talked about how the Fusion Middleware products are converging into a suite that will sit on top of the Application Grid, and power the applications that we will run on it.
As Thomas spoke, I could not help but compare the Application Grid concept to mainframe computing. I spoke to some other attendees who felt the same way. I think that we are approaching a time when distributed computing will be able to provide the same kinds of quality of service, availability, etc. as mainframe customers have enjoyed for many years. I am looking forward to playing with the Application Grid and experiencing its virtualisation, and service level/goal based management. Mike Lehmann showed us a great demo of doubling the workload on a grid, and how it automatically provisioned extra capacity in the application server tier and in the Coherence data grid tier to handle the additional workload. It even halfed the response time while running at double the transaction volume – impressive stuff.
Dave Shaffer showed us JDeveloper 11g, which he said is going to ship soon. The SCA tooling looks really good, and Dave showed us how JDeveloper has now been integrated into Oracle Enterprise Repository, to provide easier governance and service lifecycle management, right from the IDE. ADF 11g also looks good, and I think the new mobile development tools, and integration with Microsoft Office will be heavily used. Dave also told us about JDeveloper having new integration with Project Management systems, including Microsoft Project.
I also attended the Database General Session today and heard about a number of great features in the Oracle 11g database, including Advanced Compression – which can save heaps of storage, and provide faster (read) query performance, and Real Application Testing, which should ease migrations and regression testing greatly.
We saw a demonstration of how Application Express can automatically migrate (most) Oracle Forms applications to Application Express, which is fantastic, I know I talk to a lot of people who have investments in Oracle Forms, and have been wanting to understand the options for moving forward.
Also visited the Exhibition Halls, which are enormous. Was great to see how many partners show up, from the regional ones (even a few from New Zealand) through to the large multinationals like HP, IBM, EMC, VMWare and many others.
It is great to see a lot of customers and partners from New Zealand here, who have made the trip to learn more about Oracle. I hear that the hands on labs are very good, and that you can see a lot of work has been put into them to make sure that everything works – might go and take a hands on lab or two tomorrow!
]]>