Hi Prashant,
Thanks for your reply. I have tried using the above automation script which you given, its not working for my requirement.
I created the sequence with minimum value 1, maximum value 9999999999 and increment by 1 with cache size 20, no order no cycle. But the count of nextvalue for the sequence is not getting incremented, it remains the same.
I have also tried this, transid = sequence_name.nextvalue() and
AND Also this,
state = con.prepareStatement("select sequence_name.nextval as maxsequence from dual")
trans = state.executeQuery()
if (trans.next()):
transid=trans.getInt("maxsequence")
trans.close()
state.close()
But they are not working as expected.
Can you please help me on this, what am i missing?
Thanks in Advance
------------------------------
Ishwarya Soundarya
Accenture
------------------------------
Original Message:
Sent: 03-01-2023 09:45
From: Prashant Sharma
Subject: Missing Transactions
conKey = ''
connect = ''
state = ''
try:
conKey = mbo.getThisMboSet().getUserInfo().getConnectionKey();
connect = mbo.getThisMboSet().getMboServer().getDBConnection(conKey)
state = con.createStatement()
rs = state.execute("Select SQUENCENAME.NEXTVAL from DUAL")
count=rs.getInt(1)
#use Count as per your need.
con.commit()
finally:
if state != "":
state.close()
if conKey != "" and connect != "":
mbo.getThisMboSet().getMboServer().freeDBConnection(conKey)
------------------------------
Prashant Sharma
Sedin Technologies
Connect with me @ https://www.linkedin.com/in/psharmamaximo/
#IBM Champion 2022
#IBM Champion 2023
Original Message:
Sent: 03-01-2023 06:00
From: Ishwarya Soundarya
Subject: Missing Transactions
Hello Everyone,
The automations script is getting the next transaction by selecting the maximum transaction id from interface table. So when we receive a new transaction prior to the completion of the previous transaction, the same transaction id can be assigned to multiple transactions.
We are trying to use an oracle sequence instead. The sequence would be updated immediately instead of when the transaction is saved.
I have created the sequence and register the sequence to Maximo. Once the sequence has been created the automation script will need to be updated to select the next value from sequence instead of selecting maximum transaction id from the interface table.
Here comes my question. how can we write this using automation script, To select the next value from sequence.
Can anyone help on this. Thanks in Advance
#Integrations
------------------------------
Ishwarya Soundarya
Accenture
------------------------------