Create dropdown based on variables

Sometimes it is required to create a dropdown which should use base data as a variable rather than a binding.
1) Create a variable inside variables binding

Add Variable to Bindings

2) Give variable name and create it of string type.

Give it a variable name and type

3) Select list binding type

select a list binding type

4) Select second option from “Select List Binding Type”

Select second option from "Select List Binding Type"

5) Create a data mapping and use List Item configuration for default value of your dropdown.

Map code and for showing default option use Please Select
Map code and for showing default option use Please Select

please write to us if you have any problem in configuring it at support@dnafizz.com

Undeploy Composites when Soa-Infra is down

1. Download and copy the ShareSoaInfraPartition.ear to access MDS Offline

or you can get it from this loction as well

https://code.google.com/p/kavin-sample-apps/downloads/detail?name=ShareSoaInfraPartition.ear

2. Connect to WLST and deploy the above application on the AdminServer. Use the WLST under $MIDDLEWARE_HOME/ oracle_common/common/bin.

3. Run the below command to export the metadata from the AdminServer. Change the values appropriate to your environment.
Command:
wls:/domain/serverConfig>
exportMetadata(application=’ShareSoaInfraPartition’,server=”,toLocation=”,docs=’/deployed-composites/deployed-composites.xml’)

Result:
Executing operation: exportMetadata.
Operation “exportMetadata” completed. Summary of “exportMetadata” operation is:
List of documents successfully transferred:
/deployed-composites/deployed-composites.xml
1 documents successfully transferred.

4. Open the deployed-composites.xml within deployed-composites folder under .

5. Delete the composite series or revision which is causing the problem and save the file.

6. Import the updated file under into MDS.
Command:
wls:/domain/serverConfig> importMetadata(application=’ShareSoaInfraPartition’,server=’AdminServer’,fromLocation=”,docs=’/deployed-composites/deployed-composites.xml’)

Result:
Executing operation: importMetadata.

Operation “importMetadata” completed. Summary of “importMetadata” operation is:
List of documents successfully transferred:

/deployed-composites/deployed-composites.xml
1 documents successfully transferred.

7. Restart your SOA server or soa-infra.

Oracle BPM – Shared Worklist views & Flex Fields Migration

There is not Out of box feature to achieve this.
What I am proposing is a workaround which reduces manual effort of recreating views and Flex fields mapping at each environment.

Precisely we need to take export of these tables from particular environment where shared views and flex field mapping resides and copy it to the environment where we need to do it.

[SOAINFRA].[WFUserTaskView]
[SOAINFRA].[WFUserTaskViewGrant]
[SOAINFRA].[WFAttributeLabelMap]
[SOAINFRA].[WFAttributeLabelUsage]

SOA Fault Handling

Every BPEL and BPM project within SOA 11g should have a fault-policies.xml and a fault-bindings.xml.
You can recover from faults that occur in BPEL process and Oracle Mediator service components by
defining a fault policy. You define the fault policy in the fault-policies.xml and fault-bindings.xml during
design time. The fault policy describes how to handle runtime faults. If a fault is defined, it is
automatically handled by the fault policy during runtime. If a defined fault results in a condition in which
human intervention is the prescribed action, you perform recovery actions from Oracle Enterprise
Manager Console. Both individual fault recovery and bulk fault recovery are supported. You can
recover from individual faults in Oracle Enterprise Manager Console by modifying the following:
• Variable values in BPEL process service components
• Payloads in Oracle Mediator service components.

While these files can be highly customized, this document will cover a basic example that can
immediately be copied into each of your existing BPM projects.

fault-policies.xml

4
8

myFaultHandler.log
C:projects

fault-bindings.xml


Continue reading “SOA Fault Handling”

Oracle SOAINFRA Purging Script

Below is the list of tables and the Proc which actually gets executed when Purg Script is called.

=================================================================================================================

GO
/****** Object: StoredProcedure [soa_workflow].[delete_workflow_instances] Script Date: 09/04/2014 16:55:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [soa_workflow].[delete_workflow_instances] @write_file SYSNAME
AS
BEGIN
SET NOCOUNT ON
–SET IMPLICIT_TRANSACTIONS ON

DECLARE @v_stmt VARCHAR(2000)
DECLARE @v_rowcount INT
BEGIN TRY
— purge of workflow data
— first, purge each child-table in turn, as there are performance concerns
— with relying on FK cascade deletes…

EXEC soa_common.log_info ‘Purging WFTask_TL’,@write_file

SET @v_stmt = ‘Purge WFTask_TL’
DELETE FROM DEV_SOAINFRA.WFTask_TL
WHERE taskId in (SELECT twfp.TASKID FROM soa_workflow.TEMP_WFTASK_PURGE twfp)
SET @v_rowcount = @@ROWCOUNT

EXEC soa_common.debug_purge ‘soa_workflow.WFTask_TL’, ”, @write_file, @v_rowcount
COMMIT

EXEC soa_common.log_info ‘Purging WFTaskHistory’,@write_file

SET @v_stmt = ‘Purge WFTaskHistory’
DELETE FROM DEV_SOAINFRA.WFTaskHistory
WHERE taskId in (SELECT twfp.TASKID FROM soa_workflow.TEMP_WFTASK_PURGE twfp)
SET @v_rowcount = @@ROWCOUNT

EXEC soa_common.debug_purge ‘WFTaskHistory’, ”, @write_file, @v_rowcount
COMMIT

EXEC soa_common.log_info ‘Purging WFTaskHistory_TL’, @write_file
SET @v_stmt = ‘Purge WFTaskHistory_TL’
DELETE FROM DEV_SOAINFRA.WFTaskHistory_TL
WHERE taskId in (SELECT twfp.TASKID FROM soa_workflow.TEMP_WFTASK_PURGE twfp)
SET @v_rowcount = @@ROWCOUNT

EXEC soa_common.debug_purge ‘WFTaskHistory_TL’,”, @write_file, @v_rowcount

COMMIT

EXEC soa_common.log_info ‘Purging WFComments’,@write_file
SET @v_stmt = ‘Purge WFComments’
DELETE FROM DEV_SOAINFRA.WFComments
WHERE taskId in (SELECT twfp.TASKID FROM soa_workflow.TEMP_WFTASK_PURGE twfp)
SET @v_rowcount = @@ROWCOUNT

EXEC soa_common.debug_purge ‘WFComments’, ”, @write_file, @v_rowcount
COMMIT

EXEC soa_common.log_info ‘Purging WFMessageAttribute’,@write_file
SET @v_stmt = ‘Purge WFMessageAttribute’
DELETE FROM DEV_SOAINFRA.WFMessageAttribute
WHERE taskId in (SELECT twfp.TASKID FROM soa_workflow.TEMP_WFTASK_PURGE twfp)
SET @v_rowcount = @@ROWCOUNT
EXEC soa_common.debug_purge ‘WFMessageAttribute’, ”, @write_file, @v_rowcount
COMMIT

EXEC soa_common.log_info ‘Purging WFAttachment’,@write_file
SET @v_stmt = ‘Purge WFAttachment’
DELETE FROM DEV_SOAINFRA.WFAttachment
WHERE taskId in (SELECT twfp.TASKID FROM soa_workflow.TEMP_WFTASK_PURGE twfp)
SET @v_rowcount = @@ROWCOUNT

EXEC soa_common.debug_purge ‘WFAttachment’, ”, @write_file, @v_rowcount
COMMIT

EXEC soa_common.log_info ‘Purging WFAssignee’,@write_file
SET @v_stmt = ‘Purge WFAssignee’
DELETE FROM DEV_SOAINFRA.WFAssignee
WHERE taskId in (SELECT twfp.TASKID FROM soa_workflow.TEMP_WFTASK_PURGE twfp)
SET @v_rowcount = @@ROWCOUNT
EXEC soa_common.debug_purge ‘WFAssignee’, ”, @write_file, @v_rowcount
COMMIT

EXEC soa_common.log_info ‘Purging WFReviewer’,@write_file
SET @v_stmt = ‘Purge WFReviewer’
DELETE FROM DEV_SOAINFRA.WFReviewer
WHERE taskId in (SELECT twfp.TASKID FROM soa_workflow.TEMP_WFTASK_PURGE twfp)
SET @v_rowcount = @@ROWCOUNT
EXEC soa_common.debug_purge ‘WFReviewer’, ”, @write_file, @v_rowcount
COMMIT

EXEC soa_common.log_info ‘Purging WFCollectionTarget’,@write_file
SET @v_stmt = ‘Purge WFCollectionTarget’
DELETE FROM DEV_SOAINFRA.WFCollectionTarget
WHERE taskId in (SELECT twfp.TASKID FROM soa_workflow.TEMP_WFTASK_PURGE twfp)
SET @v_rowcount = @@ROWCOUNT
EXEC soa_common.debug_purge ‘WFCollectionTarget’, ”, @write_file, @v_rowcount
COMMIT

EXEC soa_common.log_info ‘Purging WFRoutingSlip’,@write_file
SET @v_stmt = ‘Purge WFRoutingSlip’
DELETE FROM DEV_SOAINFRA.WFRoutingSlip
WHERE taskId in (SELECT twfp.TASKID FROM soa_workflow.TEMP_WFTASK_PURGE twfp)
SET @v_rowcount = @@ROWCOUNT
EXEC soa_common.debug_purge ‘WFRoutingSlip’, ”, @write_file, @v_rowcount
COMMIT

EXEC soa_common.log_info ‘Purging WFNotification’,@write_file
SET @v_stmt = ‘Purge WFNotification’
DELETE FROM DEV_SOAINFRA.WFNotification
WHERE taskId in (SELECT twfp.TASKID FROM soa_workflow.TEMP_WFTASK_PURGE twfp)
SET @v_rowcount = @@ROWCOUNT
EXEC soa_common.debug_purge ‘WFNotification’, ”, @write_file, @v_rowcount
COMMIT

EXEC soa_common.log_info ‘Purging WFTaskTimer’,@write_file
SET @v_stmt = ‘Purge WFTaskTimer’
DELETE FROM DEV_SOAINFRA.WFTaskTimer
WHERE taskId in (SELECT twfp.TASKID FROM soa_workflow.TEMP_WFTASK_PURGE twfp)
SET @v_rowcount = @@ROWCOUNT
EXEC soa_common.debug_purge ‘WFTaskTimer’, ”, @write_file, @v_rowcount
COMMIT

EXEC soa_common.log_info ‘Purging WFTaskError’,@write_file
SET @v_stmt = ‘Purge WFTaskError’
DELETE FROM DEV_SOAINFRA.WFTaskError
WHERE taskId in (SELECT twfp.TASKID FROM soa_workflow.TEMP_WFTASK_PURGE twfp)
SET @v_rowcount = @@ROWCOUNT
EXEC soa_common.debug_purge ‘WFTaskError’, ”, @write_file, @v_rowcount
COMMIT

EXEC soa_common.log_info ‘Purging WFHeaderProps’,@write_file
SET @v_stmt = ‘Purge WFHeaderProps’
DELETE FROM DEV_SOAINFRA.WFHeaderProps
WHERE taskId in (SELECT twfp.TASKID FROM soa_workflow.TEMP_WFTASK_PURGE twfp)
SET @v_rowcount = @@ROWCOUNT
EXEC soa_common.debug_purge ‘WFHeaderProps’, ”, @write_file, @v_rowcount
COMMIT

EXEC soa_common.log_info ‘Purging WFEvidence’,@write_file
SET @v_stmt = ‘Purge WFEvidence’
DELETE FROM DEV_SOAINFRA.WFEvidence
WHERE taskId in (SELECT twfp.TASKID FROM soa_workflow.TEMP_WFTASK_PURGE twfp)
SET @v_rowcount = @@ROWCOUNT
EXEC soa_common.debug_purge ‘WFEvidence’, ”, @write_file, @v_rowcount
COMMIT

EXEC soa_common.log_info ‘Purging WFTaskAssignmentStatistic’,@write_file
SET @v_stmt = ‘Purge WFTaskAssignmentStatistic’
DELETE FROM DEV_SOAINFRA.WFTaskAssignmentStatistic
WHERE taskId in (SELECT twfp.TASKID FROM soa_workflow.TEMP_WFTASK_PURGE twfp)
SET @v_rowcount = @@ROWCOUNT
EXEC soa_common.debug_purge ‘WFTaskAssignmentStatistic’, ”, @write_file, @v_rowcount
COMMIT

EXEC soa_common.log_info ‘Purging WFTaskAggregation’,@write_file
SET @v_stmt = ‘Purge WFTaskAggregation’
DELETE FROM DEV_SOAINFRA.WFTaskAggregation
WHERE rootTaskId in (SELECT twfp.TASKID FROM soa_workflow.TEMP_WFTASK_PURGE twfp)
SET @v_rowcount = @@ROWCOUNT
EXEC soa_common.debug_purge ‘WFTaskAggregation’, ”, @write_file, @v_rowcount
COMMIT

— Now purge main task table
EXEC soa_common.log_info ‘Purging WFTask’,@write_file
SET @v_stmt = ‘Purge WFTask’
DELETE FROM DEV_SOAINFRA.WFTask
WHERE taskId in (SELECT twfp.TASKID FROM soa_workflow.TEMP_WFTASK_PURGE twfp)
SET @v_rowcount = @@ROWCOUNT
EXEC soa_common.debug_purge ‘WFTask’, ”, @write_file, @v_rowcount
COMMIT
END TRY

BEGIN CATCH
EXEC soa_common.log_error @v_stmt,@write_file
— Raise an error with the details of the exception
DECLARE @ErrMsg NVARCHAR(4000), @ErrSeverity INT
SELECT @ErrMsg = ERROR_MESSAGE(),
@ErrSeverity = ERROR_SEVERITY()

RAISERROR(@ErrMsg, @ErrSeverity, 1)
END CATCH
–SET IMPLICIT_TRANSACTIONS OFF
SET NOCOUNT OFF

END

Using-DB-Adapters-Part-1-Inserting-into-table

This post will help you while creating DB adapters in a SOA composite.

Let’s take a scenario where we are creating an application for HR System with Sub-Module asAccessCardGeneration for a new Joiner.

Start node will be an initiator node which we will be exposed as Webservice. Now once we receive a Message from an external system [ assume a Dot net application which HRs use for creating employee Id], instance would be created.

Below is data association which we will put into our Start node. To pass of Data from Webservice Request to BPM’s Data Object.

Now the basic idea is to insert input received from Webservice into a DB Table and then return an access card number from Global-Free-Access-Card table. Once an access card is assigned to an Employee, we will remove that access-card-number from free table and insert entry for that access-card-number into Global-Assigned-Access-Card table along with corresponding Employee Id.

DB Scripts to create Basic Tables:

create table employee
(fullName varchar(15),
Email varchar(20),
EmployeeId number(10),
ContactNumber varchar(12),
DateOfJoining date
);

create table globalFreeAccessCards
(AccessCardNumber number(10)
);

create table globalAssignedAccessCards
(AccessCardNumber number(10),
EmployeeId number(10)
);

So as per our requirement , we need to execute three DB operations with Database.

· Insert Webservice Data into employee Table

· Select a Free Access Card Number from globalFreeAccessCards Table and then Delete selected Access-card-number from table.

· Update Selected Access Card Number into globalAssignedAccessCards Table with Assigned Employee-Id.

We will not create three DB adapters, once each for above mentioned respective table.
Steps:
à Open Composite.xml
à Drag and Drop Database Adapter on External-references Section

à As of now, we will use Jdeveloper DB connection which would be deployed as a Data source @ Weblogic server. Ideally we should create a Data source into Weblogic and then map the JNDI name into DB adapter.

àAs of now, we need to insert a row into Employee Table, so will only select insert operation.

à Click on Import- Tables and select Employee Table.

àSet EmployeeId as Primary Key

Now we need to go back again to BPMN process and define implementation for Service Task ‘Insert Employee Record Into Database’.
To pass on Payload-DataObject – Employee’s Value into DB, we will go to transformation section and map Input through XSL.

–> Below is the XSL mapping which will pass on Payload data into Employee Table.

In my next Post, I will show, how to execute Select and Update through DBadapters and process deployment with Sample Code.