× Discuss on Template programming, jBASE programming, Enquiries, No-File enquiry, Enquiry routines, Version, Version routines, Menus, Abbriviations, Creating local reference fields, Fast path enquiries, Creating charts and graphs, Generating Reports, Deal slips, Straight through processing, Multi Company and Multi Book setup, Tabbed screens, Composite Screens, T24 API, etc...

My after auth routine run twice when there is an override

  • chouaib24
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 3 months ago - 1 year 3 months ago #24246 by chouaib24
Dear All,I have a webservise call in an AUTH ROUTINE on FT, the problem is that when there is an override the webservice call is made twice, once when I click validate and the second time when I accept the override. In the first, T24 even executes the after auth routines, apparently it does a rollback when there is an override, and when you accept the override it rerun the routine but this time it makes a commit. Is there a way to avoid the first webservice call when there is an override? I also checked if the F.WRTIE is done in the  auth routine, but unfortunately it's not done yet.

Thanks for help.

T24: R19 TAFJ
Last edit: 1 year 3 months ago by chouaib24. Reason: sentence correction

Please Log in or Create an account to join the conversation.

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Globus:G9-G13|TAFC:R05-R23|TAFJ:R19,R23,R24:test
More
1 year 3 months ago #24247 by VK
Hi
never heard of such routine type. Did you mean AFTER.UNAU.RTN or maybe BEFORE.AUTH.RTN?

Cheers
VK

Please Log in or Create an account to join the conversation.

  • chouaib24
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 3 months ago #24249 by chouaib24
Hi VK,

I mean the AUTH.ROUTINE.

Best regards,

Please Log in or Create an account to join the conversation.

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Globus:G9-G13|TAFC:R05-R23|TAFJ:R19,R23,R24:test
More
1 year 3 months ago #24250 by VK
Hi
in your AUTH routine check in both cases the contents of the common variable MESSAGE (defined in I_COMMON).

It should be different - on validation: "VAL"; on commit - "" (or maybe "AUT").
 

Cheers
VK

Please Log in or Create an account to join the conversation.

  • chouaib24
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 3 months ago #24251 by chouaib24
Hi,
I have already done this check, the MESSAGE variable is empty whether it is during validation or when accepting the OVERRIDE.

I found only the variable OFS$OVERRIDE which is filled after acceptance of the OVERRIDE.
Regards,

Please Log in or Create an account to join the conversation.

More
1 year 3 months ago #24252 by faisal
Auth routine does not trigger on Validation even if the no of authorisers in version is 0.

Please Log in or Create an account to join the conversation.

  • chouaib24
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 3 months ago #24253 by chouaib24
Hi Faisal,
Auth routine is triggered twice when there is an override.
You won't remark that only if you call a webservice for example, or you generate a log.
You won't remark changes on records, because T24 does a sort of roolback when there is an override that occurs.
You can check that by generating a log.

Please Log in or Create an account to join the conversation.

  • chouaib24
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 3 months ago #24254 by chouaib24
You will find below the variables after validation of the record (Log 1), display of the override, then after acceptance of the override (Log 2) :
Log 1 :
OverrideFlag > 0
Message >
EndError >
OfsOperation > PROCESS
OfsOverrides >
OfsAuth >
OfsMessage >
function > I
action >

Log 2 :
OverrideFlag > 0
Message >
EndError >
OfsOperation > PROCESS
OfsOverrides > Arrangement Account AA200077WCZZ ~Opb#2111101231230119~Clb# is in FROZEN ~Opb#FROZEN~Clb# StatusþYES
OfsAuth >
OfsMessage >
function > I
action > POST

Please Log in or Create an account to join the conversation.

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Globus:G9-G13|TAFC:R05-R23|TAFJ:R19,R23,R24:test
More
1 year 3 months ago - 1 year 3 months ago #24255 by VK
Hi
and without an override, is AUTH.RTN triggered at least once?

About the rollback: can you check SYSTEM(47) in both cases?
 

Cheers
VK
Last edit: 1 year 3 months ago by VK.

Please Log in or Create an account to join the conversation.

  • chouaib24
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 3 months ago #24258 by chouaib24
Hi,
Without an override, the AUTH.RTN is triggered once.

Please Log in or Create an account to join the conversation.

  • chouaib24
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 3 months ago #24267 by chouaib24
Dear all,

So, there is no solution for this problem?

Thanks,

Please Log in or Create an account to join the conversation.

More
1 year 3 months ago #24268 by mseye
I haven't used the T24 system for over 5 years now, but what I can suggest in your routine logic is that you add a check to trigger authorization.
For example, you create a Boolean local table or a number that you increment to indicate whether it comes from an override or not.
At the end of execution, you reset to 0. I don't know if this will help.

Regards

Please Log in or Create an account to join the conversation.

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Globus:G9-G13|TAFC:R05-R23|TAFJ:R19,R23,R24:test
More
1 year 3 months ago #24269 by VK
Hi
looks reasonable... Introducing a COMMON variable might help.
 

Cheers
VK

Please Log in or Create an account to join the conversation.

Time to create page: 0.109 seconds