Retry mechanism in ref

Retry mechanism is implemented in which workflow?
I have this confusion because set transaction status workflow belongs to the main workflow in one way.
Is there any better explanation?

Can you explain regarding the query you have?

implemented in retryCurrentTransaction workflow which is called by setTransactionStatus (System exception branch)
image

basically this transaction compares current retry count and max retry count, if max retries reached, then it will increment transactionNumber (wont retry), otherwise it will retry (transactionNumber stays the same)

1 Like

Hi @Lak_Ui ,
Thank you for the reply.

Hi @jack.chan,
Yes, Perfectly described.
But setTransactionStatus is called from the process.xaml which is again a part of the main workflow.
So when asked, where is the retry mechanism implemented in REF, Should it be main workflow or setTransactionStatus workflow?

main calls setTransactionStatus calls retryCurrentTransaction

process.xaml DOESNT call setTransactionStatus, its called from the process state in main xaml

im still not sure whats the answer if main and settransactionStatus are your only 2 choices, because setTransactionstatus decides whether to retry or not, but the actual retry is done in main.xaml. Is this a multiple choice question that you have to answer?

Hi @jack.chan ,

yes, process workflow. My bad!
I was asked this in a live forum in a discussion and I am not exactly aware of the answer.
You did state it right, that setTransactionstatus decides whether to retry or not, but its enclosed in the main workflow.
So, I’m reaching out to other forum members to get this clarified!

Hi @Ray_Sha1 ,

This seems to be a bit confusing as the SetTransactionStatus has RetryCurrentTransaction workflow, which is the workflow responsible for Handling the Retries.

But whereas, the Retry is Performed, when the RetryNumber is Lesser than the MaxRetry Number, Which is actually Performed in the Transition of the Main workflow deciding to loop back to the Init or not.

So I would say it is rather a Combination of Both for the Retry Mechanism to be Implemented.

But if we are stating according to the Docs, then I think the RetryCurrentTransaction or SetTransactionStatus should be the correct answer.
image

2 Likes

Hey @supermanPunch,
Thank you for the input and insights with docs.

1 Like

@Ray_Sha1

  • It is always recommended to built the use case in different workflows (each workflow have chunks of code) and call these workflows anywhere. That is what REF template follows as well

  • Coming to your point, as like I mentioned above each workflow has chunks of code, ex: Init AllApplications workflow has login application part, CloseAllApplications workflow has close applications part, similar to this, RetrycurrentTransaction workflow has retrying mechanism. So, you can say the retrying mechanism happens in RetrycurrentTransaction workflow

  • Coming to your question, Since it is called in Main workflow, you cannot say that retrying happens in Main itself. The workflows can be called anywhere that depends on your requirement. It can be called in Main or Process or some other workflow. So, we should always mention the workflow name at where exactly the action happening

2 Likes