Running SCA Tests from Maven

In this post, let’s look at how we can run SCA test suites from Maven.

To get started, we are going to need a test.  Let’s set up our process to add two numbers.  Go ahead and open the XML Schema for the inputs and outputs and change it to take two int’s as input and return a single int as output, as shown below:


Now update the assign activity’s copy rule in the BPEL process to add the two numbers together.  The “from” part of the copy rule should look like this:

$inputVariable.payload/client:a + $inputVariable.payload/client:b

Now, let’s define a test.

Right click on the testsuites folder, and choose Create Test Suite.  Give it a name like test_suite1.  Then the Create Composite Test wizard will open.  Click on Next twice to get to the Input Message page.  Click on Generate Sample and set the values for a and b to 1 and 2, like this:

<process xmlns="">

Click on Next and then Generate Sample again and set the output to look like this:

<processResponse xmlns="">

Click on Finish.  Now we have a test.

Next, we need to create a file.  This file is required by sca-test – regardless of whether you run it from ANT or Maven, etc.

Create a new file in your project and set up the content like this:


We also need to update the POM to tell Maven where the is located.

Open the POM, uncomment the property and make sure it points to the right file.  If you called your file and put it in the root of your project, then the example provided in the POM is the right value for you.

<!-- these parameters are used by the test goal -->
<!-- if you are using the sca-test (test) goal, you need to uncomment the following
     line and point it to your file. -->
<!--  input is the name of the composite to run test suties against -->

Now you can run the tests by executing the Maven verify goal – either in JDeveloper or from the command line.

The output will look something like this:

C:\src2\soaApp1>mvn verify
[INFO] Scanning for projects...
[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] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] soaProject1
[INFO] soaApp1
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO] ------------------------------------------------------------------------
[INFO] Building soaProject1 1.0-SNAPSHOT
[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] --- oracle-soa-plugin:12.1.3-0-0:compile (default-compile) @ soaProject1 ---
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] ABOUT TO RUN oracle.soa.scac.ValidateComposite...
[INFO] The environment variable/property 'oracle.home' is not set.
[INFO] If you want to compile a composite with a component that depends
on MDS - like a Human Task or Business Rule - AND you want to use a file
based MDS repository, you will need to specify 'oracle.home' OR update
your .adf/META-INF/adf-config.xml to point to your file-based MDS.
If you specify oracle.home it must point to the SOA Quickstart or
JDeveloper install directory with '/soa' appended to it, unless you
update the adf-config.xml to remove the reference to oracle.home.
[INFO] compile: Executing: [cmd:[c:\java\jdk1.8.0_05\bin\java,|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]]
[INFO] Process being executed, waiting for completion.
[INFO] [exec] Jul 11, 2014 9:57:39 AM oracle.fabric.common.wsdl.SchemaManager isIncrementalBuildSupported
[INFO] [exec] INFO: XMLSchema incremental build enabled.
[INFO] [exec] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[INFO] [exec] >> modified xmlbean locale class in use
[INFO] [exec] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[INFO] compile: [cmd:[c:\java\jdk1.8.0_05\bin\java,|oracle.fabric.common.classloa
derurl.handler|oracle.fabric.common.uddiurl.handler, oracle.soa.scac.ValidateComposite, C:\src2\soaApp1\soaProject1/SOA//composite.xml
, -level=1]] exit code=0
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ 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\test\resources
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ soaProject1 ---
[INFO] No sources to compile
[INFO] --- maven-surefire-plugin:2.17:test (default-test) @ soaProject1 ---
[INFO] No tests to run.
[INFO] --- oracle-soa-plugin:12.1.3-0-0:sar (default-sar) @ soaProject1 ---
[INFO] Building sar: C:\src2\soaApp1\soaProject1\target\sca_soaProject1_rev1.0-SNAPSHOT.jar
[INFO] --- oracle-soa-plugin:12.1.3-0-0:deploy (default-deploy) @ soaProject1 ---
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] setting user/password..., user=weblogic
Processing sar=C:\src2\soaApp1\soaProject1/target/sca_soaProject1_rev1.0-SNAPSHOT.jar
Adding sar file - C:\src2\soaApp1\soaProject1\target\sca_soaProject1_rev1.0-SNAPSHOT.jar
INFO: Creating HTTP connection to, port:7003
INFO: Received HTTP response from the server, response code=200
---->Deploying composite success.
[INFO] --- oracle-soa-plugin:12.1.3-0-0:test (default-test) @ soaProject1 ---
[INFO] native formatting
[INFO] native
[INFO] [<test:testRunResults compositeDN="default/soaProject1" errorCount="0" failureCount="0" testCount="1" passCount="1" inProgressC
ount="0" runId="25f6b51184bcfb61:-3d069c46:1471d21b49b:-7ffc" runName="oracle-soa-plugin-scatest" startDate="2014-07-10T16:58:02.423-0
7:00" endDate="2014-07-10T16:58:05.314-07:00" xmlns:test="<a href=";">"</a>><test:testSuite suiteName="test_suite
1"><test:testResult compositeDN="default/soaProject1!1.0-SNAPSHOT*soa_2d677f20-07e9-47bc-9448-7922926a37d5" flowId="10001" scaPartitio
nId="1" endDate="2014-07-10T16:58:05.314-07:00" startDate="2014-07-10T16:58:03.457-07:00" suiteName="test_suite1" testName="test1.xml"
testRunName="oracle-soa-plugin-scatest" testRunId="25f6b51184bcfb61:-3d069c46:1471d21b49b:-7ffc" outcome="passed" callHandlerClassNam
e=""><test:wireActionResults wireSource="bpelprocess1_client_ep"><test:assertionOutcome outcome="passed"><assertion comparisonMethod="
xml-similar" xmlns="<a href=";">"</a>>
<location key="output" callbackOperation="processResponse"/>
<part partName="payload">

<processResponse xmlns="<a href=";">"</a>>
</assertion><test:actual><test:message><test:part partName="payload"><test:content><bpel:processResponse xmlns:bpel="<a href="http://xmln">http://xmln</a>"><bpel:result>3</bpel:result></bpel:processResponse></test:content></test:part></test:me
ssage></test:actual></test:assertionOutcome></test:wireActionResults></test:testResult></test:testSuite><test:property propertyName="d
b.type" propertyValue="oracle"/><test:property propertyName="" propertyValue=""/><test:property pr
opertyName="" propertyValue="/scratch/marnelso/newsoa/final/server/soa"/></test:testRunResults>]
[INFO] C:\Users\Mark\AppData\Local\Temp\out\oracle-soa-plugin-scatest.xml
[INFO] ------------------------------------------------------------------------
[INFO] Building soaApp1 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] soaProject1 ....................................... SUCCESS [01:31 min]
[INFO] soaApp1 ........................................... SUCCESS [  0.002 s]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:38 min
[INFO] Finished at: 2014-07-11T09:58:55+10:00
[INFO] Final Memory: 15M/91M
[INFO] ------------------------------------------------------------------------

Now, if you were running this build in a CI server, like Hudson, then you could have it collect the results and chart them for you.

In the next post, let’s add some more interesting things to our SOA Application.

Posted in Uncategorized | Tagged , , , , , | 1 Comment

Creating SOA Applications using Maven

In this post, let’s look at how to create a SOA/BPM application from a Maven archetype.

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:

    This one creates a SOA Application which contains one SOA Project.  This is the equivalent of going into JDeveloper and doing File/New/Application…/SOA Application.
    This one creates a new SOA Project – it assumes that you will run it inside an existing SOA Application that you want to add another SOA Project to.  This is the equivalent of opening a SOA application in JDeveloper and then doing File/New/Project…/SOA Project.

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

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] ------------------------------------------------------------------------
[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).

Editing our Application in JDeveloper

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:

  • Double click on the soaProject1 composite to open it in the editor.
  • Drag a BPEL Process from the Components pane on to the composite.
  • Give it a name, etc.
  • Save.
  • Double click on the new BPEL process to edit it.
  • Drag an Assign activity out and drop it between the receiveInput and the callbackClient activities.
  • Double click on the Assign activity and add a new copy rule to copy the input to the output.
  • Save.

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:


While you are there, you might notice a few other useful properties you might want later on:


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.

Deploying from JDeveloper (using Maven)

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.

Deploying from the command line

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.

Posted in Uncategorized | Tagged , , , , , | Leave a comment

New Maven Support in SOA 12c

SOA 12c (version 12.1.3) has shipped now and there has been a lot of tweeting and blogging about it already, from lots of different folks, which is great!

In this post, I wanted to talk a bit about the new Maven support in SOA (and BPM) 12c.  First, let’s start with a quick overview of what is included, then we will walk through some examples (over a number of posts).

Summary of Maven features in SOA/BPM and OSB 12c:

  • Maven plugins for SOA/BPM and for OSB (ADF plugin continues to be available).
  • Maven archetypes for SOA Application, SOA Project, OSB ‘Application’, OSB Project, and OSB System Project.
  • Maven POMs for Oracle-supplied JARs that are needed for compilation, packaging, testing and deploying SOA/BPM (sar, mar, zip) and OSB (sbar) archives.
  • Documentation in the Fusion Middleware documentation library.
  • SOA Maven plugin allows you to compile (really validate, run scac), package (into a sar), deploy to a SOA Server, undeploy, and run SCA Test suites on the server.  It supports all kinds of SCA components – BPEL, BPMN, Human Task, Rules, Adapters, Mediators, etc.  And when you generate an ADF user interface project for a human task, a Maven POM is added to build that too.
  • OSB Maven plugin allows you to package (into a sbar) and deploy (publish) to an OSB Server.
  • Parent POMs provided for customisation purposes.
  • Maven POM editors in JDeveloper.
  • Ability to run Maven goals in JDeveloper or on the command line (or plug into Hudson, etc.)

Like all of our Maven support in Fusion Middleware, the first thing you need to do is go install Maven (or use the one we ship in oracle_common/modules/org.apache.maven_3.0.5), install the Sync Plugin, and run it (see this post for details).

When you run the Sync plugin’s push goal, you want to point it to your SOA (or BPM) Quickstart install directory.  I installed my BPM Quickstart in c:\bpm1213.  So I would do the following:

set PATH=c:\bpm1213\oracle_common\modules\org.apache.maven_3.0.5\bin:%PATH%
cd c:\bpm1213\oracle_common\plugins\maven\com\oracle\maven\oracle-maven-sync\12.1.3
mvn install:install-file -Dfile=oracle-maven-sync-12.1.3.jar -DpomFile=oracle-maven-sync-12.1.3.pom
mvn -DoracleHome=c:\bpm1213

After this, my Maven repository is now populated with everything I need to use Maven with SOA/BPM and OSB, and also ADF, WLS and Coherence.

In the next post, let’s talk about creating new applications/projects with the Maven archetypes.

Posted in Uncategorized | Tagged , , , , , , , | Leave a comment

Fusion Middleware 12.1.3 released

Fusion Middleware 12.1.3 is now available for download from OTN.  This release includes WebLogic Server, Coherence, ADF, SOA, OSB and BPM.

Here is the documentation site.

The download page for SOA/BPM is here.




Posted in Uncategorized | Tagged , , , , , , , , | Leave a comment

BPM Workspace for iOS on iTunes

The BPM Workspace App for iOS is now available on iTunes.  There is going to be an official announcement soon.



Posted in Uncategorized | Tagged , , | Leave a comment

BPM update adds Case Management Web Interface and REST APIs

Oracle has just released BPM Bundle Patch 3 which adds the out of the box web interface for Advanced Case Management and REST APIs for working with BPM.

The patch is available from Oracle Support, it is patch number 18072286.

The Case Management interface looks a bit like this:


And here is an example of using the REST API.  You can call the REST URL (GET) http://yourserver:port/bpm/services/rest/application.wadl to get details of the available services:


Here is a list of the REST methods provided:

  resources base=""
    resource path="processes"
      method id="getProcesses" name="GET"
    resource path="identities"
      method id="getIdentities" name="GET"
    resource path="user/{userid}"
      method id="getUser" name="GET"
    resource path="group/{groupid}"
      method id="getGroup" name="GET"
    resource path="role/{roleid}"
      method id="getRole" name="GET"
    resource path="runtime"
      method id="getRuntime" name="GET"
    resource path="tasks"
      method id="getTasks" name="GET"
    resource path="{id}/attachments"
      method id="getTaskAttachments" name="GET"
      method id="addTaskAttachments" name="POST"
    resource path="{id}/todoTasks"
      method id="getToDoTask" name="GET"
    resource path="views/{viewname}"
      method id="getViewBasedTasks" name="GET"
    resource path="actions"
      method id="performBulkActions" name="POST"
    resource path="{id}/info_request"
      method id="infoRequest" name="POST"
    resource path="{id}/attachments/{attachmentName}/stream"
      method id="getTaskAttachmentStream" name="GET"
    resource path="{id}/attachments/{attachmentName}"
      method id="deleteTaskAttachment" name="DELETE"
      method id="getTaskAttachment" name="GET"
    resource path="{id}/comments"
      method id="addTaskComment" name="POST"
      method id="getTaskComments" name="GET"
    resource path="{id}/reassign"
      method id="reassignTask" name="POST"
    resource path="{id}"
      method id="performTaskAction" name="POST"
      method id="getTask" name="GET"
    resource path="todoTask"
      method id="createToDoTask" name="POST"
    resource path="reassign"
      method id="reassignTasks" name="POST"
    resource path="{id}/delegate"
      method id="delegateTask" name="POST"
    resource path="delegate"
      method id="delegateTasks" name="POST"
    resource path="{id}/history"
      method id="getTaskHistory" name="GET"
    resource path="{id}/form"
      method id="getTaskForm" name="GET"
    resource path="views"
      method id="getViews" name="GET"

Posted in Uncategorized | Tagged , , , , , | 1 Comment

JDK 8 Now Available on OTN

Originally posted on Coherence Down Under:

Happy (belated) new year to all. Been a crazy start to the year so its been a challenge to get a detailed post going. I am working on one as we speak so watch this space.

Some exiting news overnight, JDK8 was released. See to download Java 8 and NetBeans 8.0.


View original

Posted in Uncategorized | Leave a comment