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.

ipad

 

Posted in Uncategorized | Tagged , , | Leave a comment

BPM update adds Case Management Web Interface and REST APIs

Oracle has just released BPM 11.1.1.7 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:

acm

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:

bpmrest

Here is a list of the REST methods provided:

  resources base="http://slc05til.us.oracle.com:8111/bpm/services/rest/"
    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 http://www.oracle.com/technetwork/java/javase/downloads/index.html#JDK8 to download Java 8 and NetBeans 8.0.

Enjoy!

View original

Posted in Uncategorized | Leave a comment

Want a free trip to JavaOne?

Oracle Academy is pleased to be supporting the Internet of Things (IoT) Developer Challenge! This is not open to Oracle employees or their immediate families, but other readers may be interested in participating for the chance to win a pass to JavaOne 2014 plus flights and accommodation.  For further details please read the official rules.

Welcome to the Internet of Things (IoT) Developer Challenge!

Show the world what you can do with Java + IoT for a chance to win a trip to JavaOne for you and two team members.

How to Win

1. Create a well-implemented, innovative and useful application using Java Embedded with devices, boards or other IoT technologies.

2. Make a video presenting your project.

3. Fill out the Submission Form with links to your video and code.

Prizes!

Four teams will win a trip to JavaOne. Three members of the winning teams will receive a JavaOne 2014 pass plus flight and hotel (for up to $2,000). Members of two student teams will receive a laptop and a certification voucher.

Key Dates:

Submissions begin March 3rd, 2014
Submission deadline is May 30th, 2014
Winners announced June 30th, 2014
JavaOne 2014 from Sept. 28 to Oct. 2, 2014

How to Get Started? Free Training!

The Oracle Technology Network will provide eight free training sessions in March and April, and they are open to anyone. Registered attendees get a chance to win a Raspberry Pi Starter Bundle. Register now.

· Introduction Webinar, March 17th, 2014

· Gemalto Concept Board Introduction, March 24, 2014

· Using I2C Component with Raspberry Pi, March 31, 2014

Posted in Uncategorized | Leave a comment

Manipulating Human Tasks (for testing)

A few months ago, while working on a BPM migration, I had the need to look at the status of human tasks, and to manipulate them – essentially to just have a single user take random actions on them at some interval, to help drive a set of processes that were being tested.

To do this, I wrote a little utility called httool.  It reuses some of the core domain classes from my custom worklist sample (with minimal changes to make it a remote client instead of a local one).

I have not got around to documenting it yet, but it is pretty simple and fairly self explanatory.  So I thought I would go ahead and share it with folks, in case anyone is interested in playing with it.

You can get the code from my ci-samples repository on java.net:

git clone git://java.net/ci4fmw~ci-samples

It is in the httool directory.

I do plan to get back to this “one day” and enhance it to be more intelligent – target particular task types, update the payload, follow a set of “rules” about what action to take – so that I can use it for more driving more interesting test scenarios.  If anyone is feeling generous with their time, and interested, please feel free to join the java.net project and hack away to your heart’s content.

Posted in Uncategorized | Tagged , , , | 1 Comment

How to tell if the SOA Platform is running

When you start up a SOA managed server, there is a time interval when the managed server is up, but the SOA platform is not yet up. This is the time while SOA is loading all of the composites, and so on. Sometimes we want to know when SOA is actually ready, not just the managed server, but the soa-infra application. For example, if we wanted to start testing a composite, there would be no point doing that until SOA was running.

So it seems like a common requirement to be able to tell when SOA is ready. The most reliable way to do this is to check an MBean, and to make that available to an external waiting process (like a build job) we can expose the check using a simple Servlet.

In this post, we will look at how to do just that. The code in the sample is available in my git repo on java.net, you can grab it with:

git clone git://java.net/ci4fmw~ci-samples

Then look in the is-soa-running directory.

The code in this sample was written by Robert Patrick, and it is set up to build and deploy with Maven. It is written for SOA 11.1.1.7, but it will work for other versions too.

There is one library from SOA Suite that you will need to compile this code. Since we don’t have the libraries in any public Maven repository, you will need to add this library into your own Maven repository using a command like this:

mvn install:install-file
   -Dfile=/path/to/soahome/oracle_common/modules/oracle.jmx_11.1.1/jmxframework.jar
   -DgeneratePom=true
   -DgroupId=com.oracle.soa
   -DartifactId=jmxframework
   -Dversion=11.1.1.7
   -Dpackaging=jar

This will allow us to use that library in our build.

Let’s take a look at the project. We have a POM to build the project, a simple Java class to check the MBean, a simple Servlet to present the result, and some basic deployment descriptors. First, let’s look at the code that checks the MBean, this is in src/main/java/com/redstack/CheckSOAStatus.java:

package com.redstack;

/**
* @author robert.patrick
*/

import java.io.IOException;
import javax.management.MBeanServer;
import javax.management.ObjectName;
import javax.management.openmbean.CompositeDataSupport;

import oracle.as.jmx.framework.PortableMBeanFactory;

public final class CheckSOAStatus
{

  /**
   * check whether the SOA platform is running on this server
   */
  public static boolean checkStatus(String serverName) throws IOException
  {
    MBeanServer server = null;
    try {
      server = new PortableMBeanFactory().getMBeanServer();
    }
    catch (Exception e) {
      String msg = "PortableMBeanFactory.getMBeanServer() failed: " +
      e.getMessage();
      System.err.println(msg);
      e.printStackTrace(System.err);
      throw new IOException(msg, e);
    }

    ObjectName name;
    try {
      name = new ObjectName("oracle.soa.config:name=soa-infra,j2eeType=CompositeLifecycleConfig,Application=soa-infra");
    }
    catch (Exception e) {
      String msg = "Malformed Object Name: " + e.getMessage();
      System.err.println(msg);
      e.printStackTrace(System.err);
      throw new IOException(msg, e);
    }

    Boolean isReady;
    try {
      CompositeDataSupport compositeData = (CompositeDataSupport)
      server.getAttribute(name, "SOAPlatformStatus");
      isReady = (Boolean)compositeData.get("isReady");
    }
    catch (Exception e) {
      String msg = "Error getting MBean data: " + e.getMessage();
      System.err.println(msg);
      e.printStackTrace(System.err);
      throw new IOException(msg, e);
    }
    return isReady.booleanValue();
  }
}

Basically, we are connecting to the MBean server, and looking up an object named oracle.soa.config:name=soa-infra,j2eeType=CompositeLifecycleConfig,Application=soa-infra, then getting the SOAPlatformStatus attribute and then checking isReady. This gives us a true if SOA is finished starting up, or a false otherwise.

Now let’s take a look at the Servlet:

package com.redstack;

/**
* @author robert.patrick
*/
import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class CheckSOAStatusServlet extends HttpServlet
{
  public void doGet(HttpServletRequest req, HttpServletResponse res)
  throws ServletException, IOException
  {
    String serverName = System.getProperty("weblogic.Name");
    boolean status = CheckSOAStatus.checkStatus(serverName);
    if (status) {
      res.setStatus(HttpServletResponse.SC_OK);
      PrintWriter out = res.getWriter();
      out.println("<HTML><HEAD><TITLE>Check SOA Status</TITLE></HEAD>\n");
      out.println("<BODY>SOA Server on " + serverName +
      " is finished loading its composites.</BODY></HTML>");
    }
    else
      res.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE,
      "SOA Server on " + serverName +
      " is not finished loading its composites.");
    }
  }

Here we are basically just calling that class to have it check the status and reporting it back in the output. We also set the HTTP status code differently, so we can either check the text, or just the HTTP code to get the outcome.

Here is the web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app
  xmlns="http://java.sun.com/xml/ns/j2ee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  version="2.5">
  <servlet>
    <servlet-name>Check SOA Status Servlet</servlet-name>
    <servlet-class>com.redstack.CheckSOAStatusServlet</servlet-class>
    <run-as>
      <role-name>soa-admin</role-name>
    </run-as>
  </servlet>
  <servlet-mapping>
    <servlet-name>Check SOA Status Servlet</servlet-name>
    <url-pattern>/statuscheck</url-pattern>
  </servlet-mapping>
  <welcome-file-list>
    <welcome-file>/statuscheck</welcome-file>
  </welcome-file-list>
  <security-role>
    <role-name>soa-admin</role-name>
  </security-role>
</web-app>

We are just mapping the Servlet to a URL – /statuscheck in this case, and also we define a role that this Servlet needs to run as. As we can see in the WebLogic deployment descriptor, we map this to the administration user:

<?xml version="1.0" encoding="ISO-8859-1"?>
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90">
  <run-as-role-assignment>
    <role-name>soa-admin</role-name>
    <run-as-principal-name>weblogic</run-as-principal-name>
  </run-as-role-assignment>
</weblogic-web-app>

The POM is also fairly straight forward:

<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.redstack</groupId>
  <artifactId>statuscheck</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>war</packaging>
  <name>statuscheck</name>
  <dependencies>
    <dependency>
      <groupId>javax</groupId>
      <artifactId>javaee-web-api</artifactId>
      <version>6.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.oracle.soa</groupId>
      <artifactId>jmxframework</artifactId>
      <version>11.1.1.7</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>
  <build>
    <finalName>statuscheck</finalName>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.1.1</version>
        <configuration>
          <failOnMissingWebXml>false</failOnMissingWebXml>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.oracle.weblogic</groupId>
        <artifactId>weblogic-maven-plugin</artifactId>
        <version>12.1.2-0-0</version>
        <executions>
          <!--Deploy the application to the server-->
          <execution>
            <id>deploy</id>
            <phase>pre-integration-test</phase>
            <goals>
              <goal>deploy</goal>
            </goals>
            <configuration>
              <!--The admin URL where the app is deployed. Here use the plugin's default value t3://localhost:7001-->
              <adminurl>http://your.server:7001</adminurl>
              <user>weblogic</user>
              <password>welcome1</password>
              <!--The location of the file or directory to be deployed-->
              <source>${project.build.directory}/${project.build.finalName}.${project.packaging}</source>
              <!--The target servers where the application is deployed. Here use the plugin's default value AdminServer-->
              <targets>soa_server1</targets>
              <verbose>true</verbose>
              <name>${project.build.finalName}</name>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>

We set the project coordinates, and list our two dependencies – the jmxframework library we saw earlier and the Java EE WebApp API. Then we have the normal configuration to tell Maven what version of Java to use to compile this, and how to build the WAR.

The weblogic-maven-plugin entry in the build section demonstrates how you could use the WebLogic Maven Plugin’s deploy goal to deploy the WAR to a server.

Then you can simply hit http://your.server:8001/checkstatus to see if SOA is fully up and running.

Enjoy!

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