# Class TransactionLog

- Defined in packages/graphai/src/transaction_log.ts:7

#####
Index

### Constructors

constructor

### Properties

agentId?
endTime?
errorMessage?
injectFrom?
inputs?
inputsData?
isLoop?
log?
mapIndex?
nodeId
params?
repeatCount?
result?
resultKeys?
retryCount?
startTime?
state

### Methods

beforeAddTask
beforeExecute
initForComputedNode
onComplete
onError
onInjected
onSkipped

##
Constructors

### constructor

- new TransactionLog(nodeId: string): TransactionLog

  #### Parameters

  - nodeId: string

  #### Returns TransactionLog

  - Defined in packages/graphai/src/transaction_log.ts:25

##
Properties

### `Optional` agentId

agentId?: string

- Defined in packages/graphai/src/transaction_log.ts:13

### `Optional` endTime

endTime?: number

- Defined in packages/graphai/src/transaction_log.ts:11

### `Optional` errorMessage

errorMessage?: string

- Defined in packages/graphai/src/transaction_log.ts:18

### `Optional` injectFrom

injectFrom?: string

- Defined in packages/graphai/src/transaction_log.ts:17

### `Optional` inputs

inputs?: string[]

- Defined in packages/graphai/src/transaction_log.ts:15

### `Optional` inputsData

inputsData?: ResultData[]

- Defined in packages/graphai/src/transaction_log.ts:16

### `Optional` isLoop

isLoop?: boolean

- Defined in packages/graphai/src/transaction_log.ts:22

### `Optional` log

log?: TransactionLog[]

- Defined in packages/graphai/src/transaction_log.ts:24

### `Optional` mapIndex

mapIndex?: number

- Defined in packages/graphai/src/transaction_log.ts:21

### nodeId

nodeId: string

- Defined in packages/graphai/src/transaction_log.ts:8

### `Optional` params

params?: DefaultParamsType

- Defined in packages/graphai/src/transaction_log.ts:14

### `Optional` repeatCount

repeatCount?: number

- Defined in packages/graphai/src/transaction_log.ts:23

### `Optional` result

result?: ResultData

- Defined in packages/graphai/src/transaction_log.ts:19

### `Optional` resultKeys

resultKeys?: string[]

- Defined in packages/graphai/src/transaction_log.ts:20

### `Optional` retryCount

retryCount?: number

- Defined in packages/graphai/src/transaction_log.ts:12

### `Optional` startTime

startTime?: number

- Defined in packages/graphai/src/transaction_log.ts:10

### state

state: NodeState

- Defined in packages/graphai/src/transaction_log.ts:9

##
Methods

### beforeAddTask

- beforeAddTask(node: ComputedNode, graph: GraphAI): void

  #### Parameters

  - node: ComputedNode
  - graph: GraphAI

  #### Returns void

  - Defined in packages/graphai/src/transaction_log.ts:73

### beforeExecute

- beforeExecute(
  node: ComputedNode,
  graph: GraphAI,
  transactionId: number,
  inputs: ResultData[],
  ): void

  #### Parameters

  - node: ComputedNode
  - graph: GraphAI
  - transactionId: number
  - inputs: ResultData[]

  #### Returns void

  - Defined in packages/graphai/src/transaction_log.ts:63

### initForComputedNode

- initForComputedNode(node: ComputedNode, graph: GraphAI): void

  #### Parameters

  - node: ComputedNode
  - graph: GraphAI

  #### Returns void

  - Defined in packages/graphai/src/transaction_log.ts:30

### onComplete

- onComplete(node: ComputedNode, graph: GraphAI, localLog: TransactionLog[]): void

  #### Parameters

  - node: ComputedNode
  - graph: GraphAI
  - localLog: TransactionLog[]

  #### Returns void

  - Defined in packages/graphai/src/transaction_log.ts:51

### onError

- onError(node: ComputedNode, graph: GraphAI, errorMessage: string): void

  #### Parameters

  - node: ComputedNode
  - graph: GraphAI
  - errorMessage: string

  #### Returns void

  - Defined in packages/graphai/src/transaction_log.ts:79

### onInjected

- onInjected(node: StaticNode, graph: GraphAI, injectFrom?: string): void

  #### Parameters

  - node: StaticNode
  - graph: GraphAI
  - `Optional` injectFrom: string

  #### Returns void

  - Defined in packages/graphai/src/transaction_log.ts:36

### onSkipped

- onSkipped(node: ComputedNode, graph: GraphAI): void

  #### Parameters

  - node: ComputedNode
  - graph: GraphAI

  #### Returns void

  - Defined in packages/graphai/src/transaction_log.ts:87