Class TransactionRunner<T>

java.lang.Object
com.ptc.qualitymanagement.qms.util.helper.TransactionRunner<T>

public abstract class TransactionRunner<T> extends Object
Perform business processes within a @see wt.pom.Transaction. If a Transaction is already in progress a nested Transaction is created. At the end of the business process the transaction is committed. When an exception is thrown the transaction is rolled back in a finally block.

 regulatorySubmission = new ConditionalAutoCheckoutRunner<RegulatorySubmission>(regulatorySubmission) { @Override
     public RegulatorySubmission performBusinessProcess(RegulatorySubmission managedObject) throws Exception {
         RegulatoryContentHelper.getService().storeRegulatoryContent(managedObject,
                 RegulatoryContentCategory.ACKNOWLEDGEMENT3, transmissionName, transmissionContent);
 
         updateAttributes(managedObject,
                 Map.of("remoteIdentifier", jsonContent.getString("remoteIdentifier")));
 
         return managedObject;
     }
 }.invoke();
 


Supported API: true

Extendable: false
  • Method Details

    • performBusinessProcess

      public abstract T performBusinessProcess() throws Exception
      Implement the business logic to be performed within the transaction

      Supported API: true
      Throws:
      Exception
    • invoke

      public T invoke() throws Exception
      Initiate the process described in the class level java-doc

      Supported API: true
      Throws:
      Exception