cancel
Showing results for 
Search instead for 
Did you mean: 

How to make interfaces dependent on another interface

former_member192238
Participant
0 Kudos

Dear Experts,

I have requirement like i have two JDBC to Proxy interfaces name X and Y .In that Y is always dependent on X

when X read the data from database table its status is updated then only Y interface should pick the data.

Please suggest me how to achieve this requirement.

Regards

Praveen

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Sounda fairly simple in the sense that the Select Query in the Scenario 2 should be dependent on the update happening in scenario 1.

When Scenario 1 , sender JDBC adapter selects and updates the table, the Scenario 2 would get executed in the next poll of its sender JDBC adapter.

Make the Sender JDBC adapters execute in EOIO and let both the Interfaces use the same Queue Name so that Scenario 1 executes 1st end to end.

Regards

Bhavesh

former_member192238
Participant
0 Kudos

hi Bavesh,

I have written a select query

SELECTb.sap_bundur_id,b.cargo_alloc_id,b.sap_veh_id,b.trip_no,b.sap_jetty_id,b.Quantity_loaded,b.unload_commencement, b.unload_stopped,b.Last_Updated_Time,b.da_remarks,b.eou,b.eouwc,b.sap_cargo_alloc_yr,b.status,b.log_sheet_trip_no FROM temp_barge_loading_nomination a,temp_barge_loading_gr b WHERE a.sap_veh_id=b.sap_veh_id and a.trip_no=b.trip_no and b.status=0 and a.status=1 limit 1;

and UPDATE Query as UPDATE temp_barge_loading_gr set status=1 WHERE status=0  limit 1

the issue is in second table after select query is firing  UPDATE query it is updating the status column all the records  .

But i want to update the status column of records which i have read in the second table 

because some times data present in the second table may not be in the first table then select query will not select those records but update query is updating that records also.

Please suggest me what select query i should use

Regards

Praveen

Former Member
0 Kudos

Dear Praveen

Your update is working correctly since you are firing update based on where condition of second table only.

If you want to achieve what you mentioned you must have first table also in the where clause of update.

a.sap_veh_id=b.sap_veh_id and a.trip_no=b.trip_no this should be present while update also.

Regards

Monika

Answers (2)

Answers (2)

Former Member
0 Kudos

Dear Praveen

The database can have 2 fields Status_X and Status_Y

Status_X should be set to "processed" when X has picked the data

Status_Y should be set to "processed" when Status_X is processed + other business conditions. 

Regards

Monika

rajasekhar_reddy14
Active Contributor
0 Kudos

Better to schedule two interface corrrectly like once X interface runs then only Y should run(but this will not gaurantee 100% stabilty).

other alternative is create one folder in FTP then post one confirmation dummy file after executing X then based on this run your X interface, this is one good option.