Category: Oracle

Implementation of Oracle SOA Middleware products in companies

Hi People, tonight i was invited by to participate of a Podcast Session, a community of specialists at Oracle World through the planet. I’m am very happy with this, thank you OTechTalks.

This is my presentation to them:

Title: Implementation of Oracle SOA Middleware products in companies

  • Where to start ?
  • What are the benefits ?
  • What are the difficulties ?
  • What needs to be modified ?
  • Really worth the change ?
benefits-sign-forweb change-in-business oracle_soasuite_logo images


This podcast is a reflection on the practical experience of implementing Oracle SOA Middleware products experienced by Victor Jabur ( in some Brazilian companies. Let’s talk about the main difficulties, benefits, things that need to be modified to achieve success.

How you started journey with Oracle tech ?


I started my career at Oracle World in 2005 working as a developer in the Forms and Reports platform, using the PL / SQL language in a wholesale hypermarket company called Atacadão (, later worked in a database integration project, joining two banks, REAL and Unibanco. working for TCS ( In 2007, I had my first experience of implementing Oracle SOA Products at the company Sem Parar (, a pioneer in electronic billing passages in Brazilian toll through RFID tags in windshields of vehicles, with 12.5 million transactions a month and a turnover 1.68 billion reals in the same year. With experience acquired, I started to work in the SOA implementation of many companies, such as Fleury (, a Laboratory Medicine company, Edson Queiroz ( a famous multi-brand group, WTorre (, a construction company, Port of Santos (, development of a control system access for the main Brazilian port, Porto Seguro (, vehicle insurance company, among other companies. Currently working as a Solutions Architect at Pernambucanas (, the famous Brazilian Retail company where many Oracle products are used, and the main ongoing project is the implementation of Oracle Retail, coexisting with the Legacy in Forms and Reports and communicating with other modules like EBS, BI, CRM, Government Systems, External Partners, and so on. SOA is being implemented too, along with mobile and big data initiatives, being considered one of the most innovative companies in 2014 (, even with the age of 107 years old.

Brief topic of the day

DataOrProcess graphic039 Businessman looking at Innovation plan. Business background

For many years the Oracle sold in the market your product to Graphic User Interface development, launched in 1981 under the name Interactive Application Facility (IAF), changing its name to FastForms + IAG, becomes later SQL * Forms and more later Oracle Forms. Currently, Oracle is replacing the Forms for ADF technology (Advanced Development Framework), a new way of doing Screens in Java Language. Over all these years, many companies in Brazil and the world have used this tool, All the resources that was available were the database, PL / SQL, Forms/Reports and thus the entire business rules at the company were stored in the database through procedures or directly inside the Forms screens file. The world has evolved, competitiveness is much higher and companies need to be agile to keep up your market. You need to be close to the business, by changing its rules, making partnerships with other companies. The legacy left by Forms with all the business rule on the developer’s hand is not very good for the company, the business analyst does not know very well what rules are deployed, it is not easy nor quick for change them.

Fortunately Oracle followed the evolution acquiring partner companies, evolving their products and many of them focused in the business, implementing visual business flow (Business Process Execution Language – BPEL), business rules tools arrived, isolating business rules of the source code, making it very easy and fast editing. It’s not necessary implement your screen functions from scratch, a new paradigm emerged service-oriented-architecture (SOA), where there is a service bus that (Oracle Service Bus – OSB) exposes the enterprise service catalog and then, service is reused, saving up money with development, making it easy to maintain, starting new projects more easily, because with the reuse many things are ready when we need to build a new software in the enterprise. Partner companies could not communicate in the past because of the use of different programing languages and this is possible ​now by using WebServices over the internet, through the universal language called XML (Extensible Markup Language), new partnerships can be stablished, systems can be integrated and business leveraged. Manual processes made in the past by paper, email, phone calls, spreadsheets, tickets and text messages can now be computerized through the BPM (Business Process Management), the audit trail of approvals, analysis and comments are permanently saved, the information is protected, digitalizing process is saving the paper quantity used in times where the planet claims for help. Many governments have adopted processes digitalizing solutions, there is a product called Oracle UCM (Universal Content Management) that stores documents, even confidential, digitally signed with personal digital certificates, reducing fraud of manual signatures. Customers with mobile phones always is communicating with the companies: using the service channel to pay their bills, to buy products, ask for some support or share information. Smart shopping recommendation systems send messages to customers, encouraging them to buy. Really new times came, the technology has evolved, things are faster and who’s out of this process lose customers to the competitioners.

Said that, it is natural that many companies will want to apply these concepts, but where to start ? An important recomendation is that SOA is a concept, not a suite of tools that you can buy, install and all will be ok. Many companies are failing for not paying attention at this point. A cultural change is necessary, business leaders should take the lead and map very well their business processes, modelling the entities of your company, XML schemas known as Canonical Model, the developer no longer owns the business rules in the company, a renewal is required, the staff in many cases need to be replaced by others, with a more appropriated skills, if the company does not have an architecture team, this is a good start, create a team that advise the business people on how to things work, designing simple solutions to resolve complex problems. Oracle offers an excellent product, known as Soa Suite, a complete tool, with many effective resources, but alone it is not possible to cause any change at the company.

This work can start in a incremental way, with a little pilot of an important flow for the company and when the benefits have been demonstrated, the adoption can be increased for other projects of the company. You can start with the design of the business flows, modeling the corporate entities, electing candidates to become services, which in fact are reusable and increases value to the company, the business rules are created in the appropriated tool, then the previously flows designed can be implementated using BPEL languange for example, manual processes can be implemented in BPM, sensors measuring the business flows are installed, generating real time dashboards for business team, enabling them to act proactively to achieve the goals, for example, if the sale is not good and dashboards are indicating the bad scenario, promotions can be launched, actions are taken to encourage the sale in the shop and the situation can be reverted, as opposed to look at sales reports at end of the day or month and to check that the goal was not reached, proactivity is the keyword. Another common difficulty is that the SOA suite ships with many products (BPEL, BPM, OSB, BAM, ADF), people get lost, do not know what is the role of each product, implementing more things that should on a specific product. Here’s a tip on what and how to implement each module:

  • OSB: It should contain generic, reusable web services without any business rule, only routing and enrichment of messages.
  • BPEL: Light business flows, more complex rules must be implemented in any programming language and should be exposed as a service for a bpel flow orchestration, this flow represent the business, and not contain details of development implementation.
  • BPM: It must contain only the manual business flow, without business rules, it must rely on previously services made, almost never access directly the database, generally require notification services, whether e-mail, sms, social networking and others.
  • BAM: Monitoring Dashboards cannot cause overhead on the transactional database to generate the graphics, the necessary information should be used as an asynchronous messaging, sensors embedded in bpels or a replicated database to make the queries.
  • ADF: Framework that will replace Forms in the near future, screens are written in Java using Java Server Faces (JSF), all new Oracle products are already made using adf, enterprise manager for example. In BPM Suite, adf is widely used, because the screens are automatically generated in this product.

What is gained by doing this all worth it ?


The advantages are an I.T. department that speaks the language of business, saving money through reuse, automating manual processes that before were exposed to errors, agility for the company, fast changing their business rules reaching the necessary time to market, flexibility and high availability for all of these products work in auto scalable clusters ensuring maximum stability to the customer, ease of communication with external partners, security in communication and many other benefits.

What is needed to do this ?

A financial investment for the acquisition of software and hardware needed
Be aware that a culturally change is required in the company.
Relocate, demit, requalify and hire new people.
Rely on the expertise of qualified professionals to advise the company.
Breaking paradigms and accepting some risks.

What do you feel makes Oracle Users community special ?

Oracle is a large company present in many countries and special in this community is just it. The interaction with many cultures, and learning technology, you gain life experience.


If you could magically suggest all of your Oracle community members one thing in this world, what would it be, and why ?

I suggest that community members to create a personal blog, because of it i was invited to this podcast, invited to be a become a tecnical review of a book about Oracle ADF in last year and i often known people that come in at my blog of other countries. I feel very good about being helpful to people around the world.

For someone new to Oracle , how do they get the most out of it ? or how they should start a career in Oracle Middleware ?

There are many books about many products of Oracle Technology, mainly mostly books from Packt Publishing who is doing an excellent job around the world launching many books, written by members of the Oracle community around the world. For more senior people i recommend that they open schools and courses that offer Oracle Technology, my work friend try this here at Brazil ( and and it is success, training many people that offer more quality work for the Brazilian companies.

Thank you to OTechTalks to invite me for this Podcast Session. It was a pleasure to share my knowledge with the world, i am very happy with this.


Victor Jabur


Spring Batch Partitioner – Case Study with SourceCode – Best Practices

I’m writing this post because i report a bug at Spring Community Jira, this is the link:

I started a sample project which could reproduce the problem to show the community what I was experiencing, but to my surprise I was using the partitioner feature incorrectly. I am writing this post to share what I learned throughout this experience to help those who are going through the same questions.

My Goal: I wanted to use the resource partitioner for parallel processing but was worried to use the primary key of the table (column ID) because my table has gaps (id column is not incremental) and for this reason the partitioner would distribute number of different records for each thread, thus being inefficient in their distribution.

For example:

This is the good example partitioner:

Suppose that my table has the following records: Ids 1, 8, 9,10 11, 12, 13, 14, 15.

min: 1

max: 15

gridSize = number of threads = 2 in this example

target size calculation: int targetSize = (max min) / gridSize + 1;

(15 – 1) / 2 + 1 = 8

In this example:

Thread number 1 will receive to process: 1 to 8

Thread number 2 will receive to process: 9 to 16

The Problem: Thread 1 receives only two records to process (The Id’s 1 and 8) and the thread 2 will receive 7 records to process. At this case the partitioner to split incorrectly number of records between threads.

My Goal: I want to split the number of records equally between all threads.

Where I was going wrong: To achieve my goal I tried to use a query that makes use of rownum and / or ntile oracle feature, the goal was to use the split an id that is sequential, with no gaps in the id column table, so the load would be uniform among the threads. The JdbcPagingItemReader class can not be used with multithreaded characteristics using Oracle ROWNUM because the query is partially executed multiple times in the database and there is no guarantee that all records are processed because a confusion of Ids between threads occurs.

 The correct way: You can use JdbcPagingItemReader using the Primary Key column (may be single or multiple columns) or JdbcCursorItemReader can use both the PK column or  Rownum / NTILE to do division.

Why use JdbcCursorItemReader not cause problems of mistaken IDs or lost records ?

This class executes the query once the database and will use chunk mode to fetch the records as needed. If you use a rownum column in this case will not cause data loss because every query is processed only once in the database.

To illustrate and facilitate understanding, I created a design example set with various possible configurations available here:


GitHub Example Project:

Here are the sql scripts to create the database tables used in this poc:

  1. JdbcCursorItemReader-OracleNtile – It works
  2. JdbcCursorItemReader-OracleRownum – It works
  3. JdbcPagingItemReader-OracleNtile – It not works, don’t use this. PagingReader does not work with NTile
  4. JdbcPagingItemReader-OracleRownum – It not works, don’t use this. PagingReader does not work with Rownum
  5. JdbcPagingItemReader-TablePrimaryKey – It works, but the records aren’t distributed in an uniform way (same quantity for each thread)

What is Oracle NTile ?
This feature of Oracle Database can create a desired number of containers so that each thread can consume one. For example: I have 1000 records in the database to be divided among 10 threads:


With this query, you can use the column “CONTAINER_COLUMN”, values are already pre split into buckets ready to be divided among the various threads.

This is the documentation with more clarified explanation:

That’s it.

Any question or suggestion is very welcome.

Credits to this post:

Victor Jabur

How to consume a WebService that uses Ws-Security Authentication (UsernameToken) – OWSM – Oracle Service Bus (OSB)


The Oracle Service Bus (OSB) allows to enable OWSM authentication, there is many policies that can be applied to the Proxy Service to turn on security authentication. The most basic of this policies is:

oracle / wss_username_token_service_policy

Requiring only a username and password. Once enabled this security, following a tip on how to make a request using a Java Client.

File: – This is a main class to make a request

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.GregorianCalendar;
import java.util.List;

import javax.xml.datatype.DatatypeConstants;
import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.XMLGregorianCalendar;

public class MainPost {

	public static void main(String[] args) {

		try {

			MyService service = new MyService();
			MyServicePort myServicePort = service.getMySoapPort();

			// This is the block that apply the Ws Security to the request
			BindingProvider bindingProvider = (BindingProvider) myServicePort;
			List<Handler> handlerChain = new ArrayList<Handler>();
			handlerChain.add(new WSSecurityHeaderSOAPHandler("myUsername", "myPassword"));

			RequestType myRequest = new RequestType();

			ResponseType response = myServicePort.searchSomething(myRequest);

		} catch (Exception e) {

File: – This is a handler responsible for creating the header authentication.

import java.util.Set;

import javax.xml.namespace.QName;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPHeader;

public class WSSecurityHeaderSOAPHandler implements SOAPHandler<SOAPMessageContext> {

 private static final String SOAP_ELEMENT_PASSWORD = "Password";
 private static final String SOAP_ELEMENT_USERNAME = "Username";
 private static final String SOAP_ELEMENT_USERNAME_TOKEN = "UsernameToken";
 private static final String SOAP_ELEMENT_SECURITY = "Security";
 private static final String NAMESPACE_SECURITY = "";
 private static final String PREFIX_SECURITY = "wsse";

 private String usernameText;
 private String passwordText;

 public WSSecurityHeaderSOAPHandler(String usernameText, String passwordText) {
 this.usernameText = usernameText;
 this.passwordText = passwordText;

 public boolean handleMessage(SOAPMessageContext soapMessageContext) {

 Boolean outboundProperty = (Boolean) soapMessageContext.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);

 if (outboundProperty.booleanValue()) {

 try {
 SOAPEnvelope soapEnvelope = soapMessageContext.getMessage().getSOAPPart().getEnvelope();

 SOAPHeader header = soapEnvelope.getHeader();
 if (header == null) {
 header = soapEnvelope.addHeader();

 SOAPElement soapElementSecurityHeader = header.addChildElement(SOAP_ELEMENT_SECURITY, PREFIX_SECURITY,

 SOAPElement soapElementUsernameToken = soapElementSecurityHeader.addChildElement(SOAP_ELEMENT_USERNAME_TOKEN, PREFIX_SECURITY);
 SOAPElement soapElementUsername = soapElementUsernameToken.addChildElement(SOAP_ELEMENT_USERNAME, PREFIX_SECURITY);

 SOAPElement soapElementPassword = soapElementUsernameToken.addChildElement(SOAP_ELEMENT_PASSWORD, PREFIX_SECURITY);

 } catch (Exception e) {
 throw new RuntimeException("Error on wsSecurityHandler: " + e.getMessage());


 return true;

 public void close(MessageContext context) {
 // TODO Auto-generated method stub

 public boolean handleFault(SOAPMessageContext context) {
 // TODO Auto-generated method stub
 return true;

 public Set<QName> getHeaders() {
 // TODO Auto-generated method stub
 return null;

Xml Request: This is the payload request that Java Client request to the server.

<soapenv:Envelope xmlns:soapenv="">
 <wsse:Security xmlns:wsse="">
 <wsse:Password Type="">myPassword</wsse:Password>

Utilitário para geração de TrustStore (JKS) – Java

Olá Pessoal,

Desenvolvi um utilitário que transforma um arquivo zip, contendo “n” certificados de Autoridades Certificadoras para um arquivo JKS.

Para referência segue um link que contém todas as CA’s brasileiras:

Como seria o processo normal ?

1 – Java Keytool –
É um software que acompanha a máquina virtual Java (jdk), utilizado para diversas finalidades com relação à segurança de aplicações e pode ser usado para gerar o pacote JKS.
Seguem dois comandos exemplo para se trabalhar com arquivos JKS de truststore:

1. Listando todos os certificados contidos em um arquivo JKS:

keytool –list –v –keystore C:\meukeystore.jks

2. Importando um certificado de uma AC para dentro de um JKS pré-existente

keytool –import –trustcacerts –file C:\certificadoAC.cer –alias apelidoentrada –keystore C:\meutruststore.jks

Observação: Caso não exista um jks no diretório especificado em -keystore, será criado um automaticamente.
O arquivo especificado na URL anteriormente, possui atualmente 84 certificados, portanto, deve-se executar o comando (2), 84 vezes, alterando o -alias e o –file. Por ser esta uma forma muito trabalhosa de se gerar um arquivo Trusted JKS, foi criado um utilitário que auxiliará nesta etapa, apresentado no próximo capítulo.

2 – Usando o utilitário – utilitarioTrustJKS.jar
O utilitário desenvolvido basicamente recebe como entrada um arquivo zip com todos os certificados desejados e gera um arquivo trust.jks.
Parâmetros de Entrada:
1 – caminhoZip – Diretório do arquivo zip que contém todos os certificados das AC’s
2 – caminhoSaida – Diretório de saída, onde será gerado o truststore.jks
3 – senhaKestore – Senha do arquivo TrustStore JKS
4 – incluirExpirados (opcional) – valor default => false) – Possui os valores true ou false. Informa se certificados expirados ou não válidos ainda deverão ser incluídos no arquivo JKS gerado.

Exemplo de utilização:

java -jar utilitarioTrustJKS.jar C:\ C:\truststore.jks 123456789 true

Link para Download do arquivo Jar:

import java.util.LinkedList;
import java.util.List;

import com.sun.xml.internal.messaging.saaj.util.ByteInputStream;

public class Main {

	private String caminhoZIP = "C:\\";
	private String caminhoSaida = "C:\\truststore.jks";
	private String senhaKeystore = "123456789";
	private Boolean incluirExpirados = false;

	public static void main(String[] args) throws Exception {
		Main main = new Main();
		List<X509Certificate> listaCertificadosValidos = main.getListaCertificadosValidos();
		System.out.println("Arquivo JKS gerado com sucesso - " + listaCertificadosValidos.size() + " certificados incluidos");

	public void validarParametrosEntrada(String[] args){
		if(args.length < 3){
			throw new RuntimeException("O numero minimo de parametros = 3. caminhoZip caminhoSaida senhaKeystore e incluirExpirados (Opcional) ");
			String caminhoZip = args[0];
			validacaoLeituraArquivo(new File(caminhoZip));
			this.caminhoZIP = caminhoZip;
			String caminhoSaida = args[1];
			this.caminhoSaida = caminhoSaida;
			String senhaKeystore = args[2];
			this.senhaKeystore = senhaKeystore;
			if(args.length >= 4){
				String incluirExpirados = args[3];
				if(incluirExpirados.equals("true") || incluirExpirados.equals("false")){
					this.incluirExpirados = Boolean.valueOf(incluirExpirados);
					throw new RuntimeException("O parametro incluirExpirados (4) deve ser true ou false");
	public List<X509Certificate> getListaCertificadosValidos() {
		File arquivoZipEntrada = new File(this.caminhoZIP);
		List<X509Certificate> x509CertificateList = new LinkedList<X509Certificate>();
		try {
			InputStream in = new FileInputStream(arquivoZipEntrada);
			ZipInputStream zipInputStream = new ZipInputStream(in);

			ZipEntry zipentry = zipInputStream.getNextEntry();
			while (zipentry != null) {
				byte[] buffer = new byte[(int) zipentry.getSize()];
				int offset = 0;
				int numRead = 0;
				while (offset < buffer.length && (numRead =, offset, buffer.length - offset)) >= 0) {
					offset += numRead;
				InputStream bis = new ByteInputStream(buffer, 0, buffer.length);
				CertificateFactory cf = CertificateFactory.getInstance("X.509");
				X509Certificate cert = (X509Certificate) cf.generateCertificate(bis);
				try {
				} catch (CertificateExpiredException e) {
						System.out.println("Certificado Expirado - " + zipentry.getName());
						System.out.println("Certificado Expirado - " + zipentry.getName() + " - nao sera adicionado no JKS");
				} catch (CertificateNotYetValidException e) {
						System.out.println("Certificado não válido ainda - " + zipentry.getName());
						System.out.println("Certificado não válido ainda - " + zipentry.getName() + " - nao sera adicionado no JKS");
				zipentry = zipInputStream.getNextEntry();
		} catch (Exception e) {
		return x509CertificateList;

	public OutputStream gerarJKS(List<X509Certificate> listaCertificados){
		OutputStream out = null;
		try {
			KeyStore keystore = KeyStore.getInstance(KeyStore.getDefaultType());
			keystore.load(null, null);
			int indice = 0;
			for (X509Certificate cert : listaCertificados) {
				keystore.setCertificateEntry("ac_" + indice, cert);
			File jks = new File(this.caminhoSaida);
			String diretorioDestino = jks.getParent();
			new File(diretorioDestino).mkdirs();
			out = new FileOutputStream(this.caminhoSaida);, this.senhaKeystore.toCharArray());
		} catch (Exception e) {
			throw new RuntimeException("Erro ao gerar o arquivo de Keystore - " + e.getCause() + " - " + e.getMessage());
		return out;
	public void validacaoLeituraArquivo(File arquivo) {
		if (!arquivo.exists()) {
			throw new RuntimeException("Arquivo Inexistente - " + arquivo.getAbsolutePath());
		if (!arquivo.canRead()) {
			throw new RuntimeException("Sem permissão de Leitura do Arquivo - " + arquivo.getAbsolutePath());

Victor Jabur

How to access server MBean properties at weblogic 11g using Java – JMX


If you want to get any property of Admin or Managed Server (Weblogic) using Java, then this post will help you.

The Oracle Enterprise Manager have a useful tool for explore MBean (System MBean Browser).

As you can see in the picture bellow:

Do you can to capture any server property desired with these java code:

1 – Reading a property if the application is deployed at server (local connection)

import javax.naming.InitialContext;

String serverName = System.getProperty("weblogic.Name");
InitialContext ctx = new InitialContext();
MBeanServer server = (MBeanServer)ctx.lookup("java:comp/env/jmx/runtime");
ObjectName objName = new ObjectName("com.bea:Name=" + serverName + ",Type=Server");
String pathJKS = (String) server.getAttribute(objName, "CustomTrustKeyStoreFileName");

2 – Reading a property if the application is remote (remote connection)

import java.util.Hashtable;
import javax.naming.Context;

  public static void main(String [] args) throws Exception{
    String serverName = "AdminServer";
    String hostName = "";
    String username = "weblogic";
    String password = "welcome1";
    int port = 10000;
    String protocol = "t3";
    String jndiroot = "/jndi/";
    String mserver = "";
    JMXServiceURL serviceURL = new JMXServiceURL(protocol, hostName, port, jndiroot + mserver);
    Hashtable h = new Hashtable();
    h.put(Context.SECURITY_PRINCIPAL, username);
    h.put(Context.SECURITY_CREDENTIALS, password);
    h.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES, "");
    JMXConnector connector = JMXConnectorFactory.connect(serviceURL, h);
    ObjectName objName = new ObjectName("com.bea:Name=" + serverName + ",Type=Server");
    String pathJKS = (String) connector.getMBeanServerConnection().getAttribute(objName, "CustomTrustKeyStoreFileName");

In the cases above, i’m reading a property that is called “CustomTrustKeyStoreFileName”, that’s a string path of the Trusted Keystore. But many and many properties could be read, for example:

  • CustomIdentityKeyStoreFileName
  • ListenPort
  • UploadDirectoryName

That’s it.

Victor Jabur

Working with Expiration Human Task on Oracle Soa Suite 11g


I had that to implement an expiration process and go to leave the main steps here:

1- Creating a new Application: File -> New -> Generic Application -> ApplicationExpirationHT
2- Adding a project to application: Project Name: ProjectExpirationHT Project Type: SOA
3- Select: Empty Composite and click at Finish
4- Make a drag and drop of BPEL Process to your composite.xml screen PS: Choose One Way BPEL Process on template combobox
5- Go to file BPELProcess1.bpel in design mode and drag and drop a Human Task Component
6-Double Click in the green human task icon, click at the green plus button
7-Add a Task parameter, for this example i will make the default input parameter (string), that i will use to set the time of expiration (on duration format)
8-Here goes the magic point; Add the custom outcome action called “EXPIRED”
9-This is the final configuration screen. Your screen should like this:
10-Edit your Humantask1.task file and add an user assignment (weblogic is the default user)
11-This is the main configuration for the task expiration (Deadlines): Check “Expire After” and select the task parameter that exists in your payload variable, for this example is inputstring (/task:task/task:payload/task:Parameter1)
12-This is the final step, when your task expires, will be enter on Expired branch and you could make other things when the task expires
Important Tips-

  1. Your payload parameter should be in a DURATION Format, here is an example (P0Y0M0DT0H0M0S). Here is more details about this default type:
  2. When you set the Deadlines on your .task file, the expression for duration should be a parameter of your payload, because the rest of task parameters is READ-ONLY
  3. If your bpel is already created and you want to add the expiration validation, don’t worry, you cannot to recreate all flow, it is enough to add a new branch, copy of the others outcomes expressions and change the status task to EXPIRED, it works !
That is it people, if have any question, invite a email for me or better, add commentary for this post and i can help you !

How to capture the Task programmatically through Managed Bean (Adf – Soa Suite – Human Task)


This is another useful code that lets you to capture the task with full attributes from your Java Class (Managed Bean).


public TaskImpl getCurrentTaskFromWorkflow() throws WorkflowException {
    TaskImpl task = null;
    Map parameters=AdfFacesContext.getCurrentInstance().getPageFlowScope();
    IWorkflowServiceClient wfSvcClient = WorkflowService.getWorkflowServiceClient();
    ITaskQueryService queryService = wfSvcClient.getTaskQueryService();
    String contextId = (String)parameters.get("bpmWorklistContext");
    IWorkflowContext context = queryService.getWorkflowContext(contextId);
    String taskId = (String)parameters.get("bpmWorklistTaskId");
    String strTaskVersion = (String)parameters.get("bpmWorklistTaskVersion");
    if(taskId != null){
        int taskVersion = 0;
        if(strTaskVersion != null && !strTaskVersion.trim().equals("")){
                taskVersion = Integer.parseInt(strTaskVersion);
            } catch(NumberFormatException exc){
                taskVersion = 1;
        if(taskVersion == 0){
            task = (TaskImpl)queryService.getTaskDetailsById(context, taskId);
            task = (TaskImpl)queryService.getTaskVersionDetails(context, taskId, taskVersion);
    return task;