code: public synchronized void addWork(WorkItem item) throws ProtocolException, TransactionException
      {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "addWork", "WorkItem="+item);
  
          // Check the current transaction state (use state lock to ensure we see the latest value)
          synchronized (_stateLock)
          {
              if ((_state != TransactionState.STATE_ACTIVE) && !_indoubt)
              {
                  ProtocolException pe = new ProtocolException("TRAN_PROTOCOL_ERROR_SIMS1001", new Object[]{});
                  if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(this, tc, "Cannot add work to transaction. Transaction is complete or completing!", pe);
                  if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "addWork");
                  throw pe;
              }
          }
  
          if (_workList == null)
          {
              _workList = new TaskList();
          }
  
          if (item != null)
          {
              _workList.addWork(item);
          }
          else
          {
              ProtocolException pe = new ProtocolException("TRAN_PROTOCOL_ERROR_SIMS1001", new Object[]{});
              if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(this, tc, "Cannot add null work item to transaction!", pe);
              if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "addWork");
              throw pe;
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "addWork");
      }
docs: **********************************************************************