Wednesday, November 12, 2014

step by step installation of Oracle SOA / BPM /OSB 12c



Step1:

 Download Oracle BPM / SOA 12 C and Java latest version

Links to download SOA/ BPM 12c and Java

      You will see below JAR files after extracting the downloaded File
                      .  fmw_12.1.3.0.0_soa_quickstart.jar
                      .  fmw_12.1.3.0.0_soa_quickstart2.jar


Step 2: 

 Go to Command prompt as Administrator:




3.  Option1:
                   Install Java and add the path to Environment Variable. 
                    Go to downloaded SOA Jars location and type the following:

                     java -jar fmw_12.1.3.0.0_bpm_quickstart.jar


     Option2 :

                        Go to java bin folder where you have installed latest JDK
                        In my case it is C:\Program Files\Java\jdk1.8.0_25\bin

                        type  java -jar C:\SOA\12C\fmw_12.1.3.0.0_bpm_quickstart.jar

Further proceed with Installer:










Monday, November 10, 2014

Issue with Out of the Box Flex Fields / Custom Flex Fields in Oracle BPM 11 G


 Oracle BPM installed Version: 11.1.1.7.0.

  Red Color – default Flex Fields

  Creator and Outcome fields are showing empty here.

If I change the Order and make the first field as Outcome, then it has shown the Values


Changed the Order for Creator and Outcome - disappeared


Finally come to know that  “This is known bug and apply patch provided by Oracle.”
After the Patch applied, I can see the Flex Fields as expected. 

PURGE BPEL / BPM Instances


Read the Product documentation and implement accordingly. This is just a sample.

There are some limitations.

. If you use the purge_soainfra_oracle.sql PL/SQL script provided in releases before 11g Release 1 (11.1.1.4), note that this script is only supported on Oracle databases. There is no purge script support on the Microsoft SQL Server or IBM DB2 database, either with the purge_soainfra_oracle.sql purge script or with the newer purge script provided with release 11g Release 1 (11.1.1.4 or later). Only Oracle databases are supported.


Below are the steps to Purge / clean up the instances

Step1 : There are SQL scripts provided by Oracle as part of RCU installation

Below is the Path to findout the SQL Scripts
/lapps/Oracle/Middleware/Oracle_SOA1/rcu/integration/soainfra/sql/soa_purge

Step2: Grant the privileges to the “<DEV_SOAINFRA> (Name of your schema) “user, then login to the <DEV_SOAINFRA> schema.

SQL> GRANT EXECUTE ON DBMS_LOCK TO <DEV_SOAINFRA>;
Grant succeeded.
SQL> GRANT CREATE ANY JOB TO <DEV_SOAINFRA>;
Grant succeeded.

Step3: Check the Procedures available or not. If you are trying this for the first time then probably you need to run the Script to install the Procedure

SQL> <Oracle SOA Home>/rcu/integration/soainfra/sql/soa_purge/soa_purge_scripts.sql
Procedure created.
Function created.
Type created.
Type body created.
PL/SQL procedure successfully completed.
Package created.
Package body created.

Step4: You can customize the according to your Purging strategy.
             Below is the Parallel script available in Oracle Documentation:

DECLARE
   max_creation_date timestamp;
   min_creation_date timestamp;
   retention_period timestamp;
  BEGIN
   min_creation_date := to_timestamp('2010-01-01','YYYY-MM-DD');
   max_creation_date := to_timestamp('2010-01-31','YYYY-MM-DD');
   retention_period := to_timestamp('2010-01-31','YYYY-MM-DD');

    soa.delete_instances_in_parallel(
     min_creation_date => min_creation_date,
     max_creation_date => max_creation_date,
     batch_size => 5000,
     max_runtime => 60,
     retention_period => retention_period,
     DOP => 3,
     max_count => 1000000,
     purge_partitioned_component => false);

 END;

Purging instances filtered by name of the composites

CREATE OR REPLACE
PROCEDURE DELETE_OLD_INSTANCES
AS
TYPE PROCESS_ARRAY_TYPE IS VARRAY (2) OF VARCHAR (50);
  FILTER INSTANCE_FILTER:= INSTANCE_FILTER ();
  PROCESS_ARRAY PROCESS_ARRAY_TYPE;
  MAX_INSTANCES          NUMBER;
  DELETED_INSTANCES      NUMBER;
  PURGE_PARTITIONED_DATA BOOLEAN: = TRUE;
  DAY_OFFSET             NUMBER;
BEGIN
  DBMS_OUTPUT.put_line('----- BEGIN '|| SYSDATE ||'----------------');
  FILTER.COMPOSITE_PARTITION_NAME:='default';
  PROCESS_ARRAY           := PROCESS_ARRAY_TYPE('Composite Name1',
'Composite Name 2',
'Composite Name N');
  DAY_OFFSET   := 7;
  FILTER.MIN_CREATED_DATE:= TO_TIMESTAMP ('2010-01-01','YYYY-MM-DD');
  FILTER.MAX_CREATED_DATE:= SYSDATE - DAY_OFFSET;
  MAX_INSTANCES           := 5000;

  FOR i  IN PROCESS_ARRAY.FIRST..PROCESS_ARRAY.LAST
  LOOP
  FILTER.COMPOSITE_NAME := PROCESS_ARRAY(i);
    DBMS_OUTPUT.put_line(' FILTER.COMPOSITE_NAME '|| FILTER.COMPOSITE_NAME);
    DELETED_INSTANCES := FABRIC.DELETE_COMPOSITE_INSTANCES(
FILTER => FILTER,
MAX_INSTANCES => MAX_INSTANCES,
PURGE_PARTITIONED_DATA => PURGE_PARTITIONED_DATA);
    DBMS_OUTPUT.put_line('DELETED_INSTANCES: ' || DELETED_INSTANCES); 
  END LOOP;
  DBMS_OUTPUT.put_line('---------BEGIN '|| SYSDATE ||'---------');
  END DELETE_OLD_INSTANCES;

Step 5: Space recovery is not included in the Purge Script. Since this is part of Database Maintenance task.
 Following sample instructions can help in space recovery:

Running PL/SQL to release Space:

alter table <TABLE_NAME> deallocate unused;
alter table <TABLE_NAME> enable row movement;
alter table <TABLE_NAME> shrink space;

For more information, refer the Oracle Documentation:

Thursday, September 18, 2014

The function "getResourceValue" for prefix "wf" can not be found in the specified tag library.

Solution:
1. Check the JSPX page that the following namespace is available or not. Otherwise add this tag in jsp:root.
 xmlns:wf="http://xmlns.oracle.com/bpel/workflow/workflow-taglib.tld"

<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
          xmlns:f="http://java.sun.com/jsf/core"
         xmlns:wf="http://xmlns.oracle.com/bpel/workflow/workflow-taglib.tld">

2. Still you have an issue?
Go to "Project Properties" --> "JSP Tag Libraries" --> check "workflow Tags 1.0" available or not.
Otherwise "add"  --> "Workflow Tags 1.0" -->"ok"


Sunday, September 14, 2014

Confirmation Dialog when clicking on REJECT/ CANCEL button in Oracle BPM Human Task and close window

Step1:

Add the below code inside <af:commandToolbarButton>

 <af:showPopupBehavior popupId="p1" triggerType="action"/>

Example Code looks like

<af:commandToolbarButton actionListener="#{invokeActionBean.setOperation}"
                                               text="#{wf:getResourceValue('REJECT', 'bindings.customActions')}"
                                               disabled="#{!bindings.REJECT.enabled}"
                                               action="#{invokeActionBean.invokeOperation}"
                                               partialSubmit="false"
                                               visible="#{wf:isCustomActionAvailable('REJECT', 'bindings.customActions')}"
                                               id="ctb1">
                                       
                                                <af:showPopupBehavior popupId="p1" triggerType="action"/>
                                                    <f:attribute name="DC_OPERATION_BINDING" value="bindings.REJECT"/>
                                   
                      </af:commandToolbarButton>

Step2:

Add the below code after  </af:commandToolbarButton>
<af:popup id="p1">
                        <af:dialog id="d222" title="Confirmation"
                                   dialogListener="#{CancelBean.isCancelled}">
                        <af:outputText   value="Are you sure that you want to cancel this Request?" id="ot211"/>
                        </af:dialog>
                      </af:popup>

Step3:

Add the below code in your cancelandClose() in Bean:
              DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
                 OperationBinding operationBinding = (OperationBinding)bindings.getOperationBinding("REJECT");
                 Map paramsMap = operationBinding.getParamsMap();
                 paramsMap.put("DC_OPERATION_BINDING", "bindings.REJECT");
                 operationBinding.execute();
                 List errorsOnSubmit = operationBinding.getErrors();
                 if (errorsOnSubmit == null || errorsOnSubmit.isEmpty()) {
                     returnMessage = "closeTaskFlow";
                     FacesContext facesContext = FacesContext.getCurrentInstance();
                     ExtendedRenderKitService service = Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
                     service.addScript(facesContext, "window.opener = self;window.close();");
                 }
             } catch (Exception e) {
              e.printStackTrace();
             }
        return returnMessage;
    }



Saturday, September 13, 2014

How To Add Parameters to Oracle BPM Human Task once Human Task has been generated?


September 13, 2014
Steps
1. Open your generated Human Task
2. Go to Data section

3. Click + on the right corner as shown below

4. Select the Xsd element or defined Data types and click OK.

5. Now you can see the parameters / Element(s) tagged to Human Task