Debugging a Business Process
Application Type

Hello everyone,

I find myself facing a challenging situation with this particular task, and I'm in need of some assistance. To provide some background, we've outsourced this code, and it has come to our attention that there are issues with its implementation.

In essence, this code pertains to a crucial business process of determining when an invoice is paid within Sage. The expected outcome is to mark the corresponding invoice in our application as "paid," effectively changing its status.

I've been grappling with this problem for quite some time now and, unfortunately, have not been able to pinpoint a solution. Due to the presence of sensitive data associated with Sage APIs and other dependencies, sharing the code here on the forum is not a viable option.

Furthermore, I've thoroughly reviewed our processes under monitoring and cross-referenced the information in Sage. It appears that when the invoice ID corresponds to instance number 407, it should be marked as paid.

So, my question is: How can we effectively debug this process? It appears to be stuck in an infinite waiting loop, and I'm eager to find a resolution. 

Any guidance or suggestions would be greatly appreciated.

@André Smit 

It looks like only the invoice with ID # 71 has hung.
The first step would be inspecting the record that has InvoiceId of 71, and comparing it to a record that is processed without issue.

If there is no obvious difference, I would suspend the execution of the invoice entirely and clear out any data that exists for that specific invoice within your OutSystems instance and try the process again.

When it is being re-processed (Looks like no business logic has run on it since about May?) I would monitor the error logs for any unexpected problems.

Finally, if none of that helped, I would copy the business logic as much as possible into discrete actions and perform the business logic on the record with InvoiceID #71 'manually' to see where the breakdown is occurring.

Good luck!
RAD Manage

@RAD Manage

Thank you for your valuable feedback. I will conduct further testing on my end to address the issue.

I'm not entirely certain if it's feasible or advisable, but is there a way to halt all processes and start afresh?

Additionally, I reviewed the error logs, but they appear to be empty.

Nevertheless, your suggestion of breaking it down into separate actions is a commendable one! I will certainly explore that approach.

In your final image the 'suspend execution' button should begin the process of terminating the entire process on that record. Once suspended, you should have an additional button to terminate it entirely.

At that point, however, any uncompleted business logic would have to be done to that record manually and you wouldn't have another test case that would 'automatically' clear once the issue is resolved, until the error occurs again.

This might not be ideal as the issue sounds intermittent and it may be best to keep a workable test case on hand.

My first steps would definitely be splitting the logic up into discrete parts and running it manually on the failed record until you find the exact point at which the breakdown is occurring.

Best of luck,
RAD Manage

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.