Skip to main content
Solved

Background Job Argument Error


hhy38
Superhero (Customer)
Forum|alt.badge.img+16
  • Superhero (Customer)
  • 325 replies

I am trying to insert a record to shop order history when configuration change. I set an event when the configuration change triggers a script. However It gives an “mutating, trigger/function may not see it” error. To solve that I decide to use background jobs. I called the “transaction_sys.deferred_call” procedure from PL/SQL Developer. When I control the background jobs. It gives an error about the argument but I could not understand. 

 

Event
Script
Error 1
Deferred Call
Error 2

 

Best answer by Wimali Athulathmudali

Hi @hhy38 ,

I think your issue will be solved using this method “Shop_Order_History_API.Generate “ instead of using New__ method directly.

Thanks & best Regards,

Wimali

View original
This topic has been closed for replies.

4 replies

Wimali Athulathmudali
Hero (Employee)
Forum|alt.badge.img+8

Hi @hhy38 ,

I think your issue will be solved using this method “Shop_Order_History_API.Generate “ instead of using New__ method directly.

Thanks & best Regards,

Wimali


Forum|alt.badge.img+14

Hi @hhy38 ,

There is several errors in there, but your main challenge is that you cannot make a deferred call to a procedure that has output parameters.


dhlelk
Superhero
Forum|alt.badge.img+15
  • Superhero
  • 200 replies
  • July 12, 2021

Hi @hhy38,

 

You cannot call PROCEDURES having arguments of type IN/OUT or OUT with Transaction_SYS.Deferred_Call because you will get the below error in the background job,
Argument INFO_ is of type IN/OUT or OUT, which is not supported.
ORA-20105: Transaction.WRONG_ARGUMENT

 

This means you cannot call the standard New__, Modify__ and Remove__ PROCEDURES directly.

Option 1,

Find a similar PROCEDURE of the same API which gets the job done,
In your case Shop_Order_History_API.Generate (I'm not sure if this is available on App9).

DECLARE
   id1_  NUMBER;
   attr_ VARCHAR2(32000);
BEGIN
   Client_SYS.Clear_Attr(attr_);
   Client_SYS.Add_To_Attr('ORDER_NO_',     '1', attr_);
   Client_SYS.Add_To_Attr('RELEASE_NO_',   '*', attr_);
   Client_SYS.Add_To_Attr('SEQUENCE_NO_',  '*', attr_);
   Client_SYS.Add_To_Attr('MESSAGE_TEXT_', 'Message', attr_);
   Client_SYS.Add_To_Attr('OLD_VALUE_',    '1', attr_);
   Client_SYS.Add_To_Attr('NEW_VALUE_',    '2', attr_);
   Client_SYS.Add_To_Attr('RESULT_KEY_',   '', attr_);

   Transaction_SYS.Deferred_Call(id_               => id1_,
                                 procedure_name_   => 'Shop_Order_History_API.Generate',
                                 argument_type_db_ => 'PARAMETER',
                                 arguments_        => attr_,
                                 description_      => 'Shop Order Configuration Changed');
END;

 

Option 2,

https://community.ifs.com/technology-infrastructure-cloud-integration-dev-tools-50/how-to-create-a-defered-job-to-execute-modify-1757?postid=7012#post7012

 

Cheers !
Dhananjaya.


hhy38
Superhero (Customer)
Forum|alt.badge.img+16
  • Author
  • Superhero (Customer)
  • 325 replies
  • July 12, 2021

@dhlelk, @Hans Andersen, @Wimali Athulathmudali Thanks for all answers.

 

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings