Mapping the PRODUCTID to the next value of Oracle Sequence in an Input map.

Mapping the PRODUCTID to the next value of Oracle Sequence in an Input map.

book

Article ID: KB0088628

calendar_today

Updated On:

Products Versions
TIBCO Collaborative Information Manager -
Not Applicable -

Description

Resolution:
Description:
============
The requirement is to populate the PRODUCTID with sequence.nextVal during the Import operation.

Environment:
===========
TIBCO Product name and version: TIBCO Collaborative Information Manager 8.0.1
Operating System(s): All Operating Systems
Database: Oracle

Symptoms:
========
N/A

Cause:
=====
N/A

Resolution:
==========
There are two ways of doing this:

1). Use the following Oracle function that returns the nextval for the sequence:

CREATE OR REPLACE function TESTSEQ return number is
v_num number;

begin
select MYSEQ.NEXTVAL into v_num from dual;
return v_num;
end;

Here MYSEQ is the sequence in question.

2). Call the sequence from the rulebase of the ImportCatalogRecords activity:

        &ltaction>
            &ltassign>
                &ltvar&gtPRODUCTID</var>
                &ltop func="sequence">
                    &ltconst type="string"&gtMYSEQ</const>
                </op>
            </assign>
        </action>

Refer to the CIM Workflow Guide for more details on how to use the rulebase in conjunction with ImportCatalogRecords activity.

Attachments:
===========
None.

References:
==========
None.

Issue/Introduction

Mapping the PRODUCTID to the next value of Oracle Sequence in an Input map.