DATABASE ADAPTER - FAILURE

Posted by Fernando.Ferreira on 08-Jan-2016 16:39

Guys,

It is possible when a Database Adapter fail because the Database target is down, before Workstep be suspended program it for a few more tries for a while after these attempts and database is still down, send an e-mail with failure and change de process to the end  without the Adapter be Suspended?

Regards,

Fernando

Posted by Aditya Dhulipala on 11-Jan-2016 07:30

Hi Fernando,

One way to solve this problem is by using "Custom adapter" and "Roll back point".

1. You can create a custom adapter which would increment a counter data slot upon every visit.

2. Navigate to the custom adapter upon DB failure using roll back point.

(Roll back point reference : [View:https://documentation.progress.com/output/ua/OpenEdge_latest/index.html#page/bpm-appdev/creating-rollback-points.html:550:50]).

3. Have decision step to validate the counter data slot to check whether the number of retries have been reached or not.

4. Once reached, you can navigate to the E-mail adapter to send the Email report.

Please find the attached screen shot and custom adapter code snippet for reference.

Counter increment snippet:

public void IncrementRetry() {
int valueToIncrement = getCounter().getIntValue();
setCounter(new Integer(++valueToIncrement));
}

Please add back to the same thread, if you require any further clarification.

Thanks.

All Replies

Posted by Aditya Dhulipala on 11-Jan-2016 07:30

Hi Fernando,

One way to solve this problem is by using "Custom adapter" and "Roll back point".

1. You can create a custom adapter which would increment a counter data slot upon every visit.

2. Navigate to the custom adapter upon DB failure using roll back point.

(Roll back point reference : [View:https://documentation.progress.com/output/ua/OpenEdge_latest/index.html#page/bpm-appdev/creating-rollback-points.html:550:50]).

3. Have decision step to validate the counter data slot to check whether the number of retries have been reached or not.

4. Once reached, you can navigate to the E-mail adapter to send the Email report.

Please find the attached screen shot and custom adapter code snippet for reference.

Counter increment snippet:

public void IncrementRetry() {
int valueToIncrement = getCounter().getIntValue();
setCounter(new Integer(++valueToIncrement));
}

Please add back to the same thread, if you require any further clarification.

Thanks.

Posted by Fernando.Ferreira on 12-Jan-2016 09:25

Thansk

This thread is closed