I have been going through the new API and see how a lot of the methods and functionality have been moved around. The submission used to hold a method "getDeliveryProcessAttempts()" and I cannot find this in the new API. I thought it might be part of the DeliveryResult class, but I am not finding it. A client is converting code from the core to fluent and we are wondering if there is an equivalent to this method somewhere in Fluent.
Also, the new txn class calls the old submission object as one of its params. Though, it does not seem like you can access it in the new API services:(Txn(com.avoka.fc.core.entity.Submission sub, Map<String,String> formDataMap, String formXml, Set<String> groupNames, Map<String,String> propertyMap, byte receiptPdf, List<FileAttach> fileAttachList))
Just curious if there is a way to grab a submission object in the new API or is it omitted by design. If the latter, is the only way to get this object manually not actually through the proposed constructor, but rather just the TxnBuilder class?
Txn is a read-only object. You can query Txn(-s) with the help of TxnQuery class (note also the withXXX() methods for loading transaction specifics). On the other hand, TxnBuilder is for "building anonymous saved form, task form or review form transactions." Please look at the Javadoc of the classes for examples.
Why you need "getDeliveryProcessAttempts" and what is your use case as its intention is to be used internally?
See this related question & answer:
Access to Submission object in TM 5 - Fluent API
We need to know more about the logic they are running and see if we have already solution for such use case. Could you please check and share it?
Thank you for your quick response! They use "getDeliveryProcessAttempts" and compare the number to the max attempt to run logic on the final delivery attempt. Is this left out of the new API intentionally?
I would assume that the txn object will always be provided where it is needed and the constructor never used? I just wanted to confirm that we would not ever have access to the "Submission" object per client question.
If you need to find a transaction you use the TxnQuery class.