cancel
Showing results for 
Search instead for 
Did you mean: 

Agentry - Retrieving child collection data in a transaction

Former Member
0 Kudos

Hi,

We're developing a Agentry application from scratch, it enables the user to create orders, add operations to it and send them to the SAP backend.

The object hierarchy is like this:

Main Object

   --> Order Collection

           --> Operation Collection

  

In the Agentry client everything goes perfectly, the order is created and saved, then operations are added to it. But when retrieving the transaction data in the Java code, we can only retrieve the order data and running:

user.eval("<<size transaction.operations>>");

returns "0".

What could be happening? Could this be a problem with the Java API?

Regards,

Kenyon Tu

Accepted Solutions (1)

Accepted Solutions (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Kenyon,

I need a bit more information to help me understand your scenario.

Depending on how you are structuring your transactions on the client, I am guessing that you have an AddOrder transaction to create the order itself along with executing one or more AddOperation transactions to populate the subcollection on the client.

So based on this assumption, the question is do you have update steps tied to both the AddOrder and AddOperation transactions?   or do you have a thrid postOrder transaction that you execute prior to transmit where you send the order and operations to update the backend?

--Bill

Answers (2)

Answers (2)

Former Member
0 Kudos

Thank you Bill and Jason,

I managed to get it to work.

While I was digging the Workmanager sources, i did see that it had a Post transaction for the Notification object, but didn't know what it was for, until Bill mentioned it in his post.

jason_latko
Advisor
Advisor
0 Kudos

Kenyon,

Are you sure the operations are saving to your order on the client?  Can you view them after the fact?  Easiest way to verify this is to use the ATE (Agentry Test Environment) on a Windows machine and then "Inspect" the object data from the inspect menu.

My guess is that you are maybe not sending up the child collection data in your transaction to the backend.  After you add all your sub-collection data, you need to post a final transaction that contains all your order properties including the operations collection as transaction properties, then tie the backend java steplet to this transaction as an update step.  Maybe your update step is currently tied to the transaction that posts the order header only?

Jason Latko - Senior Product Developer at SAP