API Documentation
API Documentation

Introduction to the Agreements Network

The Agreements Network is the legal layer for a networked world. Be part of the paradigm shift from legal services to legal products. Join the network, build products and services on top of it or reimagine what law looks like when it’s facilitated through technology. The possibilities are truly endless entering into this new paradigm.

After briefly introducing the technical aspects of the Agreements Network this page provides detailed API documentation for the REST API as well as the Contract API.

The Agreements Network Architecture

The Agreements Network’s architecture leverages robust interconnected distributed systems.

Agreements Network Architecture

The Agreements Network is configured to significantly reduce the operational costs to users.By operating a sharded, optimized, zone, the Agreements Network is able to interact with Ethereum smart contracts without being exposed to backlogs or attacks in transactional processing within the Ethereum public blockchain.

The Agreements Network Protocol

The Agreements Network provides structures that support defining and operating legal products.

Agreements Network Protocol

Smart contract factory. A smart contract factory generates other smart contracts. These factories enable reuse of and management of objects within the Agreements Network.

Active Agreements. Active Agreements are the most visible object within the Agreements Network. Active Agreements can be any type of legal artifact or instrument, automated with smart contracts workflows.

Archetypes. Archetypes are smart contracts factories. Each Archetype provides a blueprint for an individual Active Agreement.

Archetype factory. The Agreements Network Archetype Factory enables creative combinations of legal prose templates, standardized parameters, workflows and events to manufacture Archetypes that serve a particular legal services purpose. These archetypes are reusable and manageable as objects within the Agreements Network.

Workflows. A workflow smart contract monitors a specific sequence of events prescribed by an Active Agreement. Separate but related workflows are used during formation and execution of the same Active Agreement. Workflow smart contracts are designed using the Monax Business Process Modeling Engine. Workflow factories. Workflow factories process a sequence of prescribed events, create a specific process contract and register smart contract that within the network. Active Agreements and Agreement factories use workflow factories to execute logic.

Attestations. Attestations are endorsements of fitness of purpose of an Active Agreement made by qualified individual. In return for putting their reputation at stake they are rewarded when a template consumer instantiates an agreement to which they have attested.

Get started as a Network validator

Agreements Network Users

Network Validators assure the operational backbone for the network blockchain by bonding tokens and participating in the decentralized consensus mechanism. In return, Validators earn a Maintenance Fee over the lifecycle of each Active Agreement, based upon their positive contributions to the Agreements Network.

Install Dependencies

The Go programing language is used to build all the necessary tools. Please first install Go, Git, and Make.

Lastly, we need to install jq which is an sed like tool that makes it easy and simple to work with json files as well as curl which is a command line utility to download files.

Create your own key and send us the information

First you will need Hyperledger Burrow which is the base blockchain node used for the Agreements Network.

# Fetch the source but do not build
go get -d github.com/hyperledger/burrow/cmd/burrow 
# Enter source directory in order to do a full build
cd $GOPATH/src/github.com/hyperledger/burrow
# Install Burrow with version metadata into $GOPATH/bin
make install_db

burrow keys is a simple tool for generating keys, along with producing and verifying signatures. These features are exposed through the burrow keys tool.

Run burrow keys server on the machine you intend to run as validator and save the process ID in a variable.

burrow keys server &

Next we generate a key with the below command. In the below command we do not give the key a passphrase to encrypt it on disk, but that option is up to you. If you would like to stop the server after your session and/or when you're not running burrow then run pkill burrow.

ADDR=$(burrow keys gen --no-password)

Next also we will pass the new key's address into the export command to give us the output we need.

burrow keys export --addr $ADDR | jq '{Address: .Address, PublicKey: .PublicKey }' > validator_info.json

The final step is to send validator_info.json to the Network Validator Waiting List and keep a note of the validator key you will need to configure your node. When you send the email, we'd love to learn a bit about your organization and why you'd like to join the validator pool.

GET
your_keys_sorted

Boot your burrow node and connect into the network

Once we have confirmed that your key has been moved off the waiting list into the active network then you will boot your local node in the following manner.

(N.B. if you've stoped your keys server then restart it with the commands above. You'll also need to manually add your address into the $ADDR shell variable.)

First you will need Hyperledger Burrow which is the base blockchain node used for the Agreements Network.

go get github.com/hyperledger/burrow/cmd/burrow

Now that we have burrow available on our machine we will set it up to connect to the network. First, we'll need to download the genesis.json which sets the beginning of the network along with the burrow.toml that has all the key variables preconfigured. They are both available with a simple curl command.

curl -L https://info.agreements.network/t3/genesis.json > genesis.json
curl -L https://info.agreements.network/t3/burrow.toml > burrow.toml

Now we are all set to boot our node and connect into the network. From the same directory where you saved your burrow.toml and genesis.json please run the below command. In the below command, you'll change ORGNAME to something which clearly identifies your node on the network.

burrow start \
    --validator-moniker ORGNAME-t3.agreements.network-validator \
    --validator-address $ADDR

Operational Notes

If you are running this on a cloud box you may want to run within tmux or screen so that you can detach from the shell without shutting down the node. At a minimum you'll want to add & or &disown to the end of the command if you are not running within tmux or screen.

Be aware that burrow is a relatively chatty client and over weeks may accumulate a lot of logs. If you're using file based logging make sure that you build a log rotation so that your cloud box does not overfill.

If you're running burrow in a Kubernetes cluster or via Docker then all the commands listed above can be handled with envirnoment variables (i.e., BURROW_VALIDATOR_MONIKER, BURROW_VALIDATOR_ADDRESS and BURROW_VALIDATOR_PASSPHRASE). There is a helm chart for burrow which may be helpful as well.

Structure of the API documentation

The following sections provide in depth guidance and information on the Agreements Network's REST API and Contracts API.

Agreements Network REST API

This is the REST API group for the Agreements Network.

Agreements

Create an Agreement

Success-Response:

Name Type Description
The json

address of the created Agreement

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

POST
/agreements

Example Requests

Success Response

{
	"address": "6EDC6101F0B64156ED867BAE925F6CD240635656"
}

Success 200

Error 4xx

Create a Agreement Collection

Creates an Active Agreement Collection.

Success Object

Name Type Description
name String

Active Agreement Collection name

author String

Address of the creator (user account or org), logged in user address will be used if none supplied

collectionType Number

Type of collection

packageId String

The packageId of the archetype package from which the collection was created

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/agreement-collections

Example Requests

Success Response

{
	"id": "9FBC54D1E8224307DA7E74BC54D1E829764E2DE7AD0D8DF6EBC54D1E82ADBCFF"
}

Success 200

Error 4xx

Read an Agreement

Retrieves Active Agreement information for a single Agreement. Note: if the password provided is incorrect or a hoard reference which does not exist was passed to the posted Active Agreement this get will return a 401.

Success Object

Name Type Description
address String

Active Agreement's address

name String

Human readable name of the Active Agreement

archetype String

Address of the parent Archetype of the Active Agreement

isPrivate Boolean

Whether the encryption framework of the Active Agreement is operational or not

eventLogHoardAddress String

Hoard address of where event log is stored

eventLogHoardSecret String

Hoard secret of where event log is stored

maxNumberOfEvents Number

Max number of fulfillment events that can be stored in the event log

legalState Number

Legal state of the agreement

formationProcessInstance Number

Address of the agreement's formation process instance

executionProcessInstance Number

Address of the agreement's execution process instance

parties Object[]

An array of objects with each party member's address, user id or organization name, signature timestamp, and address of the user that has signed for the party

parameters Object[]

The " parameter-name " and values of the parameters.

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/agreements/:address

Example Requests

Success Response

				 {
				  "address": "9F24307DA7E74BC54D1E829764E2DE7AD0D8DF6E",
				  "name": "Agreement",
				  "archetype": "707791D3BBD4FDDE615D0EC4BB0EB3D909F66890",
				  "isPrivate": false,
				  "eventLogHoardAddress": "0000000000000000000000000000000000000000000000000000000000000000",
   				  "eventLogHoardSecret": "0000000000000000000000000000000000000000000000000000000000000000",
				  "maxNumberOfEvents": 0,
				  "legalState": 1,
				  "formationProcessInstance": "413AC7610E6A4E0ACEB29596FFC52D243A2E7CD7",
  				  "executionProcessInstance": "0000000000000000000000000000000000000000",
				  "parties": [
					  "address": "A072341D3BBD4FDD3CD5D0EBADB0EB37887E3311",
					  "organizationName": "Drones Delight"
					  "signatureTimestamp": 1529588821427,
					  "completedBy": "BE98345FEDCD465D0EBADB0EB3789F234ECBD"
				  ],
				  "parameters": {
				     "parameterName": "parameterValue",
				     ...
				   }
				 }

Success 200

Error 4xx

Read an Agreement Collection

Retrieves information for a single Agreement Collection.

Success Object

Name Type Description
id String

Agreement Collection id

name String

Human readable name of the Agreement Collection

author String

Controller contract of the user or organization

collectionType Number

Type of collection

packageId String

The packageId of the archetype package from which the collection was created

agreements Object[]

Array of agreement objects included in the collection

GET
/agreement-collections/:id

Example Requests

Success Response

	{
		"id": "7F2CA849A318E7FA2473B3442B7AC86A84DD3AA054F567BCF5D27D9622FCD0BD",
		"name": "Agreement Collection 1",
		"author": "707791D3BBD4FDDE615D0EC4BB0EB3D909F66890",
		"collectionType": 2,
		"packageId": "9FBC54D1E8224307DA7E74BC54D1E829764E2DE7AD0D8DF6EBC54D1E82ADBCFF",
		"agreements": [
			{
				"name": "Agreement 1",
				"address": "E615D0EC4BB0EDDE615D0EC4BB0EB3D909F66890",
				"archetype": "42B7AC86A84DD3AA054F567BCF5D27D9622FCD0B"
			}
		]
  }

Success 200

Read Agreement Collections

Retrieves Active Agreement Collection information.

Success Objects Array

Name Type Description
id String

Active Agreement Collection id

name String

Human readable name of the Active Agreement Collection

author String

Address of the creator (user account or org)

collectionType Number

Type of collection

packageId String

The packageId of the archetype package from which the collection was created.

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/agreement-collections

Example Requests

Success Response

[
 {
  "id": "9FBC54D1E8224307DA7E74BC54D1E829764E2DE7AD0D8DF6EBC54D1E82ADBCFF",
  "name": "Agreement Collection 1",
  "author": "707791D3BBD4FDDE615D0EC4BB0EB3D909F66890",
  "collectionType": 2,
  "packageId": "7F2CA849A318E7FA2473B3442B7AC86A84DD3AA054F567BCF5D27D9622FCD0BD"
 }
]

Success 200

Error 4xx

Read Tasks of an Agreement

Retrieves completed task information for a single Agreement.

Success Object

Name Type Description
agreementAddress String

Active Agreement's address

agreementName String

Human readable name of the Active Agreement

processDefinitionAddress String
processAddress String
processName String

Human readable name of process

activityId String

Human readable name of activity

activityInstanceId String

address of activity instance

created Integer

Unix timestamp of activity creation

performer String

Address of assignee

completedBy String

Address of contract that completed task

state Integer

Number that maps to the state of the task

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/agreements/:address/tasks

Example Requests

Success Response

 {
	"agreementAddress": "391F69095A291E21079A78F0F67EE167D7628AE2",
	"agreementName": "Agreement Name"
	"processDefinitionAddress": "0506903B34830785168D840BB70D7D48D31A5C1F",
	"processAddress": "5128E9E1776CB45F351E226A3DC476964A07BBC0",
	"processName": "Ship",
	"activityId": "buyItem",
	"activityInstanceId": "DA3745AD5DCD2E53854ED699AD73E2C550BA5AB3E484AACCCC0FDBF959C8A3FF",
	"created": 1528923353,
	"performer": "36ADA22D3A4B841EFB73414CD97C35C0A660C1C2",
	"completedBy": "36ADA22D3A4B841EFB73414CD97C35C0A660C1C2",
	"state": 2,
 }

Success 200

Error 4xx

Read Agreements

Retrieves Active Agreement information.

Success Objects Array

Name Type Description
address String

Active Agreement's address

name String

Human readable name of the Active Agreement

archetype String

Address of the parent Archetype of the Active Agreement

isPrivate Boolean

Whether the encryption framework of the Active Agreement is operational or not

numberOfParties Number

The number of parties agreeing to the Active Agreement

hoardAddress String

The hoard content-addressable storage address of the Active Agreement

hoardSecret String

The hashed hoard secret key

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/agreements

Example Requests

Success Response

[
 {
  "address": "9F24307DA7E74BC54D1E829764E2DE7AD0D8DF6E",
  "name": "Agreement",
  "archetype": "707791D3BBD4FDDE615D0EC4BB0EB3D909F66890",
  "isPrivate": false,
  "numberOfParties": 2,
  "hoardAddress": "ABCDEF0123456789ABCDEF0123456789",
  "hoardSecret": "ABCDEF0123456789ABCDEF0123456789"
 }
]

Success 200

Error 4xx

Cancel an Agreement

Cancels an agreement if the authenticated user is a member of the agreement parties, or a member of an organization that is an agreement party

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

PUT
/agreements

Example Requests

Error 4xx

Sign an Agreement

Signs an agreement by the authenticated user

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

PUT
/agreements

Example Requests

Error 4xx

Add a Fulfillment Event to an Agreement

Success Object

Name Type Description
address String

The hoard address of the updated event log

secretKey String

The hoard secret key of the updated event log

salt String

The hoard salt of the updated event log

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

PUT
/agreements/:address/events

Example Requests

Success Response

{
 "address": "9F24307DA7E74BC54D1E829764E2DE7AD0D8DF6E",
 "secretKey": ABCDEF0123456789ABCDEF0123456789,
 "salt": ""
}

Success 200

Error 4xx

Archetypes

Add an archetype to a package

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

PUT
/archetype-packages/:id/archetype/:address

Example Requests

Error 4xx

Create an Archetype

Success-Response:

Name Type Description
The json

address of the created Archetype

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

POST
/archetypes

Example Requests

Success Response

{
	"address": "6EDC6101F0B64156ED867BAE925F6CD240635656"
}

Success 200

Error 4xx

Create an Archetype Package

Success-Response:

Name Type Description
The json

id of the created Archetype Package

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

POST
/archetypes/packages

Example Requests

Success Response

{
	"id": "7F2CA849A318E7FA2473B3442B7AC86A84DD3AA054F567BCF5D27D9622FCD0BD"
}

Success 200

Error 4xx

Read an Archetype

Retrieves archetype information for a single Archetype. Note: if the password provided is incorrect or a hoard reference which does not exist was passed to the posted archetype this get will return a 401.

Success Object

Name Type Description
address String

Archetype's address

name String

Human readable name of the Archetype

author String

Controller contract of the user or organization that created the Archetype

active Boolean

Whether the Archetype can be used to create new Active Agreements or not

isPrivate Boolean

Whether the encryption framework of the Archetype is operational or not

parameters Object[]

The " name " and " type " of all custom parameters used by the Archetype

documents Object[]

The " name " , " hoardAddress " and " secretKey " (if any) sufficient to provide the information regarding the relevant documents associated with the Archetype

jurisdictions Object[]

The " country " and " regions " which the Archetype has been registered as relevant to. The " country " is registered as an ISO standard two character string and " regions " is an array of addresses relating to the controlling contracts for the region (see ISO standards manipulation section).

GET
/archetypes/:address

Example Requests

Success Response

{
 "address": "707791D3BBD4FDDE615D0EC4BB0EB3D909F66890",
 "name": "TestType1",
 "author": "6EDC6101F0B64156ED867BAE925F6CD240635656",
 "active": false,
 "isPrivate": false,
 "parameters": [
  {"name": "NumberOfTeenageDaughters", "type": 4},
  {"name": "ExitClause", "type": 2}
 ],
 "documents": [
  {"name": "Dok1", "hoardAddress": ..., "secretKey": ...}
 ],
 "jurisdictions": [
  {"country": "US", "regions": ["0304CA03C4E9DD0F9676A4463D42BCB686331A5361570D9BF7BC211C1BCA9F1E","04E01B41ABD856ECAE38A06FB81005A911271B4BF483C10F31C539031C399101"]},
  {"country": "CA", "regions": []}
 ]
}

Success 200

Read an Archetype Package

Retrieves information for a single archetype package.

Success Object

Name Type Description
id String

Archetype Package id

name String

Human readable name of the Archetype Package

description String

Human readable description of the Archetype Package

author String

Controller contract of the user or organization

archetypes Object[]

Array of archetypes with name and address pairs that created the Archetype Package

GET
/archetype-packages/:id

Example Requests

Success Response

{
  "id": "7F2CA849A318E7FA2473B3442B7AC86A84DD3AA054F567BCF5D27D9622FCD0BD",
  "name": "Package1",
  "description": "Package Description",
	"author": "6EDC6101F0B64156ED867BAE925F6CD240635656",
	"archetypes": [
		{
			"name": "Archetype 1",
			"address": "4156ED867BAE4156ED867BAE925F6CD240635656"
		},
		{
			"name": "Archetype 2",
			"address": "406356867BAE4156ED867BAE925F6CD240635656"
		}
	]
}

Success 200

Read Archetype Packages

Retrieves archetype package information. Within the Agreements Network, Archetype Packages are collections of archetypes that are related in some way.

Success Objects Array

Name Type Description
id String

Archetype Package id

name String

Human readable name of the Archetype Pacakge

author String

Controller contract of the user or organization that created the package

GET
/archetypes

Example Requests

Success Response

[
 {
  "id": "7F2CA849A318E7FA2473B3442B7AC86A84DD3AA054F567BCF5D27D9622FCD0BD",
  "name": "Package1",
  "author": "6EDC6101F0B64156ED867BAE925F6CD240635656"
 }
]

Success 200

Read Archetypes

Retrieves archetype information. Within the Agreements Network, Archetypes are the fundamental, top level objects. They are holders for a set of information which allows users to creat Active Agreements within the Platform.

Success Objects Array

Name Type Description
address String

Archetype's address

name String

Human readable name of the Archetype

author String

Controller contract of the user or organization that created the Archetype

active Boolean

Whether the Archetype can be used to create new Active Agreements or not

isPrivate Boolean

Whether the encryption framework of the Archetype is operational or not

numberOfParameters Number

The number of custom parameters used by the Archetype

numberOfDocuments Number

The number of documents registered against the Archetype

countries String[]

The jurisdictions in which the Archetype has been registered to be active

GET
/archetypes

Example Requests

Success Response

[
 {
  "address": "707791D3BBD4FDDE615D0EC4BB0EB3D909F66890",
  "name": "TestType1",
  "author": "6EDC6101F0B64156ED867BAE925F6CD240635656",
  "active": false,
  "isPrivate": false,
  "numberOfParameters": 2,
  "numberOfDocuments": 1,
  "countries": ["US","CA"]
 }
]

Success 200

BPMModel

Read All Process Definitions

Success Objects Array

Name Type Description
object Object[]

Process Definition object

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/bpm/process-definitions

Example Requests

Success Response

[
  {
      "modelAddress":"912A82D4C72847EF1EC76426544EAA992993EE20",
      "processDefinitionAddress":"81A817870C6C6A209150FA26BC52D835CA6E17D2",
      "id":"defaultFormationProcess",
      "name":"Default Formation Process",
      "interfaceId":"Agreement Formation",
      "diagramAddress":"7D85BB76DB402B752F84792FF50B40483922673CF277CD2045D3D9637D4CE8F9",
      "diagramSecret":"4AF3A863BF6F2AD79E4919F562252866CBDA58E3E5AA27E2C5C94BAE9931BE74"
  },{
      "modelAddress":"912A82D4C72847EF1EC76426544EAA992993EE20",
      "processDefinitionAddress":"A043C06EB2FB91F4811F51F6500744906FD0903E",
      "id":"defaultExecutionProcess",
      "name":"Default Execution Process",
      "interfaceId":"Agreement Execution",
      "diagramAddress":"7D85BB76DB402B752F84792FF50B40483922673CF277CD2045D3D9637D4CE8F9",
      "diagramSecret":"4AF3A863BF6F2AD79E4919F562252866CBDA58E3E5AA27E2C5C94BAE9931BE74"
  }
]

Success 200

Error 4xx

Read Single Process Definition

Success Object

Name Type Description
modelAddress String

Address of the model the process definition was created under

processDefinitionAddress String

Address of the process definition

id String

Id of the process definition

name String

Human-readable name of the process definition

interfaceId String

'Agreement Formation' or 'Agreement Execution'

diagramAddress String

Hoard address for the xml file representing the process

diagramSecret String

Hoard secret for the xml file representing the process

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/bpm/process-definitions/:address

Example Requests

Success Response

{
    "modelAddress":"912A82D4C72847EF1EC76426544EAA992993EE20",
    "processDefinitionAddress":"81A817870C6C6A209150FA26BC52D835CA6E17D2",
    "id":"defaultFormationProcess",
    "name":"Default Formation Process",
    "interfaceId":"Agreement Formation",
    "diagramAddress":"7D85BB76DB402B752F84792FF50B40483922673CF277CD2045D3D9637D4CE8F9",
    "diagramSecret":"4AF3A863BF6F2AD79E4919F562252866CBDA58E3E5AA27E2C5C94BAE9931BE74"
}

Success 200

Error 4xx

Read Diagram of Process Model

Reads the diagram of the specified process model in the requested MIME type. The 'Accept' header in the request should be set to either 'application/xml' or 'application/json'.

Success Object

Name Type Description
object Object[]

Object representing the process definition

id String

Id of the process definition

name String

Human-readable name of the process definition

interface String

'Agreement Formation' or 'Agreement Execution'

participants Array

Array of participant objects

tasks Array

Array of task objects

userTasks Array

Array of user tasks

sendTasks Array

Array of send tasks

receiveTasks Array

Array of receive tasks

serviceTasks Array

Array of service tasks

subProcesses Array

Array of subprocesses

transitions Array

Array of transitions

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/bpm/process-models/:address/diagram

Example Requests

Success Response

[
    {
        "id":"Process_1rywjij",
        "name":"Process Name",
        "interface":"Agreement Formation",
        "participants":[{
            "id":"Lane_1mjalez",
            "name":"Assignee",
            "tasks":[
                "Task Name"
            ],
            "conditionalPerformer":true,
            "dataStorageId":"agreement",
            "dataPath":"Assignee"
        }],
        "tasks":[],
        "userTasks":[{
            "id":"Task Name",
            "name":"Task Name",
            "assignee":"Lane_1mjalez",
            "activityType":0,
            "taskType":1,
            "behavior":1,
            "multiInstance":false,
            "application":"",
            "subProcessModelId":"",
            "subProcessDefinitionId":""
        }],
        "sendTasks":[],
        "receiveTasks":[],
        "serviceTasks":[],
        "subProcesses":[],
        "transitions":[]
    }
]

Success 200

Error 4xx

Read Process Models

Success Object Array

Name Type Description
modelAddress String
id String
name String
versionMajor Number
versionMinor Number
versionPatch Number
active Boolean
Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/bpm/process-models

Example Requests

Success Response

[
    {
        "modelAddress":"912A82D4C72847EF1EC76426544EAA992993EE20",
        "id":"0000000000000000000000000000000000000000000000000000000000000000",
        "name":"0000000000000000000000000000000000000000000000000000000000000000",
        "versionMajor":0,
        "versionMinor":0,
        "versionPatch":0,
        "active":true
    }
]

Success 200

Error 4xx

BPMModel_BPMN_XML_needs_to_be_passed_in_the_request_body_as_plain_text_or_application_xml

Parse BPMN XML and from it create a process model and definition

Success Object

Name Type Description
Address Object

of process model, process definition(s) and start activity id(s)

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

POST
/bpm/process-models

Example Requests

Success Response

{
    "model": {
        "id": "model_10",
        "address": "3650839FB751186AC9B1B2BBDD30E23D7926D6E6"
    },
    "processes": [
        {
            "id": "Process_1",
            "address": "B19BA0D61DD95958C4B6B8F11B03477C24738D53",
            "startActivity": "Task_0m3bxv3"
            "interfaceId": "Agreement Formation",
            "name": "Process Name",
            "modelAddress": "234AC325FEAD83822BCDDE83813223DEA3AD",
            "participants": "[{"id":"Lane_0dcbbm2","name":"Lane Label 1","tasks":[null],"conditionalPerformer":true,"dataStorageId":"agreement","dataPath":"seller"}]"
        },
        {
            "id": "Process_2",
            "address": "696133F794C0B87C0E40FEE4144648798C508379",
            "startActivity": "Task_0a1ijkc"
            "interfaceId": "Agreement Execution",
            "name": "Process Name",
            "modelAddress": "234AC325FEAD83822BCDDE83813223DEA3AD",
            "participants": "[{"id":"Lane_0dcttm4","name":"Lane Label 2","tasks":[null],"conditionalPerformer":true,"dataStorageId":"agreement","dataPath":"buyer"}]"
        }
    ]
}

Success 200

Error 4xx

BPMRuntime

Complete task identified by the activityInstanceId

Completes the activity identified by the activityInstanceId.

PUT
/tasks/:activityInstanceId/complete

Example Requests

Read Activities

Read all activities.

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/activity-instances

Example Requests

Error 4xx

Read Tasks

Retrieves an array of tasks assigned to the logged in user

Success Objects Array

Name Type Description
object Object[]

Array of task objects

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/tasks

Example Requests

Success Response

[
    {
        "activityId": "userActivity",
        "assignee": "AC1E0E841141FFF510350D04696174C8B4BDF53A",
        "created": 1498768880,
        "processId": "testProcessId",
        "processName": "testProcessName",
        "application": "",
        "state": "SUSPENDED"
    }
]

Success 200

Error 4xx

Content

Read Content Object

GET
/hoard

Example Requests

Organizations

Create a New Organization

Creating a new organization also established the primary administrators for that organization If no approvers are provided for the organization, then the currently logged-in user will be registered as an approver.

Success-Response:

Name Type Description
The json

address of the created Organization

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

POST
/organizations

Example Requests

Success Response

{
	"address": "6EDC6101F0B64156ED867BAE925F6CD240635656"
}

Success 200

Error 4xx

Read Organizations

Success Objects Array

Name Type Description
address String

Organization's Controller Contract

id String

Organization's machine readable ID

name String

Organization's human readable name

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/organizations

Example Requests

Success Response

[
 {"address": "9F24307DA7E74BC54D1E829764E2DE7AD0D8DF6E", "id": "acmecorp92", "name": "ACME Corp"}
]

Success 200

Error 4xx

An Organization's Users

Success Objects Array

Name Type Description
address String

Users controller contract

id String

Users's machine readable ID

organization String

Organization's controller contract

organizationId String

Organization's machine readable ID

organizationName String

Organization's human readable name

active Boolean

Whether the user is active with the organization

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/organizations/:address/users

Example Requests

Success Response

   [
    {
     "address": "2BFCC5D3FD4CB5FF62CDF101CA9B1CE8F3E9C1DB",
     "id": "AHZZMJvNp6",
     "organization": "771190B939D92AC5C4E668602337DB3B4884B7FD",
     "organizationId": "acmecorp739",
     "organizationName": "ACME Corp",
     "active": false
    }
	 ]

Success 200

Error 4xx

Read a Single Organization

Success Object

Name Type Description
address String

Organization's Controller Contract

id String

Organization's machine readable ID

name String

Organization's human readable name

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/organizations/:address

Example Requests

Success Response

{"address": "9F24307DA7E74BC54D1E829764E2DE7AD0D8DF6E", "id": "acmecorp92", "name": "ACME Corp"}

Success 200

Error 4xx

Removes a user from Organization

Name Type Description
Success
Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

DELETE
/organizations/:orgId/users/:userAddress

Example Requests

200

Error 4xx

Adds user to Organization

Name Type Description
Success
Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

PUT
/organizations/:orgId/users/:userAddress

Example Requests

200

Error 4xx

Runtime

Sign the agreement and complete the activity

Signs the agreement at the given address and then completes the activity identified by the activityInstanceId.

PUT
/tasks/:activityInstanceId/complete/:agreementAddress/sign

Example Requests

StaticData

Read Countries

Success Objects Array

Name Type Description
countries Object[]

An array of countries objects (see below)

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/static-data/iso/countries

Example Requests

Success Response

[
    {
        "country": "US",
        "alpha2": "US",
        "alpha3": "USA",
        "m49": "840",
        "name": "United States of America"
    }
]

Success 200

Error 4xx

Read Country

Retrieves the country whose alpha2 code matches the one passed as parameter.

Success Object

Name Type Description
country Object

A single countries objects (see below)

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/static-data/iso/countries/:alpha2

Example Requests

Success Response

{
    "country": "US",
    "alpha2": "US",
    "alpha3": "USA",
    "m49": "840",
    "name": "United States of America"
}

Success 200

Error 4xx

Read Currencies

Success Objects Array

Name Type Description
currencies Object[]

An array of currencies objects (see below)

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/static-data/iso/currencies

Example Requests

Success Response

[
    {
        "currency": "AED",
        "alpha3": "AED",
        "m49": "784",
        "name": "United Arab Emirates dirham"
    },
    {
        "currency": "AFN",
        "alpha3": "AFN",
        "m49": "971",
        "name": "Afghan afghani"
    }
]

Success 200

Error 4xx

Read Currency

Retrieves the currency whose alpha3 code matches the one passed as parameter.

Success Objects Array

Name Type Description
currency Object

A single currency objects (see below)

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/static-data/iso/currencies/:alpha3

Example Requests

Success Response

{
    "currency": "USD",
    "alpha3": "USD",
    "m49": "840",
    "name": "United States dollar"
}

Success 200

Error 4xx

Read Parameter Types

Success Objects Array

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/static-data/parameter-types

Example Requests

Success Response

[
    {"parameterType": 0, "label": "Boolean"},
    {"parameterType": 1, "label": "String"},
    {"parameterType": 2, "label": "Number"},
    {"parameterType": 3, "label": "Date"},
    {"parameterType": 4, "label": "Monetary Amount"},
    {"parameterType": 5, "label": "User/Organization"},
    {"parameterType": 6, "label": "Contract Address"},
    {"parameterType": 7, "label": "Signing Party"}
]

Error 4xx

Read a Country's Regions

Retrieves an array of regions belonging to the country whose alpha2 code matches the one passed as parameter. Note that a region may have its code2 OR code3 property populated, NOT both. Thus to represent regions in the UI dropdown, we can use <alpha2>-<code2 or code3> followed by the name.

Success Objects Array

Name Type Description
regions Object[]

An array of regions objects (see below)

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/static-data/iso/countries/:alpha2/regions

Example Requests

Success Response

[
    {
        "country": "CA",
        "region": "0798FDAD71114ABA2A3CD6B4BD503410F8EF6B9208B889CC0BB33CD57CEEAA9C",
        "alpha2": "CA",
        "code2": "AB",
        "code3": "",
        "name": "Alberta"
    },
    {
        "country": "CA",
        "region": "1C16E32AED9920491BFED16E1396344027C8D6916833C64CE7F8CCF541398F3B",
        "alpha2": "CA",
        "code2": "NT",
        "code3": "",
        "name": "Northwest Territories"
    }
]

Success 200

Error 4xx

Users

Update User Profile of currently logged in user

Updates a single users profile identified by the access token.

Success Object

Name Type Description
address String

Users's Controller Contract

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

PUT
/users/profile

Example Requests

Success Response

{
	"address": "605401BB8B9E597CC40C35D1F0185DE94DBCE533",
}

Success 200

Error 4xx

Log out a User

POST
/users/logout

Example Requests

Request password reset for a user account

Sends an email with a password recovery code to the given email address

POST
/users/password-recovery

Example Requests

Read User Profile of currently logged in user

Retrieves a single users profile identified by the access token.

Success Object

Name Type Description
address String

Users's Controller Contract

id String

Users's human readable ID

email String

Users's email address

organization String

Organization's Controller Contract

organizationId String

Organization's machine readable ID

organizationName String

Organization's human readable name

firstName String

User's first name

lastName String

User's last name

country String

User's country code

region String

Contract address of user's region

isProducer Boolean

Boolean representing whether user account is producer type (as opposed to consumer type)

onboarding Boolean

Boolean representing whether user prefers to see onboarding screens

createdAt String

Timestamp of user account creation

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/users/profile

Example Requests

Success Response

			 {
			  "address": "9F24307DA7E74BC54D1E829764E2DE7AD0D8DF6E",
			  "id": "j.smith",
			  "email": "[email protected]",
			  "organization": "707791D3BBD4FDDE615D0EC4BB0EB3D909F66890",
			  "organizationId": "acmecorp92",
			  "organizationName": "ACME Corp",
			  "firstName": "Joe",
 			  "lastName": "Smith",
			  "country": "CA",
			  "region": "1232SDFF3EC680332BEFDDC3CA12CBBD",
			  "isProducer": false,
			  "onboarding": true,
			  "createdAt": ""
			 }

Success 200

Error 4xx

Read Users

Retrieves user information. The organization query parameter is optional. It can be used to filter users belonging to a specific organization or retrieving users not belonging to an organization, yet (via ?organization=null).

Note: The organization address is returned as "0000000000000000000000000000000000000000" for user that do not belong to an organization.

Success Objects Array

Name Type Description
address String

Users's Controller Contract

id String

Users's machine readable ID

organization String

Organization's Controller Contract

organizationId String

Organization's machine readable ID

organizationName String

Organization's human readable name

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/users

Example Requests

Success Response

[
 {
  "address": "9F24307DA7E74BC54D1E829764E2DE7AD0D8DF6E",
  "id": "j.smith",
  "organization": "707791D3BBD4FDDE615D0EC4BB0EB3D909F66890",
  "organizationId": "acmecorp92",
  "organizationName": "ACME Corp"
 }
]

Success 200

Error 4xx

Create a New User

Creating a new user

Success Object

Name Type Description
userData Object

The " address " and " id " of the User

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

POST
/users

Example Requests

Success Response

{
	"address": "605401BB8B9E597CC40C35D1F0185DE94DBCE533",
	"id": "johnsmith"
}

Success 200

Error 4xx

Reset password for user account

Resets the user's password with the given password, if the recovery code is valid

PUT
/users/password-recovery/:recoveryCode

Example Requests

Log in as a User

Success Object

Name Type Description
address String

The address of the user

id String

The id (username) of the user

A String

timestamp of the account creation

POST
/users/login

Example Requests

Success Response

 {
		"address": "41D6BC9143DF87A07F65FCAF642FB89E16D26548",
		"id": "jsmith",
		"createdAt": "2018-06-25T13:44:26.925Z"
	}

Success 200

Validates the given password recovery code

Checks if the given password recovery code is valid

GET
/users/password-recovery/:recoveryCode

Example Requests

Validate user token

This route validates the JWT access_token which should be set as cookie in the request

Success Object

Name Type Description
NotLoggedIn

The user making the request does not have a proper authentication token.

GET
/users/token/validate

Example Requests

Success Response

 {
		"address": "41D6BC9143DF87A07F65FCAF642FB89E16D26548",
		"id": "jsmith",
	}

Error 4xx

Agreements Network Contracts

The Agreements Network suite of smart contracts are solidity based and provide a near no-code solution for most of the users of the Network.

Below you will find the specifics on how to interact with the smart contracts via solidity based CALLS. These calls can be managed in a variety of ways, from other smart contracts or from various non-blockchain clients.

agreements

AbstractDataStorage

The AbstractDataStorage contract is found within the agreements bundle.

getNumberOfArrayEntries(bytes32,bool)

Returns the number of non-default entries in the specified array-type DataStorage field


getNumberOfArrayEntries(bytes32,bool)

CALL
getNumberOfArrayEntries(bytes32,bool)

Parameters

_fullscan // if false the function will return as soon as a default value (0 for int/uint, 0x0 for address, "" for bytes32, etc.) is encountered, if true the array will be scanned to its end
_id // the key under which to find the array-type value

Return

the number of non-default entries in the array

DbUpgradeable

The DbUpgradeable contract is found within the agreements bundle.

compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


getVersion()

Returns the version as 3-digit array


major()

returns the major version number


minor()

returns the minor version number


patch()

returns the patch version number


transferSystemOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


upgrade(address)

Checks the version and invokes migrateTo and migrateTo in order to transfer state (push then pull)


compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

major()

CALL
major()

minor()

CALL
minor()

patch()

CALL
patch()

transferSystemOwnership(address)

CALL
transferSystemOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

upgrade(address)

CALL
upgrade(address)

AbstractEventListener

The AbstractEventListener contract is found within the agreements bundle.

eventFired(bytes32,address)

See EventListener.eventFired(bytes32,address)


eventFired(bytes32,address,address)

See EventListener.eventFired(bytes32,address,address)


eventFired(bytes32,address,bytes32)

See EventListener.eventFired(bytes32,address,bytes32)


eventFired(bytes32,address,string)

See EventListener.eventFired(bytes32,address,string)


eventFired(bytes32,address,uint256)

See EventListener.eventFired(bytes32,address,uint)


eventFired(bytes32,address)

CALL
eventFired(bytes32,address)

eventFired(bytes32,address,address)

CALL
eventFired(bytes32,address,address)

eventFired(bytes32,address,bytes32)

CALL
eventFired(bytes32,address,bytes32)

eventFired(bytes32,address,string)

CALL
eventFired(bytes32,address,string)

eventFired(bytes32,address,uint256)

CALL
eventFired(bytes32,address,uint256)

AbstractNamedElement

The AbstractNamedElement contract is found within the agreements bundle.

getId()

Returns the ID of this contract.


getName()

Returns the name of this contract.


getId()

CALL
getId()

Return

the bytes32 ID

getName()

CALL
getName()

Return

the bytes32 name

AccountsManager Interface

The AccountsManager Interface contract is found within the agreements bundle.

addBusinessAccount(address)

Adds the specified BusinessAccount


addFunds(address,bytes32,uint256)

Adds the specified fund amount to the specified organization's business account.


addUserAccount(address)

Adds the specified UserAccount


addUserToOrganization(address,address)

Associates the given user with the specified organization.


businessAccountExists(address,bytes32)

Indicates whether the specified business account exists for the given organization ID


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


createUserAccount(address,bytes32)

Creates and adds a user account


getBusinessAccount(address,bytes32)

Returns the business account address for the specified organization ID and business account name.


getBusinessAccount(bytes32)

Returns the business account address for the specified business account ID.


getUserAccount(bytes32)

Returns the user account address for the specified user account ID.


getUserAccountDataById(bytes32)

Gets hashed user account ID and user account address for the specified user account ID.


getVersion()

Returns the version as 3-digit array


isDestroyOnUpgrade()

To be implemented to signal whether this contract should be destroyed after a successful upgrade.


major()

returns the major version number


migrateFrom(address)

Implements the migration of state from the specified predecessor to this contract. This method can be used to 'read' the state of the other contract which is probably easier to achieve.


migrateTo(address)

Implements the migration of state this contract to the specified contract. This method can be used to 'write' the state from this contract to the success. It's probably a little less useful since it requires the successor contract to have appropriate functions to set state.


minor()

returns the minor version number


patch()

returns the patch version number


removeUserFromOrganization(address,address)

Removes (deactivates) the given user from the specified organization.


upgrade(address)

Checks the version and invokes migrateTo and migrateTo in order to transfer state (push then pull)


userAccountExists(bytes32)

Indicates whether the specified user account exists for the given userAccount ID


withdrawFunds(address,bytes32,uint256)

Subtracts the specified fund amount to the specified organization's business account.


addBusinessAccount(address)

CALL
addBusinessAccount(address)

Return

an error code

addFunds(address,bytes32,uint256)

CALL
addFunds(address,bytes32,uint256)

Parameters

_funds // the amount to add
_name // the business account name
_organization // the organization's address

Return

error code

addUserAccount(address)

CALL
addUserAccount(address)

Return

an error code

addUserToOrganization(address,address)

CALL
addUserToOrganization(address,address)

Parameters

_organization // the organization
_userAccount // the user

Return

error code indicating success or failure

businessAccountExists(address,bytes32)

CALL
businessAccountExists(address,bytes32)

Parameters

_name // businessAccount name
_organization // the organization's address

Return

bool exists

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

createUserAccount(address,bytes32)

CALL
createUserAccount(address,bytes32)

Parameters

_id // id (optional)
_owner // owner (optional)

Return

error BaseErrors.NO_ERROR() or BaseErrors.RUNTIME_ERROR() if a runtime erroruserAccount user account

getBusinessAccount(address,bytes32)

CALL
getBusinessAccount(address,bytes32)

Parameters

_name // businessAccount name
_organization // the organization's address

Return

(error, address)

getBusinessAccount(bytes32)

CALL
getBusinessAccount(bytes32)

getUserAccount(bytes32)

CALL
getUserAccount(bytes32)

getUserAccountDataById(bytes32)

CALL
getUserAccountDataById(bytes32)

Parameters

_id // the user account ID

Return

error RESOURCE_NOT_FOUND or NO_ERRORaddr user account addresshashedId hashed user account ID

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

isDestroyOnUpgrade()

CALL
isDestroyOnUpgrade()

major()

CALL
major()

migrateFrom(address)

CALL
migrateFrom(address)

Parameters

predecessor // the address from which the state is migrated

Return

result the result of the operation, e.g. a constant from commons-base/BaseErrors.sol

migrateTo(address)

CALL
migrateTo(address)

Parameters

successor // the address to which the state is migrated

Return

result the result of the operation, e.g. a constant from commons-base/BaseErrors.sol

minor()

CALL
minor()

patch()

CALL
patch()

removeUserFromOrganization(address,address)

CALL
removeUserFromOrganization(address,address)

Parameters

_organization // the organization
_userAccount // the user

Return

error code indicating success or failure

upgrade(address)

CALL
upgrade(address)

userAccountExists(bytes32)

CALL
userAccountExists(bytes32)

Parameters

_id // userAccount ID

Return

bool exists

withdrawFunds(address,bytes32,uint256)

CALL
withdrawFunds(address,bytes32,uint256)

Parameters

_funds // the amount to withdraw
_name // the business account name
_organization // the organization's address

Return

error code

ActiveAgreement Interface

The ActiveAgreement Interface contract is found within the agreements bundle.

addEventListener(bytes32)

Adds the msg.sender as listener for the specified event.


addEventListener(bytes32,address)

Adds the msg.sender as listener for the specified event.


cancel()

Registers the msg.sender as having cancelled the agreement. During formation (legal states DRAFT and FORMULATED), the agreement can cancelled unilaterally by one of the parties to the agreement. During execution (legal state EXECUTED), the agreement can only be canceled if all parties agree to do so by invoking this function.


getArchetype()

Returns the archetype


getCreator()

Returns the creator


getDataIdAtIndex(uint256)

Returns the data id at the given index


getDataType(bytes32)

Returns the data type of the Data object identified by the given id


getDataValueAsAddress(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsAddressArray(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBool(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes16Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes1Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes20Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes24Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes28Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes2Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes32Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes3Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes4Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes8Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsInt(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsInt128Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsInt16Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsInt256Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsInt32Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsInt64Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsInt8Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsString(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsUint(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsUint128Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsUint16Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsUint256Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsUint32Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsUint64Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsUint8Array(bytes32)

Gets the value of the Data object identified by the given id


getEventLogReference()

Returns the Hoard Address and Hoard Secret for the Event Log


getHoardAddress()

Returns the Hoard Address


getLegalState()

Returns the legal state of this agreement


getMaxNumberOfEvents()

Returns the max number of events for the event log


getName()

Returns the name of this contract.


getNumberOfArrayEntries(bytes32,bool)

Returns the number of non-default entries in the specified array-type DataStorage field


getNumberOfParties()

Gets number of parties


getParty(uint256)

Gets party


getSignatureDetails(address)

Returns the timestamp of the signature of the given party.


getSize()

Returns the size of the DataMap


gethoardSecret()

Returns the Hoard Secret


isPrivate()

Returns the private state


isSignedBy(address)

Returns whether the given account's signature is on the agreement.


removeData(bytes32)

Removes the Data identified by the id from the DataMap


removeEventListener(bytes32)

Removes the msg.sender from the list of listeners for the specified event.


removeEventListener(bytes32,address)

Removes the msg.sender from the list of listeners for the specified event.


setDataValueAsAddress(bytes32,address)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsAddressArray(bytes32,address[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBool(bytes32,bool)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes(bytes32,bytes32,uint8)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes16Array(bytes32,bytes16[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes1Array(bytes32,bytes1[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes20Array(bytes32,bytes20[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes24Array(bytes32,bytes24[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes28Array(bytes32,bytes28[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes2Array(bytes32,bytes2[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes32(bytes32,bytes32)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes32Array(bytes32,bytes32[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes3Array(bytes32,bytes3[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes4Array(bytes32,bytes4[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes8Array(bytes32,bytes8[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsInt(bytes32,int256,uint8)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsInt128Array(bytes32,int128[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsInt16Array(bytes32,int16[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsInt256(bytes32,int256)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsInt256Array(bytes32,int256[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsInt32Array(bytes32,int32[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsInt64Array(bytes32,int64[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsInt8Array(bytes32,int8[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsString(bytes32,string)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUint(bytes32,uint256,uint8)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUint128Array(bytes32,uint128[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUint16Array(bytes32,uint16[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUint256(bytes32,uint256)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUint256Array(bytes32,uint256[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUint32Array(bytes32,uint32[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUint64Array(bytes32,uint64[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUint8Array(bytes32,uint8[100])

Creates a Data object with the given value and inserts it into the DataMap


setEventLogReference(bytes32,bytes32)

Sets the Hoard Address and Hoard Secret for the Event Log


setFulfilled()

Sets the legal state of this agreement to Agreements.LegalState.FULFILLED. Note: All other legal states are set by internal logic.


sign()

Applies the msg.sender signature


addEventListener(bytes32)

CALL
addEventListener(bytes32)

Parameters

_event // the event to subscribe to

addEventListener(bytes32,address)

CALL
addEventListener(bytes32,address)

Parameters

_event // the event to subscribe to
_listener // the address of an EventListener

cancel()

CALL
cancel()

Return

BaseErrors.INVALID_ACTOR() if the msg.sender is not a party on this agreement, BaseErrors.NO_ERROR() otherwise.

getArchetype()

CALL
getArchetype()

Return

the archetype address

getCreator()

CALL
getCreator()

Return

the creator

getDataIdAtIndex(uint256)

CALL
getDataIdAtIndex(uint256)

Parameters

_index // the index of the data

Return

error uint error code id bytes32 id of the data

getDataType(bytes32)

CALL
getDataType(bytes32)

Parameters

_id // the id of the data

Return

uint8 the DataType

getDataValueAsAddress(bytes32)

CALL
getDataValueAsAddress(bytes32)

Parameters

_id // the id of the data

Return

address the value of the data

getDataValueAsAddressArray(bytes32)

CALL
getDataValueAsAddressArray(bytes32)

Parameters

_id // the id of the data

Return

address[100] the value of the data

getDataValueAsBool(bytes32)

CALL
getDataValueAsBool(bytes32)

Parameters

_id // the id of the data

Return

bool the bool value of the data

getDataValueAsBytes(bytes32)

CALL
getDataValueAsBytes(bytes32)

Parameters

_id // the id of the data

Return

bytes32 the value of the data

getDataValueAsBytes16Array(bytes32)

CALL
getDataValueAsBytes16Array(bytes32)

Parameters

_id // the id of the data

Return

bytes16[100] the value of the data

getDataValueAsBytes1Array(bytes32)

CALL
getDataValueAsBytes1Array(bytes32)

Parameters

_id // the id of the data

Return

bytes1[100] the value of the data

getDataValueAsBytes20Array(bytes32)

CALL
getDataValueAsBytes20Array(bytes32)

Parameters

_id // the id of the data

Return

bytes20[100] the value of the data

getDataValueAsBytes24Array(bytes32)

CALL
getDataValueAsBytes24Array(bytes32)

Parameters

_id // the id of the data

Return

bytes24[100] the value of the data

getDataValueAsBytes28Array(bytes32)

CALL
getDataValueAsBytes28Array(bytes32)

Parameters

_id // the id of the data

Return

bytes28[100] the value of the data

getDataValueAsBytes2Array(bytes32)

CALL
getDataValueAsBytes2Array(bytes32)

Parameters

_id // the id of the data

Return

bytes2[100] the value of the data

getDataValueAsBytes32Array(bytes32)

CALL
getDataValueAsBytes32Array(bytes32)

Parameters

_id // the id of the data

Return

bytes32[100] the value of the data

getDataValueAsBytes3Array(bytes32)

CALL
getDataValueAsBytes3Array(bytes32)

Parameters

_id // the id of the data

Return

bytes3[100] the value of the data

getDataValueAsBytes4Array(bytes32)

CALL
getDataValueAsBytes4Array(bytes32)

Parameters

_id // the id of the data

Return

bytes4[100] the value of the data

getDataValueAsBytes8Array(bytes32)

CALL
getDataValueAsBytes8Array(bytes32)

Parameters

_id // the id of the data

Return

bytes8[100] the value of the data

getDataValueAsInt(bytes32)

CALL
getDataValueAsInt(bytes32)

Parameters

_id // the id of the data

Return

int the value of the data

getDataValueAsInt128Array(bytes32)

CALL
getDataValueAsInt128Array(bytes32)

Parameters

_id // the id of the data

Return

int128[100] the value of the data

getDataValueAsInt16Array(bytes32)

CALL
getDataValueAsInt16Array(bytes32)

Parameters

_id // the id of the data

Return

int16[100] the value of the data

getDataValueAsInt256Array(bytes32)

CALL
getDataValueAsInt256Array(bytes32)

Parameters

_id // the id of the data

Return

int256[100] the value of the data

getDataValueAsInt32Array(bytes32)

CALL
getDataValueAsInt32Array(bytes32)

Parameters

_id // the id of the data

Return

int32[100] the value of the data

getDataValueAsInt64Array(bytes32)

CALL
getDataValueAsInt64Array(bytes32)

Parameters

_id // the id of the data

Return

int64[100] the value of the data

getDataValueAsInt8Array(bytes32)

CALL
getDataValueAsInt8Array(bytes32)

Parameters

_id // the id of the data

Return

int8[100] the value of the data

getDataValueAsString(bytes32)

CALL
getDataValueAsString(bytes32)

Parameters

_id // the id of the data

Return

string the value of the data

getDataValueAsUint(bytes32)

CALL
getDataValueAsUint(bytes32)

Parameters

_id // the id of the data

Return

uint the value of the data

getDataValueAsUint128Array(bytes32)

CALL
getDataValueAsUint128Array(bytes32)

Parameters

_id // the id of the data

Return

uint128[100] the value of the data

getDataValueAsUint16Array(bytes32)

CALL
getDataValueAsUint16Array(bytes32)

Parameters

_id // the id of the data

Return

uint16[100] the value of the data

getDataValueAsUint256Array(bytes32)

CALL
getDataValueAsUint256Array(bytes32)

Parameters

_id // the id of the data

Return

uint256[100] the value of the data

getDataValueAsUint32Array(bytes32)

CALL
getDataValueAsUint32Array(bytes32)

Parameters

_id // the id of the data

Return

uint32[100] the value of the data

getDataValueAsUint64Array(bytes32)

CALL
getDataValueAsUint64Array(bytes32)

Parameters

_id // the id of the data

Return

uint64[100] the value of the data

getDataValueAsUint8Array(bytes32)

CALL
getDataValueAsUint8Array(bytes32)

Parameters

_id // the id of the data

Return

uint8[100] the value of the data

getEventLogReference()

CALL
getEventLogReference()

Return

the Hoard Address and Hoard Secret for the Event Log

getHoardAddress()

CALL
getHoardAddress()

Return

the Hoard Address

getLegalState()

CALL
getLegalState()

Return

the Agreements.LegalState as a uint

getMaxNumberOfEvents()

CALL
getMaxNumberOfEvents()

Return

the max number of events for the event log

getName()

CALL
getName()

Return

the bytes32 name

getNumberOfArrayEntries(bytes32,bool)

CALL
getNumberOfArrayEntries(bytes32,bool)

Parameters

_fullscan // if false the function will return as soon as a default value (0 for int/uint, 0x0 for address, "" for bytes32, etc.) is encountered, if true the array will be scanned to its end
_key // the key for the array-type value

Return

the number of non-default entries in the array

getNumberOfParties()

CALL
getNumberOfParties()

Return

size number of parties

getParty(uint256)

CALL
getParty(uint256)

Parameters

_index // index

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS() if index out of boundsparty party

getSignatureDetails(address)

CALL
getSignatureDetails(address)

Parameters

_party // the signing party

Return

the address of the signee (if the party authorized a signee other than itself)the time of signing or 0 if the address is not a party to this agreement or has not signed yet

getSize()

CALL
getSize()

Return

uint the size

gethoardSecret()

CALL
gethoardSecret()

Return

the Hoard Secret

isPrivate()

CALL
isPrivate()

Return

the private flag 

isSignedBy(address)

CALL
isSignedBy(address)

Parameters

_signee // The account to check

Return

true if the provided address is a recorded signature on the agreement, false otherwise

removeData(bytes32)

CALL
removeData(bytes32)

Parameters

_id // the id of the data

Return

uint error code

removeEventListener(bytes32)

CALL
removeEventListener(bytes32)

Parameters

_event // the event to unsubscribe from

removeEventListener(bytes32,address)

CALL
removeEventListener(bytes32,address)

Parameters

_event // the event to unsubscribe from
_listener // the address of an EventListener

setDataValueAsAddress(bytes32,address)

CALL
setDataValueAsAddress(bytes32,address)

Parameters

_id // the id of the data
_value // the address value of the data

setDataValueAsAddressArray(bytes32,address[100])

CALL
setDataValueAsAddressArray(bytes32,address[100])

Parameters

_id // the id of the data
_value // the address[100] value of the data

setDataValueAsBool(bytes32,bool)

CALL
setDataValueAsBool(bytes32,bool)

Parameters

_id // the id of the data
_value // the bool value of the data

setDataValueAsBytes(bytes32,bytes32,uint8)

CALL
setDataValueAsBytes(bytes32,bytes32,uint8)

Parameters

_dataType // the uint8 data type of the value denoting the bytes size
_id // the id of the data
_value // the bytes16 value of the data

setDataValueAsBytes16Array(bytes32,bytes16[100])

CALL
setDataValueAsBytes16Array(bytes32,bytes16[100])

Parameters

_id // the id of the data
_value // the bytes16[100] value of the data

setDataValueAsBytes1Array(bytes32,bytes1[100])

CALL
setDataValueAsBytes1Array(bytes32,bytes1[100])

Parameters

_id // the id of the data
_value // the bytes1[100] value of the data

setDataValueAsBytes20Array(bytes32,bytes20[100])

CALL
setDataValueAsBytes20Array(bytes32,bytes20[100])

Parameters

_id // the id of the data
_value // the bytes20[100] value of the data

setDataValueAsBytes24Array(bytes32,bytes24[100])

CALL
setDataValueAsBytes24Array(bytes32,bytes24[100])

Parameters

_id // the id of the data
_value // the bytes24[100] value of the data

setDataValueAsBytes28Array(bytes32,bytes28[100])

CALL
setDataValueAsBytes28Array(bytes32,bytes28[100])

Parameters

_id // the id of the data
_value // the bytes28[100] value of the data

setDataValueAsBytes2Array(bytes32,bytes2[100])

CALL
setDataValueAsBytes2Array(bytes32,bytes2[100])

Parameters

_id // the id of the data
_value // the bytes2[100] value of the data

setDataValueAsBytes32(bytes32,bytes32)

CALL
setDataValueAsBytes32(bytes32,bytes32)

Parameters

_id // the id of the data
_value // the bytes32 value of the data

setDataValueAsBytes32Array(bytes32,bytes32[100])

CALL
setDataValueAsBytes32Array(bytes32,bytes32[100])

Parameters

_id // the id of the data
_value // the bytes32[100] value of the data

setDataValueAsBytes3Array(bytes32,bytes3[100])

CALL
setDataValueAsBytes3Array(bytes32,bytes3[100])

Parameters

_id // the id of the data
_value // the bytes3[100] value of the data

setDataValueAsBytes4Array(bytes32,bytes4[100])

CALL
setDataValueAsBytes4Array(bytes32,bytes4[100])

Parameters

_id // the id of the data
_value // the bytes4[100] value of the data

setDataValueAsBytes8Array(bytes32,bytes8[100])

CALL
setDataValueAsBytes8Array(bytes32,bytes8[100])

Parameters

_id // the id of the data
_value // the bytes8[100] value of the data

setDataValueAsInt(bytes32,int256,uint8)

CALL
setDataValueAsInt(bytes32,int256,uint8)

Parameters

_dataType // the uint8 DataType denoting the size
_id // the id of the data
_value // the int value of the data

setDataValueAsInt128Array(bytes32,int128[100])

CALL
setDataValueAsInt128Array(bytes32,int128[100])

Parameters

_id // the id of the data
_value // the int128[100] value of the data

setDataValueAsInt16Array(bytes32,int16[100])

CALL
setDataValueAsInt16Array(bytes32,int16[100])

Parameters

_id // the id of the data
_value // the int16[100] value of the data

setDataValueAsInt256(bytes32,int256)

CALL
setDataValueAsInt256(bytes32,int256)

Parameters

_id // the id of the data
_value // the int value of the data

setDataValueAsInt256Array(bytes32,int256[100])

CALL
setDataValueAsInt256Array(bytes32,int256[100])

Parameters

_id // the id of the data
_value // the int256[100] value of the data

setDataValueAsInt32Array(bytes32,int32[100])

CALL
setDataValueAsInt32Array(bytes32,int32[100])

Parameters

_id // the id of the data
_value // the int32[100] value of the data

setDataValueAsInt64Array(bytes32,int64[100])

CALL
setDataValueAsInt64Array(bytes32,int64[100])

Parameters

_id // the id of the data
_value // the int64[100] value of the data

setDataValueAsInt8Array(bytes32,int8[100])

CALL
setDataValueAsInt8Array(bytes32,int8[100])

Parameters

_id // the id of the data
_value // the int8[100] value of the data

setDataValueAsString(bytes32,string)

CALL
setDataValueAsString(bytes32,string)

Parameters

_id // the id of the data
_value // the string value of the data

setDataValueAsUint(bytes32,uint256,uint8)

CALL
setDataValueAsUint(bytes32,uint256,uint8)

Parameters

_dataType // the uint8 DataType denoting the size
_id // the id of the data
_value // the uint value of the data

setDataValueAsUint128Array(bytes32,uint128[100])

CALL
setDataValueAsUint128Array(bytes32,uint128[100])

Parameters

_id // the id of the data
_value // the uint128[100] value of the data

setDataValueAsUint16Array(bytes32,uint16[100])

CALL
setDataValueAsUint16Array(bytes32,uint16[100])

Parameters

_id // the id of the data
_value // the uint16[100] value of the data

setDataValueAsUint256(bytes32,uint256)

CALL
setDataValueAsUint256(bytes32,uint256)

Parameters

_id // the id of the data
_value // the uint value of the data

setDataValueAsUint256Array(bytes32,uint256[100])

CALL
setDataValueAsUint256Array(bytes32,uint256[100])

Parameters

_id // the id of the data
_value // the uint256[100] value of the data

setDataValueAsUint32Array(bytes32,uint32[100])

CALL
setDataValueAsUint32Array(bytes32,uint32[100])

Parameters

_id // the id of the data
_value // the uint32[100] value of the data

setDataValueAsUint64Array(bytes32,uint64[100])

CALL
setDataValueAsUint64Array(bytes32,uint64[100])

Parameters

_id // the id of the data
_value // the uint64[100] value of the data

setDataValueAsUint8Array(bytes32,uint8[100])

CALL
setDataValueAsUint8Array(bytes32,uint8[100])

Parameters

_id // the id of the data
_value // the uint8[100] value of the data

setEventLogReference(bytes32,bytes32)

CALL
setEventLogReference(bytes32,bytes32)

setFulfilled()

CALL
setFulfilled()

sign()

CALL
sign()

Return

an error code indicating success or failure

ActiveAgreementRegistry Interface

The ActiveAgreementRegistry Interface contract is found within the agreements bundle.

addAgreementToCollection(bytes32,address)

Adds an agreement to given collection


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


createAgreement(address,bytes32,address,bytes32,bytes32,bytes32,bytes32,uint256,bool,address[],bytes32)

Creates an Active Agreement with the given parameters


createAgreementCollection(string,address,uint8,bytes32)

Creates a new agreement collection


createUserAccount(address,address,bytes32)

Creates a AgreementPartyAccount with the specified parameters and adds it to the AccountsManager


eventFired(bytes32,address)

Invoked by an EventEmitter for a named event without any additional data.


eventFired(bytes32,address,address)

Invoked by an EventEmitter for a named event with an additional address payload.


eventFired(bytes32,address,bytes32)

Invoked by an EventEmitter for a named event with an additional bytes32 payload.


eventFired(bytes32,address,string)

Invoked by an EventEmitter for a named event with an additional string payload.


eventFired(bytes32,address,uint256)

Invoked by an EventEmitter for a named event with an additional uint payload.


getActiveAgreementAtIndex(uint256)

Gets activeAgreement address at given index


getActiveAgreementData(address)

Returns data about the ActiveAgreement at the specified address


getActiveAgreementsSize()

Gets number of activeAgreements


getAgreementAtIndexInCollection(bytes32,uint256)

Gets agreement address at index in colelction


getAgreementCollectionAtIndex(uint256)

Gets collection id at index


getAgreementCollectionData(bytes32)

Gets collection data by id


getAgreementDataInCollection(bytes32,address)

Get agreement data by collection id and agreement address


getAgreementParameterAtIndex(address,uint256)

Returns the process data ID at the specified index


getAgreementParameterDetails(address,bytes32)

Returns information about the process data entry for the specified process and data ID


getArchetypeRegistry()

Returns the ArchetypeRegistry address


getBpmService()

Returns the BpmService address


getNumberOfAgreementCollections()

Gets number of agreement collections


getNumberOfAgreementParameters(address)

Returns the number of agreement parameter entries.


getNumberOfAgreementsInCollection(bytes32)

Gets number of agreements in given collection


getPartiesByActiveAgreementSize(address)

Gets parties size for given Active Agreement


getPartyByActiveAgreementAtIndex(address,uint256)

Gets getPartyByActiveAgreementAtIndex


getPartyByActiveAgreementData(address,address)

Returns data about the given party's signature on the specified agreement.


getVersion()

Returns the version as 3-digit array


isDestroyOnUpgrade()

To be implemented to signal whether this contract should be destroyed after a successful upgrade.


major()

returns the major version number


migrateFrom(address)

Implements the migration of state from the specified predecessor to this contract. This method can be used to 'read' the state of the other contract which is probably easier to achieve.


migrateTo(address)

Implements the migration of state this contract to the specified contract. This method can be used to 'write' the state from this contract to the success. It's probably a little less useful since it requires the successor contract to have appropriate functions to set state.


minor()

returns the minor version number


patch()

returns the patch version number


processStateChanged(address)

Invoked by a ProcessStateChangeEventEmitter to notify of process state change


setArchetypeRegistry(address)

Sets the ArchetypeRegistry reference


setBpmService(address)

Sets the BpmService reference to use for controlling the agreement workflows.


setEventLogReference(address,bytes32,bytes32)

Updates the hoard address and secret for the event log of the specified agreement


startFormation(address)

Creates a starts a ProcessInstance to handle the formation workflow as defined by the given agreement's archetype.


upgrade(address)

Checks the version and invokes migrateTo and migrateTo in order to transfer state (push then pull)


addAgreementToCollection(bytes32,address)

CALL
addAgreementToCollection(bytes32,address)

Parameters

_agreement // agreement address
_collectionId // the bytes32 collection id

Return

error BaseErrors.NO_ERROR(), BaseErrors.RESOURCE_NOT_FOUND() collection by given id does not exist

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

createAgreement(address,bytes32,address,bytes32,bytes32,bytes32,bytes32,uint256,bool,address[],bytes32)

CALL
createAgreement(address,bytes32,address,bytes32,bytes32,bytes32,bytes32,uint256,bool,address[],bytes32)

Parameters

_archetype // archetype
_collectionId // id of agreement collection (optional)
_hoardAddress // Address of agreement params in hoard
_hoardSecret // Secret for hoard retrieval
_name // name
_parties // parties

Return

error - BaseErrors.NO_ERROR(), BaseErrors.NULL_PARAM_NOT_ALLOWED() if _archetype or _name is nullactiveAgreement - the new ActiveAgreement's address, if successfully created, 0x0 otherwise

createAgreementCollection(string,address,uint8,bytes32)

CALL
createAgreementCollection(string,address,uint8,bytes32)

Parameters

_author // address of author
_name // name

Return

error BaseErrors.NO_ERROR(), BaseErrors.NULL_PARAM_NOT_ALLOWED(), BaseErrors.RESOURCE_ALREADY_EXISTS()id bytes32 id of package

createUserAccount(address,address,bytes32)

CALL
createUserAccount(address,address,bytes32)

Parameters

_accountsManager // the AccountsManager address
_id // id (optional)
_owner // owner (optional)

Return

error BaseErrors.RESOURCE_ALREADY_EXISTS() or BaseErrors.NO_ERROR()userAccount user account address, or 0x0 if not successful

eventFired(bytes32,address)

CALL
eventFired(bytes32,address)

Parameters

_event // the event name
_source // the source of the event

eventFired(bytes32,address,address)

CALL
eventFired(bytes32,address,address)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

eventFired(bytes32,address,bytes32)

CALL
eventFired(bytes32,address,bytes32)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

eventFired(bytes32,address,string)

CALL
eventFired(bytes32,address,string)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

eventFired(bytes32,address,uint256)

CALL
eventFired(bytes32,address,uint256)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

getActiveAgreementAtIndex(uint256)

CALL
getActiveAgreementAtIndex(uint256)

Parameters

_index // index

Return

the Active Agreement address

getActiveAgreementData(address)

CALL
getActiveAgreementData(address)

Parameters

_activeAgreement // Active Agreement

Return

archetype - the agreement's archetype adressname - the name of the agreementcreator - the creator of the agreementhoardAddress - address of the agreement parameters in hoard (only used when agreement is private)hoardSecret - secret for retrieval of hoard parameterseventLogHoardAddress - address of the agreement's event log in hoardeventLogHoardSecret - secret for retrieval of the hoard event log filemaxNumberOfEvents - the maximum number of events allowed to be stored for this agreementisPrivate - whether the agreement's parameters are private, i.e. stored off-chain in hoardlegalState - the agreement's Agreement.LegalState as uint8formationProcessInstance - the address of the process instance representing the formation of this agreementexecutionProcessInstance - the address of the process instance representing the execution of this agreement

getActiveAgreementsSize()

CALL
getActiveAgreementsSize()

Return

size size

getAgreementAtIndexInCollection(bytes32,uint256)

CALL
getAgreementAtIndexInCollection(bytes32,uint256)

Parameters

_id // id of the collection
_index // uint index

Return

agreement address of archetype

getAgreementCollectionAtIndex(uint256)

CALL
getAgreementCollectionAtIndex(uint256)

Parameters

_index // uint index

Return

id bytes32 id

getAgreementCollectionData(bytes32)

CALL
getAgreementCollectionData(bytes32)

Parameters

_id // bytes32 collection id

Return

name stringauthor addresscollectionType type of collectionpackageId id of the archetype package

getAgreementDataInCollection(bytes32,address)

CALL
getAgreementDataInCollection(bytes32,address)

Parameters

_agreement // address of agreement
_id // id of the collection

Return

agreementName name of agreementarchetype address of archetype

getAgreementParameterAtIndex(address,uint256)

CALL
getAgreementParameterAtIndex(address,uint256)

Parameters

_pos // the index

Return

the data ID

getAgreementParameterDetails(address,bytes32)

CALL
getAgreementParameterDetails(address,bytes32)

Parameters

_address // the active agreement
_dataId // the data ID

Return

(process,id,uintValue,bytes32Value,addressValue,boolValue)

getArchetypeRegistry()

CALL
getArchetypeRegistry()

Return

address the ArchetypeRegistry

getBpmService()

CALL
getBpmService()

Return

address the BpmService

getNumberOfAgreementCollections()

CALL
getNumberOfAgreementCollections()

Return

size size

getNumberOfAgreementParameters(address)

CALL
getNumberOfAgreementParameters(address)

Return

the number of parameters

getNumberOfAgreementsInCollection(bytes32)

CALL
getNumberOfAgreementsInCollection(bytes32)

Parameters

_id // id of the collection

Return

size agreement count

getPartiesByActiveAgreementSize(address)

CALL
getPartiesByActiveAgreementSize(address)

Parameters

_activeAgreement // Active Agreement

Return

size size

getPartyByActiveAgreementAtIndex(address,uint256)

CALL
getPartyByActiveAgreementAtIndex(address,uint256)

Parameters

_activeAgreement // Active Agreement
_index // index

Return

party party

getPartyByActiveAgreementData(address,address)

CALL
getPartyByActiveAgreementData(address,address)

Parameters

_activeAgreement // the ActiveAgreement
_party // the signing party

Return

signedBy the actual signature authorized by the partysignatureTimestamp the timestamp when the party has signed, or 0 if not signed yet

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

isDestroyOnUpgrade()

CALL
isDestroyOnUpgrade()

major()

CALL
major()

migrateFrom(address)

CALL
migrateFrom(address)

Parameters

predecessor // the address from which the state is migrated

Return

result the result of the operation, e.g. a constant from commons-base/BaseErrors.sol

migrateTo(address)

CALL
migrateTo(address)

Parameters

successor // the address to which the state is migrated

Return

result the result of the operation, e.g. a constant from commons-base/BaseErrors.sol

minor()

CALL
minor()

patch()

CALL
patch()

processStateChanged(address)

CALL
processStateChanged(address)

Parameters

_pi // the process instance whose state changed

setArchetypeRegistry(address)

CALL
setArchetypeRegistry(address)

Parameters

_archetypeRegistry // the ArchetypeRegistry

setBpmService(address)

CALL
setBpmService(address)

Parameters

_service // the BpmService

setEventLogReference(address,bytes32,bytes32)

CALL
setEventLogReference(address,bytes32,bytes32)

Parameters

_activeAgreement // Address of active agreement
_eventLogHoardAddress // New hoard address of event log for agreement
_eventLogHoardSecret // New hoard secret key of event log for agreement

startFormation(address)

CALL
startFormation(address)

Parameters

_agreement // an ActiveAgreement

Return

error - an error code indicating success or failurethe address of the ProcessInstance, if successful

upgrade(address)

CALL
upgrade(address)

ActiveAgreementRegistryDb Interface

The ActiveAgreementRegistryDb Interface contract is found within the agreements bundle.

transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

AgreementPartyAccount

The AgreementPartyAccount contract is found within the agreements bundle.

cancelAgreement(address)

Signs the provided ActiveAgreement contract


completeActivity(bytes32,address)

Completes the specified activity using the given BpmService to locate the relevant ProcessInstance. This sets the msg.sender of the call to the address of this proxy contract, so that it can be used to authorize the task completion.


getId()

Returns this account's ID


getOrganization()

Returns this user account's organization, if it is associated with one.


getOwner()

Returns this account's owner


setOrganization(address)

Sets the organization of this user account


signAgreement(address)

Signs the provided ActiveAgreement contract


transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


cancelAgreement(address)

CALL
cancelAgreement(address)

Parameters

_agreement // the address of a ActiveAgreement

Return

error code if the signing failed

completeActivity(bytes32,address)

CALL
completeActivity(bytes32,address)

Parameters

_activityInstanceId // the task ID
_service // the BpmService required for lookup and access to the BpmServiceDb

Return

error code if the completion failed

getId()

CALL
getId()

getOrganization()

CALL
getOrganization()

Return

the organization's address or 0x0

getOwner()

CALL
getOwner()

setOrganization(address)

CALL
setOrganization(address)

Parameters

_organization // the organization's address with which to associate this user account

Return

BaseErrors.NO_ERROR() or BaseErrors.OVERWRITE_NOT_ALLOWED() if the organization is already set

signAgreement(address)

CALL
signAgreement(address)

Parameters

_agreement // the address of a ActiveAgreement

Return

error code if the signing failed

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

AgreementPartyProxy

The AgreementPartyProxy contract is found within the agreements bundle.

cancelAgreement(address)

Signs the provided ActiveAgreement contract


completeActivity(bytes32,address)

Completes the specified activity using the given BpmService to locate the relevant ProcessInstance. This sets the msg.sender of the call to the address of this proxy contract, so that it can be used to authorize the task completion.


signAgreement(address)

Signs the provided ActiveAgreement contract


cancelAgreement(address)

CALL
cancelAgreement(address)

Parameters

_agreement // the address of a ActiveAgreement

Return

error code if the signing failed

completeActivity(bytes32,address)

CALL
completeActivity(bytes32,address)

Parameters

_activityInstanceId // the task ID
_service // the BpmService required for lookup and access to the BpmServiceDb

Return

error code if the completion failed

signAgreement(address)

CALL
signAgreement(address)

Parameters

_agreement // the address of a ActiveAgreement

Return

error code if the signing failed

AgreementSignatureCheck Interface

The AgreementSignatureCheck Interface contract is found within the agreements bundle.

complete(address,bytes32,bytes32,address)

Treats the provided DataStorage as the agreement and checks if the TX performer has applied a signature. The function will throw if the presence of the signature could not be established. NOTE: Not used parameters


complete(address,bytes32,bytes32,address)

CALL
complete(address,bytes32,bytes32,address)

Parameters

_dataStorage // the Agreement
_txPerformer // the address performing the transaction

AgreementsAPI

The AgreementsAPI contract is found within the agreements bundle.

authorizePartyActor(ActiveAgreement)

Evaluates the msg.sender and tx.origin against the given agreement to determine if there is an authorized party/actor relationship.


isFullyExecuted(ActiveAgreement)

Checks whether the given agreement is fully executed.


authorizePartyActor(ActiveAgreement)

CALL
authorizePartyActor(ActiveAgreement)

Parameters

_agreement // an ActiveAgreement

Return

actor - the address of either msg.sender or tx.origin depending on which one was authorized; 0x0 if authorization failedparty - the agreement party associated with the identified actor. This is typically the same as the actor, but can also contain an Organization address if an Organization was registered as a party. 0x0 if authorization failed

isFullyExecuted(ActiveAgreement)

CALL
isFullyExecuted(ActiveAgreement)

Parameters

_agreement // an ActiveAgreement

Return

true if all parties have signed, false otherwise

ApplicationRegistry Interface

The ApplicationRegistry Interface contract is found within the agreements bundle.

addApplication(bytes32,uint8,address,bytes4,bytes32,bytes32)

Adds an application with the given parameters to this ProcessModel


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


getApplicationAccessPathAtIndex(bytes32,uint256,uint8)

Returns information about the specified I/O access path of an application


getApplicationAtIndex(uint256)

Returns the ID of the application at the given index


getApplicationData(bytes32)

Returns information about the application with the given ID


getNumberOfApplications()

Returns the number of applications defined in this ProcessModel


getVersion()

Returns the version as 3-digit array


isDestroyOnUpgrade()

To be implemented to signal whether this contract should be destroyed after a successful upgrade.


major()

returns the major version number


migrateFrom(address)

Implements the migration of state from the specified predecessor to this contract. This method can be used to 'read' the state of the other contract which is probably easier to achieve.


migrateTo(address)

Implements the migration of state this contract to the specified contract. This method can be used to 'write' the state from this contract to the success. It's probably a little less useful since it requires the successor contract to have appropriate functions to set state.


minor()

returns the minor version number


patch()

returns the patch version number


setApplicationAccessPath(bytes32,bytes32,uint8,uint8)

Adds an input or output declaration to the application identified by the activity ID.


upgrade(address)

Checks the version and invokes migrateTo and migrateTo in order to transfer state (push then pull)


addApplication(bytes32,uint8,address,bytes4,bytes32,bytes32)

CALL
addApplication(bytes32,uint8,address,bytes4,bytes32,bytes32)

Parameters

_eventName // the ID of an event to fire (only for event application)
_function // the signature of the completion function
_id // the ID of the application
_location // the location of the contract implementing the application
_type // the BpmModel.ApplicationType
_webForm // the hash of a web form (only for web applications)

Return

an error code indicating success or failure

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

getApplicationAccessPathAtIndex(bytes32,uint256,uint8)

CALL
getApplicationAccessPathAtIndex(bytes32,uint256,uint8)

Parameters

_direction // BpmModel.Direction.[IN|OUT]
_id // the ID of the application
_idx // the index of the input/output parameter

Return

the ID of the input/outputthe uint8 representation of the DataTypes value

getApplicationAtIndex(uint256)

CALL
getApplicationAtIndex(uint256)

Parameters

_idx // the index position

Return

the application ID, if it exists

getApplicationData(bytes32)

CALL
getApplicationData(bytes32)

Parameters

_id // the application ID

Return

applicationType the BpmModel.ApplicationType as uint8location the applications contract addressmethod the function signature of the application's completion functionwebForm the form identifier (hash) of the web application (only for a web application)eventName the identifier for an event to emit (only for event application)inputs the number of inputsoutputs the number of outputs

getNumberOfApplications()

CALL
getNumberOfApplications()

Return

the number of applications

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

isDestroyOnUpgrade()

CALL
isDestroyOnUpgrade()

major()

CALL
major()

migrateFrom(address)

CALL
migrateFrom(address)

Parameters

predecessor // the address from which the state is migrated

Return

result the result of the operation, e.g. a constant from commons-base/BaseErrors.sol

migrateTo(address)

CALL
migrateTo(address)

Parameters

successor // the address to which the state is migrated

Return

result the result of the operation, e.g. a constant from commons-base/BaseErrors.sol

minor()

CALL
minor()

patch()

CALL
patch()

setApplicationAccessPath(bytes32,bytes32,uint8,uint8)

CALL
setApplicationAccessPath(bytes32,bytes32,uint8,uint8)

Parameters

_dataType // a DataTypes code
_direction // the BpmModel.Direction (IN/OUT) of the data flow
_id // the ID of the application to which to add the declaration
_pathId // the ID of the data path

Return

an error code indicating success or failure

upgrade(address)

CALL
upgrade(address)

Archetype Interface

The Archetype Interface contract is found within the agreements bundle.

activate()

Activates this archetype


addDocument(bytes32,bytes32,bytes32)

Adds the document specified by the given parameters to the archetype


addJurisdiction(bytes2,bytes32)

Adds the given jurisdiction in the form of a country code and region identifier to this archetype. References codes defined via IsoCountries interface implementations.


addParameter(uint8,bytes32)

Adds a parameter with the specified type and name to the archetype


deactivate()

Deactivates this archetype


getAuthor()

Gets Author


getDescription()

Gets description


getDocument(bytes32)

Gets document with given name


getDocumentAtIndex(uint256)

Gets document name at index


getExecutionProcessDefinition()

Returns the address of the ProcessDefinition that orchestrates the agreement execution.


getFormationProcessDefinition()

Returns the address of the ProcessDefinition that orchestrates the agreement formation.


getJurisdictionAtIndex(uint256)

Retrieves the key for the jurisdiction at the specified index


getJurisdictionData(bytes32)

Returns information about the jurisdiction with the specified key


getName()

Returns the name of this contract.


getNumberOfDocuments()

Gets number of documents


getNumberOfJurisdictions()

Returns the number jurisdictions for this archetype


getNumberOfParameters()

Gets number of parameters


getParameterAtIndex(uint256)

Gets parameter at index


getParameterType(bytes32)

Gets parameter data type


isActive()

Returns the active state


isPrivate()

Returns the private state


activate()

CALL
activate()

Return

error code indicating success or failure

addDocument(bytes32,bytes32,bytes32)

CALL
addDocument(bytes32,bytes32,bytes32)

Parameters

_hoardAddress // hoard address
_name // name
_secretKey // secret key

Return

error code indicating success or failure

addJurisdiction(bytes2,bytes32)

CALL
addJurisdiction(bytes2,bytes32)

Parameters

_country // a ISO- code, e.g. 'US'
_region // a region identifier from a IsoCountries contract

Return

error code indicating success or failure
key of the jurisdiction just added

addParameter(uint8,bytes32)

CALL
addParameter(uint8,bytes32)

Parameters

_parameter // parameter
_parameterType // parameter type (enum)

Return

error code indicating success or failure

deactivate()

CALL
deactivate()

Return

error code indicating success or failure

getAuthor()

CALL
getAuthor()

Return

author author

getDescription()

CALL
getDescription()

Return

description

getDocument(bytes32)

CALL
getDocument(bytes32)

Parameters

_name // document name

Return

externalContent external content

getDocumentAtIndex(uint256)

CALL
getDocumentAtIndex(uint256)

Parameters

_index // index

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS() if index is out of boundsname

getExecutionProcessDefinition()

CALL
getExecutionProcessDefinition()

Return

the address of a ProcessDefinition

getFormationProcessDefinition()

CALL
getFormationProcessDefinition()

Return

the address of a ProcessDefinition

getJurisdictionAtIndex(uint256)

CALL
getJurisdictionAtIndex(uint256)

Parameters

_index // the index position

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS() if index is out of boundsthe key of the jurisdiction or an empty bytes32 if the index was out of bounds

getJurisdictionData(bytes32)

CALL
getJurisdictionData(bytes32)

Parameters

_key // the key identifying the jurisdiction

Return

the country and region identifiers (see IsoCountries), if the jurisdiction exists

getName()

CALL
getName()

Return

the bytes32 name

getNumberOfDocuments()

CALL
getNumberOfDocuments()

Return

size number of documents

getNumberOfJurisdictions()

CALL
getNumberOfJurisdictions()

Return

the number of jurisdictions

getNumberOfParameters()

CALL
getNumberOfParameters()

Return

size number of parameters

getParameterAtIndex(uint256)

CALL
getParameterAtIndex(uint256)

Parameters

_index // index

Return

error error TBDcustomField parameter

getParameterType(bytes32)

CALL
getParameterType(bytes32)

Parameters

_parameter // parameter

Return

error error TBDparameterType parameter type

isActive()

CALL
isActive()

Return

true if active, false otherwise

isPrivate()

CALL
isPrivate()

Return

true if private, false otherwise

ArchetypeRegistry Interface

The ArchetypeRegistry Interface contract is found within the agreements bundle.

activate(address)

Sets active to true for given archetype


addArchetypeToPackage(bytes32,address)

Adds archetype to package


addDocument(address,bytes32,bytes32,bytes32)

Adds Hoard document to the given Archetype


addJurisdiction(address,bytes2,bytes32)

Adds the given jurisdiction in the form of a country code and region identifier to this archetype. References codes defined via IsoCountries interface implementations.


addJurisdictions(address,bytes2[],bytes32[])

Adds the given jurisdictions in the form of a country codes and region identifiers to this archetype. References codes defined via IsoCountries interface implementations.


addParameter(address,uint8,bytes32)

Adds the specified parameter to the archetype


addParameters(address,uint8[],bytes32[])

Adds the specified parameters to the archetype


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


createArchetype(bytes32,address,string,bool,address,address,bytes32)

Creates a archetype with the given parameters


createArchetypePackage(string,string,address,bool)

Adds a new archetype package


deactivate(address)

Sets active to false for given archetype


getArchetypeAtIndex(uint256)

Gets archetype address at given index


getArchetypeAtIndexInPackage(bytes32,uint256)

Gets archetype address at index in package


getArchetypeData(address)

Returns data about the archetype at the specified address


getArchetypeDataInPackage(bytes32,address)

Get archetype data by package id and archetype address


getArchetypePackageAtIndex(uint256)

Gets package id at index


getArchetypePackageData(bytes32)

Gets package data by id


getArchetypesSize()

Gets number of archetypes


getDocumentByArchetypeAtIndex(address,uint256)

Gets document name by Archetype At index


getDocumentByArchetypeData(address,bytes32)

Returns data about the document given the specified name


getDocumentsByArchetypeSize(address)

Gets documents size for given Archetype


getJurisdictionAtIndexForArchetype(address,uint256)

Returns the jurisdiction key at the specified index for the given archetype


getJurisdictionDataForArchetype(address,bytes32)

Returns data about the jurisdiction with the specified key in the given archetype


getNumberOfArchetypePackages()

Gets number of archetype packages


getNumberOfArchetypesInPackage(bytes32)

Gets number of archetypes in given package


getNumberOfJurisdictionsForArchetype(address)

Returns the number of jurisdictions for the given Archetype


getParameterByArchetypeAtIndex(address,uint256)

Gets parameter name by Archetype At index


getParameterByArchetypeData(address,bytes32)

Returns data about the parameter at with the specified name


getParametersByArchetypeSize(address)

Gets parameters size for given Archetype


getVersion()

Returns the version as 3-digit array


isDestroyOnUpgrade()

To be implemented to signal whether this contract should be destroyed after a successful upgrade.


major()

returns the major version number


migrateFrom(address)

Implements the migration of state from the specified predecessor to this contract. This method can be used to 'read' the state of the other contract which is probably easier to achieve.


migrateTo(address)

Implements the migration of state this contract to the specified contract. This method can be used to 'write' the state from this contract to the success. It's probably a little less useful since it requires the successor contract to have appropriate functions to set state.


minor()

returns the minor version number


packageHasArchetype(bytes32,address)

Determines whether given archetype address is in the package identified by the packageId


patch()

returns the patch version number


upgrade(address)

Checks the version and invokes migrateTo and migrateTo in order to transfer state (push then pull)


activate(address)

CALL
activate(address)

Return

error BaseErrors.NO_ERROR()

addArchetypeToPackage(bytes32,address)

CALL
addArchetypeToPackage(bytes32,address)

Parameters

_archetype // the archetype address
_packageId // the bytes32 package id

Return

error BaseErrors.NO_ERROR(), BaseErrors.RESOURCE_NOT_FOUND() package by given id does not exist

addDocument(address,bytes32,bytes32,bytes32)

CALL
addDocument(address,bytes32,bytes32,bytes32)

Parameters

_archetype // archetype
_hoardAddress // hoard address
_name // name
_secretKey // secret key

Return

error BaseErrors.NO_ERROR(), BaseErrors.RESOURCE_NOT_FOUND() _archetype does not exist, or see DefaultArchetype

addJurisdiction(address,bytes2,bytes32)

CALL
addJurisdiction(address,bytes2,bytes32)

Parameters

_country // a ISO- code, e.g. 'US'
_region // a region identifier from a IsoCountries contract

Return

a return code indicating success or failure

addJurisdictions(address,bytes2[],bytes32[])

CALL
addJurisdictions(address,bytes2[],bytes32[])

Parameters

_countries // an array of a ISO- code, e.g. 'US'
_regions // an array of region identifiers from a IsoCountries contract

Return

a return code indicating success or failure

addParameter(address,uint8,bytes32)

CALL
addParameter(address,uint8,bytes32)

Parameters

_parameterName // parameter name
_parameterType // parameter type (enum)

Return

a return code indicating success or failure

addParameters(address,uint8[],bytes32[])

CALL
addParameters(address,uint8[],bytes32[])

Parameters

_parameterNames // parameter names array
_parameterTypes // parameter type (enum) array

Return

a return code indicating success or failure

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

createArchetype(bytes32,address,string,bool,address,address,bytes32)

CALL
createArchetype(bytes32,address,string,bool,address,address,bytes32)

Parameters

_author // author
_description // description
_executionProcess // the address of a ProcessDefinition that orchestrates the agreement execution
_formationProcess // the address of a ProcessDefinition that orchestrates the agreement formation
_isPrivate // determines if the archetype's documents are encrypted
_name // name
_packageId // id of package this archetype is part of (optional)

Return

error - a return code indicating success or failurearchetype - the new archetype's address, if successfully created

createArchetypePackage(string,string,address,bool)

CALL
createArchetypePackage(string,string,address,bool)

Parameters

_author // address of author (user account of organization)
_description // description
_isPrivate // makes it a private package visible to only the author
_name // name

Return

error BaseErrors.NO_ERROR(), BaseErrors.NULL_PARAM_NOT_ALLOWED(), BaseErrors.RESOURCE_ALREADY_EXISTS()id bytes32 id of package

deactivate(address)

CALL
deactivate(address)

Return

error BaseErrors.NO_ERROR()

getArchetypeAtIndex(uint256)

CALL
getArchetypeAtIndex(uint256)

Parameters

_index // index

Return

the archetype address

getArchetypeAtIndexInPackage(bytes32,uint256)

CALL
getArchetypeAtIndexInPackage(bytes32,uint256)

Parameters

_id // id of the package
_index // uint index

Return

archetype address of archetype

getArchetypeData(address)

CALL
getArchetypeData(address)

Parameters

_archetype // the archetype's address

Return

name namedescription descriptionauthor authorformationProcessDefinitionexecutionProcessDefinition

getArchetypeDataInPackage(bytes32,address)

CALL
getArchetypeDataInPackage(bytes32,address)

Parameters

_archetype // address of archetype
_id // id of the package

Return

archetypeName name of archetype

getArchetypePackageAtIndex(uint256)

CALL
getArchetypePackageAtIndex(uint256)

Parameters

_index // uint index

Return

id bytes32 id

getArchetypePackageData(bytes32)

CALL
getArchetypePackageData(bytes32)

Parameters

_id // bytes32 package id

Return

name stringdescription stringauthor addressisPrivate bool

getArchetypesSize()

CALL
getArchetypesSize()

Return

size size

getDocumentByArchetypeAtIndex(address,uint256)

CALL
getDocumentByArchetypeAtIndex(address,uint256)

Parameters

_archetype // archetype
_index // index

Return

name name

getDocumentByArchetypeData(address,bytes32)

CALL
getDocumentByArchetypeData(address,bytes32)

Parameters

_archetype // archetype
_name // name

Return

hoardAddress hoard addresssecretKey secret key

getDocumentsByArchetypeSize(address)

CALL
getDocumentsByArchetypeSize(address)

Parameters

_archetype // archetype

Return

size size

getJurisdictionAtIndexForArchetype(address,uint256)

CALL
getJurisdictionAtIndexForArchetype(address,uint256)

Parameters

_archetype // archetype address
_index // the index of the jurisdiction

Return

the jurisdiction primary key

getJurisdictionDataForArchetype(address,bytes32)

CALL
getJurisdictionDataForArchetype(address,bytes32)

Parameters

_archetype // archetype address
_key // the jurisdiction key

Return

country the jurisdiction's countryregion the jurisdiction's region

getNumberOfArchetypePackages()

CALL
getNumberOfArchetypePackages()

Return

size size

getNumberOfArchetypesInPackage(bytes32)

CALL
getNumberOfArchetypesInPackage(bytes32)

Parameters

_id // id of the package

Return

size archetype count

getNumberOfJurisdictionsForArchetype(address)

CALL
getNumberOfJurisdictionsForArchetype(address)

Parameters

_archetype // archetype address

Return

the number of jurisdictions

getParameterByArchetypeAtIndex(address,uint256)

CALL
getParameterByArchetypeAtIndex(address,uint256)

Parameters

_archetype // archetype
_index // index

Return

name name

getParameterByArchetypeData(address,bytes32)

CALL
getParameterByArchetypeData(address,bytes32)

Parameters

_archetype // archetype
_name // name

Return

parameterType parameter type

getParametersByArchetypeSize(address)

CALL
getParametersByArchetypeSize(address)

Parameters

_archetype // archetype

Return

size size

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

isDestroyOnUpgrade()

CALL
isDestroyOnUpgrade()

major()

CALL
major()

migrateFrom(address)

CALL
migrateFrom(address)

Parameters

predecessor // the address from which the state is migrated

Return

result the result of the operation, e.g. a constant from commons-base/BaseErrors.sol

migrateTo(address)

CALL
migrateTo(address)

Parameters

successor // the address to which the state is migrated

Return

result the result of the operation, e.g. a constant from commons-base/BaseErrors.sol

minor()

CALL
minor()

packageHasArchetype(bytes32,address)

CALL
packageHasArchetype(bytes32,address)

Parameters

_archetype // address of archetype
_packageId // id of the package

Return

hasArchetype bool representing if archetype is in package

patch()

CALL
patch()

upgrade(address)

CALL
upgrade(address)

ArchetypeRegistryDb Interface

The ArchetypeRegistryDb Interface contract is found within the agreements bundle.

transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

ArrayUtils Library Interface

The ArrayUtils Library Interface contract is found within the agreements bundle.

contains(address[],address)

Returns whether the specified value is present in the given array


contains(bytes32[],bytes32)

Returns whether the specified value is present in the given array


contains(int256[],int256)

Returns whether the specified value is present in the given array


contains(uint256[],uint256)

Returns whether the specified value is present in the given array


contains(address[],address)

CALL
contains(address[],address)

Parameters

_list // the array
_value // the value

Return

true if the value is found in the array, false otherwise

contains(bytes32[],bytes32)

CALL
contains(bytes32[],bytes32)

Parameters

_list // the array
_value // the value

Return

true if the value is found in the array, false otherwise

contains(int256[],int256)

CALL
contains(int256[],int256)

Parameters

_list // the array
_value // the value

Return

true if the value is found in the array, false otherwise

contains(uint256[],uint256)

CALL
contains(uint256[],uint256)

Parameters

_list // the array
_value // the value

Return

true if the value is found in the array, false otherwise

BpmService Interface

The BpmService Interface contract is found within the agreements bundle.

compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


createDefaultProcessInstance(address,address,bytes32)

Creates a new ProcessInstance initiated with the provided parameters. This ProcessInstance can be further customized and then submitted to the #startProcessInstance(ProcessInstance) function for execution.


fireActivityUpdateEvent(address,bytes32)

Fires the UpdateActivities event to update sqlsol with given activity


fireProcessDataUpdateEvent(address,bytes32)

Fires the UpdateProcessData event to update sqlsol with given information


getActivityInstanceAtIndex(address,uint256)

Returns the ActivityInstance ID at the specified index


getActivityInstanceData(address,bytes32)

Returns ActivityInstance data for the given ActivityInstance ID


getApplicationRegistry()

Returns a reference to the ApplicationRegistry currently used by this BpmService


getBpmServiceDb()

Returns a reference to the BpmServiceDb currently used by this BpmService


getNumberOfActivityInstances(address)

Returns the number of activity instances.


getNumberOfProcessData(address)

Returns the number of process data entries.


getNumberOfProcessInstances()

Returns the number of Process Instances.


getProcessDataAtIndex(address,uint256)

Returns the process data ID at the specified index


getProcessDataDetails(address,bytes32)

Returns information about the process data entry for the specified process and data ID


getProcessInstanceAtIndex(uint256)

Returns the process instance address at the specified index


getProcessInstanceData(address)

Returns information about the process intance with the specified address


getProcessInstanceForActivity(bytes32)

Returns the address of the ProcessInstance of the specified ActivityInstance ID


getProcessModelRepository()

Gets the ProcessModelRepository address for this BpmService


getVersion()

Returns the version as 3-digit array


isDestroyOnUpgrade()

To be implemented to signal whether this contract should be destroyed after a successful upgrade.


major()

returns the major version number


migrateFrom(address)

Implements the migration of state from the specified predecessor to this contract. This method can be used to 'read' the state of the other contract which is probably easier to achieve.


migrateTo(address)

Implements the migration of state this contract to the specified contract. This method can be used to 'write' the state from this contract to the success. It's probably a little less useful since it requires the successor contract to have appropriate functions to set state.


minor()

returns the minor version number


patch()

returns the patch version number


setApplicationRegistry(address)

Sets the ApplicationRegistry for this BpmService


setProcessModelRepository(address)

Sets the ProcessModelRepository for this BpmService


startProcess(address,bytes32)

Creates a new ProcessInstance based on the specified ProcessDefinition and starts its execution


startProcessFromRepository(bytes32,bytes32,bytes32)

Creates a new ProcessInstance based on the specified IDs of a ProcessModel and ProcessDefinition and starts its execution


startProcessInstance(address)

Initializes, registers, and executes a given ProcessInstance


upgrade(address)

Checks the version and invokes migrateTo and migrateTo in order to transfer state (push then pull)


compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

createDefaultProcessInstance(address,address,bytes32)

CALL
createDefaultProcessInstance(address,address,bytes32)

Parameters

_activityInstanceId // the ID of a subprocess activity instance that initiated this ProcessInstance (optional)
_processDefinition // the address of a ProcessDefinition
_startedBy // the address of an account that regarded as the starting user

fireActivityUpdateEvent(address,bytes32)

CALL
fireActivityUpdateEvent(address,bytes32)

Parameters

_activityId // - the bytes32 Id of the activity
_piAddress // - the address of the process instance to which the activity belongs

fireProcessDataUpdateEvent(address,bytes32)

CALL
fireProcessDataUpdateEvent(address,bytes32)

Parameters

_dataId // - the ID of the data entry
_piAddress // - the address of the process instance to which the activity belongs

getActivityInstanceAtIndex(address,uint256)

CALL
getActivityInstanceAtIndex(address,uint256)

Parameters

_address // the process instance address
_pos // the activity instance index

Return

the ActivityInstance ID

getActivityInstanceData(address,bytes32)

CALL
getActivityInstanceData(address,bytes32)

Parameters

_id // the global ID of the activity instance
_processInstance // the process instance address to which the ActivityInstance belongs

Return

activityId - the ID of the activity as defined by the process definitioncreated - the creation timestampcompleted - the completion timestampperformer - the account who is performing the activity (for interactive activities only)completedBy - the account who completed the activity (for interactive activities only) state - the uint8 representation of the BpmRuntime.ActivityInstanceState of this activity instance

getApplicationRegistry()

CALL
getApplicationRegistry()

Return

the ApplicationRegistry

getBpmServiceDb()

CALL
getBpmServiceDb()

Return

the BpmServiceDb

getNumberOfActivityInstances(address)

CALL
getNumberOfActivityInstances(address)

Return

the activity instance count as size

getNumberOfProcessData(address)

CALL
getNumberOfProcessData(address)

Return

the process data size

getNumberOfProcessInstances()

CALL
getNumberOfProcessInstances()

Return

the process instance count as size

getProcessDataAtIndex(address,uint256)

CALL
getProcessDataAtIndex(address,uint256)

Parameters

_pos // the index

Return

the data ID

getProcessDataDetails(address,bytes32)

CALL
getProcessDataDetails(address,bytes32)

Parameters

_address // the process instance
_dataId // the data ID

Return

(process,id,uintValue,bytes32Value,addressValue,boolValue)

getProcessInstanceAtIndex(uint256)

CALL
getProcessInstanceAtIndex(uint256)

Parameters

_pos // the index

Return

the process instance address or or BaseErrors.INDEX_OUT_OF_BOUNDS(), 0x0

getProcessInstanceData(address)

CALL
getProcessInstanceData(address)

Parameters

_address // the process instance address

Return

processDefinition the address of the ProcessDefinitionstate the BpmRuntime.ProcessInstanceState as uint8startedBy the address of the account who started the process

getProcessInstanceForActivity(bytes32)

CALL
getProcessInstanceForActivity(bytes32)

Parameters

_aiId // the ID of an ActivityInstance

Return

the ProcessInstance address or 0x0 if it cannot be found

getProcessModelRepository()

CALL
getProcessModelRepository()

Return

the address of the repository

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

isDestroyOnUpgrade()

CALL
isDestroyOnUpgrade()

major()

CALL
major()

migrateFrom(address)

CALL
migrateFrom(address)

Parameters

predecessor // the address from which the state is migrated

Return

result the result of the operation, e.g. a constant from commons-base/BaseErrors.sol

migrateTo(address)

CALL
migrateTo(address)

Parameters

successor // the address to which the state is migrated

Return

result the result of the operation, e.g. a constant from commons-base/BaseErrors.sol

minor()

CALL
minor()

patch()

CALL
patch()

setApplicationRegistry(address)

CALL
setApplicationRegistry(address)

Parameters

_registry // - the address of the application registry

setProcessModelRepository(address)

CALL
setProcessModelRepository(address)

Parameters

_repository // - the address of the model repository

startProcess(address,bytes32)

CALL
startProcess(address,bytes32)

Parameters

_activityInstanceId // the ID of a subprocess activity instance that initiated this ProcessInstance (optional)
_processDefinition // the address of a ProcessDefinition

Return

error code indicating success or failureinstance the address of a ProcessInstance, if successful

startProcessFromRepository(bytes32,bytes32,bytes32)

CALL
startProcessFromRepository(bytes32,bytes32,bytes32)

Parameters

_activityInstanceId // the ID of a subprocess activity instance that initiated this ProcessInstance (optional)
_modelId // the model that qualifies the process ID, if multiple models are deployed, otherwise optional
_processDefinitionId // the ID of the process definition

Return

error code indicating success or failureinstance the address of a ProcessInstance, if successful

startProcessInstance(address)

CALL
startProcessInstance(address)

Parameters

_pi // the ProcessInstance

Return

BaseErrors.NO_ERROR() if successful or an error code from initializing or executing the ProcessInstance

upgrade(address)

CALL
upgrade(address)

BpmServiceDb

The BpmServiceDb contract is found within the agreements bundle.

addActivityInstance(bytes32)

Adds the given ActivityInstance ID to the registered activity instances. Can only be invoked by an already registered ProcessInstance. The sending ProcessInstance (msg.sender) is recorded as well.


addProcessInstance(address)

Adds the given address to the registered process instances. Can only be invoked by the owner of this BpmServiceDb.


getNumberOfActivityInstances()

Returns the number of registered activity instances.


getNumberOfProcessInstances()

Returns the number of registered process instances.


getProcessInstanceAtIndex(uint256)

Returns the process instance address at the specified index


getProcessInstanceForActivity(bytes32)

Returns the address of the ProcessInstance of the specified ActivityInstance ID


transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


addActivityInstance(bytes32)

CALL
addActivityInstance(bytes32)

Parameters

_id // the globally unique ID of an ActivityInstance

addProcessInstance(address)

CALL
addProcessInstance(address)

Parameters

_address // the address of a ProcessInstance

getNumberOfActivityInstances()

CALL
getNumberOfActivityInstances()

Return

the number of activity instances

getNumberOfProcessInstances()

CALL
getNumberOfProcessInstances()

Return

the number of process instances

getProcessInstanceAtIndex(uint256)

CALL
getProcessInstanceAtIndex(uint256)

Parameters

_pos // the index

Return

the process instance address

getProcessInstanceForActivity(bytes32)

CALL
getProcessInstanceForActivity(bytes32)

Parameters

_aiId // the ID of an ActivityInstance

Return

the ProcessInstance address or 0x0 if it cannot be found

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

Identifiable Interface

The Identifiable Interface contract is found within the agreements bundle.

getId()

Returns the identifier of this contract.


getId()

CALL
getId()

Return

the bytes32 ID

DataStorage Interface

The DataStorage Interface contract is found within the agreements bundle.

getDataIdAtIndex(uint256)

Returns the data id at the given index


getDataType(bytes32)

Returns the data type of the Data object identified by the given id


getDataValueAsAddress(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsAddressArray(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBool(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes16Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes1Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes20Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes24Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes28Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes2Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes32Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes3Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes4Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes8Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsInt(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsInt128Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsInt16Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsInt256Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsInt32Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsInt64Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsInt8Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsString(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsUint(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsUint128Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsUint16Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsUint256Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsUint32Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsUint64Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsUint8Array(bytes32)

Gets the value of the Data object identified by the given id


getNumberOfArrayEntries(bytes32,bool)

Returns the number of non-default entries in the specified array-type DataStorage field


getSize()

Returns the size of the DataMap


removeData(bytes32)

Removes the Data identified by the id from the DataMap


setDataValueAsAddress(bytes32,address)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsAddressArray(bytes32,address[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBool(bytes32,bool)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes(bytes32,bytes32,uint8)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes16Array(bytes32,bytes16[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes1Array(bytes32,bytes1[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes20Array(bytes32,bytes20[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes24Array(bytes32,bytes24[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes28Array(bytes32,bytes28[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes2Array(bytes32,bytes2[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes32(bytes32,bytes32)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes32Array(bytes32,bytes32[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes3Array(bytes32,bytes3[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes4Array(bytes32,bytes4[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes8Array(bytes32,bytes8[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsInt(bytes32,int256,uint8)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsInt128Array(bytes32,int128[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsInt16Array(bytes32,int16[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsInt256(bytes32,int256)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsInt256Array(bytes32,int256[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsInt32Array(bytes32,int32[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsInt64Array(bytes32,int64[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsInt8Array(bytes32,int8[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsString(bytes32,string)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUint(bytes32,uint256,uint8)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUint128Array(bytes32,uint128[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUint16Array(bytes32,uint16[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUint256(bytes32,uint256)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUint256Array(bytes32,uint256[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUint32Array(bytes32,uint32[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUint64Array(bytes32,uint64[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUint8Array(bytes32,uint8[100])

Creates a Data object with the given value and inserts it into the DataMap


getDataIdAtIndex(uint256)

CALL
getDataIdAtIndex(uint256)

Parameters

_index // the index of the data

Return

error uint error code id bytes32 id of the data

getDataType(bytes32)

CALL
getDataType(bytes32)

Parameters

_id // the id of the data

Return

uint8 the DataType

getDataValueAsAddress(bytes32)

CALL
getDataValueAsAddress(bytes32)

Parameters

_id // the id of the data

Return

address the value of the data

getDataValueAsAddressArray(bytes32)

CALL
getDataValueAsAddressArray(bytes32)

Parameters

_id // the id of the data

Return

address[100] the value of the data

getDataValueAsBool(bytes32)

CALL
getDataValueAsBool(bytes32)

Parameters

_id // the id of the data

Return

bool the bool value of the data

getDataValueAsBytes(bytes32)

CALL
getDataValueAsBytes(bytes32)

Parameters

_id // the id of the data

Return

bytes32 the value of the data

getDataValueAsBytes16Array(bytes32)

CALL
getDataValueAsBytes16Array(bytes32)

Parameters

_id // the id of the data

Return

bytes16[100] the value of the data

getDataValueAsBytes1Array(bytes32)

CALL
getDataValueAsBytes1Array(bytes32)

Parameters

_id // the id of the data

Return

bytes1[100] the value of the data

getDataValueAsBytes20Array(bytes32)

CALL
getDataValueAsBytes20Array(bytes32)

Parameters

_id // the id of the data

Return

bytes20[100] the value of the data

getDataValueAsBytes24Array(bytes32)

CALL
getDataValueAsBytes24Array(bytes32)

Parameters

_id // the id of the data

Return

bytes24[100] the value of the data

getDataValueAsBytes28Array(bytes32)

CALL
getDataValueAsBytes28Array(bytes32)

Parameters

_id // the id of the data

Return

bytes28[100] the value of the data

getDataValueAsBytes2Array(bytes32)

CALL
getDataValueAsBytes2Array(bytes32)

Parameters

_id // the id of the data

Return

bytes2[100] the value of the data

getDataValueAsBytes32Array(bytes32)

CALL
getDataValueAsBytes32Array(bytes32)

Parameters

_id // the id of the data

Return

bytes32[100] the value of the data

getDataValueAsBytes3Array(bytes32)

CALL
getDataValueAsBytes3Array(bytes32)

Parameters

_id // the id of the data

Return

bytes3[100] the value of the data

getDataValueAsBytes4Array(bytes32)

CALL
getDataValueAsBytes4Array(bytes32)

Parameters

_id // the id of the data

Return

bytes4[100] the value of the data

getDataValueAsBytes8Array(bytes32)

CALL
getDataValueAsBytes8Array(bytes32)

Parameters

_id // the id of the data

Return

bytes8[100] the value of the data

getDataValueAsInt(bytes32)

CALL
getDataValueAsInt(bytes32)

Parameters

_id // the id of the data

Return

int the value of the data

getDataValueAsInt128Array(bytes32)

CALL
getDataValueAsInt128Array(bytes32)

Parameters

_id // the id of the data

Return

int128[100] the value of the data

getDataValueAsInt16Array(bytes32)

CALL
getDataValueAsInt16Array(bytes32)

Parameters

_id // the id of the data

Return

int16[100] the value of the data

getDataValueAsInt256Array(bytes32)

CALL
getDataValueAsInt256Array(bytes32)

Parameters

_id // the id of the data

Return

int256[100] the value of the data

getDataValueAsInt32Array(bytes32)

CALL
getDataValueAsInt32Array(bytes32)

Parameters

_id // the id of the data

Return

int32[100] the value of the data

getDataValueAsInt64Array(bytes32)

CALL
getDataValueAsInt64Array(bytes32)

Parameters

_id // the id of the data

Return

int64[100] the value of the data

getDataValueAsInt8Array(bytes32)

CALL
getDataValueAsInt8Array(bytes32)

Parameters

_id // the id of the data

Return

int8[100] the value of the data

getDataValueAsString(bytes32)

CALL
getDataValueAsString(bytes32)

Parameters

_id // the id of the data

Return

string the value of the data

getDataValueAsUint(bytes32)

CALL
getDataValueAsUint(bytes32)

Parameters

_id // the id of the data

Return

uint the value of the data

getDataValueAsUint128Array(bytes32)

CALL
getDataValueAsUint128Array(bytes32)

Parameters

_id // the id of the data

Return

uint128[100] the value of the data

getDataValueAsUint16Array(bytes32)

CALL
getDataValueAsUint16Array(bytes32)

Parameters

_id // the id of the data

Return

uint16[100] the value of the data

getDataValueAsUint256Array(bytes32)

CALL
getDataValueAsUint256Array(bytes32)

Parameters

_id // the id of the data

Return

uint256[100] the value of the data

getDataValueAsUint32Array(bytes32)

CALL
getDataValueAsUint32Array(bytes32)

Parameters

_id // the id of the data

Return

uint32[100] the value of the data

getDataValueAsUint64Array(bytes32)

CALL
getDataValueAsUint64Array(bytes32)

Parameters

_id // the id of the data

Return

uint64[100] the value of the data

getDataValueAsUint8Array(bytes32)

CALL
getDataValueAsUint8Array(bytes32)

Parameters

_id // the id of the data

Return

uint8[100] the value of the data

getNumberOfArrayEntries(bytes32,bool)

CALL
getNumberOfArrayEntries(bytes32,bool)

Parameters

_fullscan // if false the function will return as soon as a default value (0 for int/uint, 0x0 for address, "" for bytes32, etc.) is encountered, if true the array will be scanned to its end
_key // the key for the array-type value

Return

the number of non-default entries in the array

getSize()

CALL
getSize()

Return

uint the size

removeData(bytes32)

CALL
removeData(bytes32)

Parameters

_id // the id of the data

Return

uint error code

setDataValueAsAddress(bytes32,address)

CALL
setDataValueAsAddress(bytes32,address)

Parameters

_id // the id of the data
_value // the address value of the data

setDataValueAsAddressArray(bytes32,address[100])

CALL
setDataValueAsAddressArray(bytes32,address[100])

Parameters

_id // the id of the data
_value // the address[100] value of the data

setDataValueAsBool(bytes32,bool)

CALL
setDataValueAsBool(bytes32,bool)

Parameters

_id // the id of the data
_value // the bool value of the data

setDataValueAsBytes(bytes32,bytes32,uint8)

CALL
setDataValueAsBytes(bytes32,bytes32,uint8)

Parameters

_dataType // the uint8 data type of the value denoting the bytes size
_id // the id of the data
_value // the bytes16 value of the data

setDataValueAsBytes16Array(bytes32,bytes16[100])

CALL
setDataValueAsBytes16Array(bytes32,bytes16[100])

Parameters

_id // the id of the data
_value // the bytes16[100] value of the data

setDataValueAsBytes1Array(bytes32,bytes1[100])

CALL
setDataValueAsBytes1Array(bytes32,bytes1[100])

Parameters

_id // the id of the data
_value // the bytes1[100] value of the data

setDataValueAsBytes20Array(bytes32,bytes20[100])

CALL
setDataValueAsBytes20Array(bytes32,bytes20[100])

Parameters

_id // the id of the data
_value // the bytes20[100] value of the data

setDataValueAsBytes24Array(bytes32,bytes24[100])

CALL
setDataValueAsBytes24Array(bytes32,bytes24[100])

Parameters

_id // the id of the data
_value // the bytes24[100] value of the data

setDataValueAsBytes28Array(bytes32,bytes28[100])

CALL
setDataValueAsBytes28Array(bytes32,bytes28[100])

Parameters

_id // the id of the data
_value // the bytes28[100] value of the data

setDataValueAsBytes2Array(bytes32,bytes2[100])

CALL
setDataValueAsBytes2Array(bytes32,bytes2[100])

Parameters

_id // the id of the data
_value // the bytes2[100] value of the data

setDataValueAsBytes32(bytes32,bytes32)

CALL
setDataValueAsBytes32(bytes32,bytes32)

Parameters

_id // the id of the data
_value // the bytes32 value of the data

setDataValueAsBytes32Array(bytes32,bytes32[100])

CALL
setDataValueAsBytes32Array(bytes32,bytes32[100])

Parameters

_id // the id of the data
_value // the bytes32[100] value of the data

setDataValueAsBytes3Array(bytes32,bytes3[100])

CALL
setDataValueAsBytes3Array(bytes32,bytes3[100])

Parameters

_id // the id of the data
_value // the bytes3[100] value of the data

setDataValueAsBytes4Array(bytes32,bytes4[100])

CALL
setDataValueAsBytes4Array(bytes32,bytes4[100])

Parameters

_id // the id of the data
_value // the bytes4[100] value of the data

setDataValueAsBytes8Array(bytes32,bytes8[100])

CALL
setDataValueAsBytes8Array(bytes32,bytes8[100])

Parameters

_id // the id of the data
_value // the bytes8[100] value of the data

setDataValueAsInt(bytes32,int256,uint8)

CALL
setDataValueAsInt(bytes32,int256,uint8)

Parameters

_dataType // the uint8 DataType denoting the size
_id // the id of the data
_value // the int value of the data

setDataValueAsInt128Array(bytes32,int128[100])

CALL
setDataValueAsInt128Array(bytes32,int128[100])

Parameters

_id // the id of the data
_value // the int128[100] value of the data

setDataValueAsInt16Array(bytes32,int16[100])

CALL
setDataValueAsInt16Array(bytes32,int16[100])

Parameters

_id // the id of the data
_value // the int16[100] value of the data

setDataValueAsInt256(bytes32,int256)

CALL
setDataValueAsInt256(bytes32,int256)

Parameters

_id // the id of the data
_value // the int value of the data

setDataValueAsInt256Array(bytes32,int256[100])

CALL
setDataValueAsInt256Array(bytes32,int256[100])

Parameters

_id // the id of the data
_value // the int256[100] value of the data

setDataValueAsInt32Array(bytes32,int32[100])

CALL
setDataValueAsInt32Array(bytes32,int32[100])

Parameters

_id // the id of the data
_value // the int32[100] value of the data

setDataValueAsInt64Array(bytes32,int64[100])

CALL
setDataValueAsInt64Array(bytes32,int64[100])

Parameters

_id // the id of the data
_value // the int64[100] value of the data

setDataValueAsInt8Array(bytes32,int8[100])

CALL
setDataValueAsInt8Array(bytes32,int8[100])

Parameters

_id // the id of the data
_value // the int8[100] value of the data

setDataValueAsString(bytes32,string)

CALL
setDataValueAsString(bytes32,string)

Parameters

_id // the id of the data
_value // the string value of the data

setDataValueAsUint(bytes32,uint256,uint8)

CALL
setDataValueAsUint(bytes32,uint256,uint8)

Parameters

_dataType // the uint8 DataType denoting the size
_id // the id of the data
_value // the uint value of the data

setDataValueAsUint128Array(bytes32,uint128[100])

CALL
setDataValueAsUint128Array(bytes32,uint128[100])

Parameters

_id // the id of the data
_value // the uint128[100] value of the data

setDataValueAsUint16Array(bytes32,uint16[100])

CALL
setDataValueAsUint16Array(bytes32,uint16[100])

Parameters

_id // the id of the data
_value // the uint16[100] value of the data

setDataValueAsUint256(bytes32,uint256)

CALL
setDataValueAsUint256(bytes32,uint256)

Parameters

_id // the id of the data
_value // the uint value of the data

setDataValueAsUint256Array(bytes32,uint256[100])

CALL
setDataValueAsUint256Array(bytes32,uint256[100])

Parameters

_id // the id of the data
_value // the uint256[100] value of the data

setDataValueAsUint32Array(bytes32,uint32[100])

CALL
setDataValueAsUint32Array(bytes32,uint32[100])

Parameters

_id // the id of the data
_value // the uint32[100] value of the data

setDataValueAsUint64Array(bytes32,uint64[100])

CALL
setDataValueAsUint64Array(bytes32,uint64[100])

Parameters

_id // the id of the data
_value // the uint64[100] value of the data

setDataValueAsUint8Array(bytes32,uint8[100])

CALL
setDataValueAsUint8Array(bytes32,uint8[100])

Parameters

_id // the id of the data
_value // the uint8[100] value of the data

DataStorageUtils Library

The DataStorageUtils Library contract is found within the agreements bundle.

getNumberOfArrayEntries(DataStorageUtils.DataMap storage,bytes32,bool)

Returns the number of non-default entries in the array-type field specified in the given DataMap. Empty values are: 0 for int/uint, 0x0 for address, "" for bytes32, etc.) Currently only DataTypes.ADDRESSARRAY() and DataTypes.BYTES32ARRAY() are supported by this function


getNumberOfEntries(address[100],bool)

Returns the number of non-default entries in the given array.


getNumberOfEntries(bytes32[100],bool)

Returns the number of non-default entries in the given array.


keyAtIndex(DataStorageUtils.DataMap storage,uint256)

Returns the ID of the Data at the specified index in the given map


remove(DataStorageUtils.DataMap storage,bytes32)

Removes the Data registered at the specified key in the provided map. The _map.keys array may get re-ordered by this operation: unless the removed entry was the last element in the map's keys, the last key will be moved into the void position created by the removal.


getNumberOfArrayEntries(DataStorageUtils.DataMap storage,bytes32,bool)

CALL
getNumberOfArrayEntries(DataStorageUtils.DataMap

Parameters

_fullscan // if true the array will be scanned to its end, otherwise the function returns on the first encountered default value
_key // a key pointing to a supported array-type field
_map // the DataMap

Return

the number of non-default entries

getNumberOfEntries(address[100],bool)

CALL
getNumberOfEntries(address[100],bool)

Parameters

_array // the array to scan
_fullscan // whether to keep scanning to the end even if default values are encountered

Return

the number of non-empty entries in the array

getNumberOfEntries(bytes32[100],bool)

CALL
getNumberOfEntries(bytes32[100],bool)

Parameters

_array // the array to scan
_fullscan // whether to keep scanning to the end even if default values are encountered

Return

the number of non-empty entries in the array

keyAtIndex(DataStorageUtils.DataMap storage,uint256)

CALL
keyAtIndex(DataStorageUtils.DataMap

remove(DataStorageUtils.DataMap storage,bytes32)

CALL
remove(DataStorageUtils.DataMap

Parameters

_key // the key
_map // the map

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_NOT_FOUND.

DefaultActiveAgreement Interface

The DefaultActiveAgreement Interface contract is found within the agreements bundle.

addEventListener(bytes32)

Adds the msg.sender as listener for the specified event.


addEventListener(bytes32,address)

Adds the msg.sender as listener for the specified event.


cancel()

Registers the msg.sender as having canceled the agreement. During formation (legal states DRAFT and FORMULATED), the agreement can canceled unilaterally by one of the parties to the agreement. During execution (legal state EXECUTED), the agreement can only be canceled if all parties agree to do so by invoking this function.


getArchetype()

Returns the archetype


getCreator()

Returns the creator


getDataValueAsAddressArray(bytes32)

Overriden method of DataStorage to return the agreement parties for special ID DATA_FIELD_AGREEMENT_PARTIES.


getEventLogReference()

Returns the Hoard Address and Hoard Secret for the Event Log


getHoardAddress()

Returns the Hoard Address


getLegalState()

Returns the legal state of this agreement


getMaxNumberOfEvents()

Returns the max number of events for the event log


getName()

Gets name


getNumberOfArrayEntries(bytes32,bool)

Overridden method of DataStorage to return the number of parties for special ID DATA_FIELD_AGREEMENT_PARTIES.


getNumberOfParties()

Gets number of parties


getParty(uint256)

Gets party


getSignatureDetails(address)

Returns the signee and timestamp of the signature of the given party.


gethoardSecret()

Returns the Hoard Secret


isPrivate()

Returns the private flag


isSignedBy(address)

Returns whether the given account's signature is on the agreement.


removeEventListener(bytes32)

Removes the msg.sender from the list of listeners for the specified event.


removeEventListener(bytes32,address)

Removes the msg.sender from the list of listeners for the specified event.


setEventLogReference(bytes32,bytes32)

Sets the Hoard Address and Hoard Secret for the Event Log


setFulfilled()

Sets the legal state of this agreement to Agreements.LegalState.FULFILLED. Note: All other legal states are set by internal logic.


sign()

Applies the msg.sender or tx.origin as a signature to this agreement, if the it can be authorized as a valid signee. The timestamp of an already existing signature is not overwritten!


addEventListener(bytes32)

CALL
addEventListener(bytes32)

Parameters

_event // the event to subscribe to

addEventListener(bytes32,address)

CALL
addEventListener(bytes32,address)

Parameters

_event // the event to subscribe to
_listener // the address of an EventListener

cancel()

CALL
cancel()

Return

BaseErrors.INVALID_ACTOR() if the msg.sender is not a party on this agreement, BaseErrors.NO_ERROR() otherwise.

getArchetype()

CALL
getArchetype()

Return

the archetype address 

getCreator()

CALL
getCreator()

Return

the creator address

getDataValueAsAddressArray(bytes32)

CALL
getDataValueAsAddressArray(bytes32)

Parameters

_id // the bytes32 ID of an address array

Return

the address array

getEventLogReference()

CALL
getEventLogReference()

Return

the Hoard Address and Hoard Secret for the Event Log

getHoardAddress()

CALL
getHoardAddress()

Return

the Hoard Address

getLegalState()

CALL
getLegalState()

Return

the Agreements.LegalState as a uint

getMaxNumberOfEvents()

CALL
getMaxNumberOfEvents()

Return

the max number of events for the event log

getName()

CALL
getName()

Return

name name

getNumberOfArrayEntries(bytes32,bool)

CALL
getNumberOfArrayEntries(bytes32,bool)

Parameters

_fullscan // whether to scan beyond non-default values
_id // the ID of the data field

Return

the size of the specified array

getNumberOfParties()

CALL
getNumberOfParties()

Return

size number of parties

getParty(uint256)

CALL
getParty(uint256)

Parameters

_index // index

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS() if index out of boundsparty party

getSignatureDetails(address)

CALL
getSignatureDetails(address)

Parameters

_party // the signing party

Return

the address of the signee (if the party authorized a signee other than itself)the time of signing or 0 if the address is not a party to this agreement or has not signed yet

gethoardSecret()

CALL
gethoardSecret()

Return

the Hoard Secret

isPrivate()

CALL
isPrivate()

Return

the private flag 

isSignedBy(address)

CALL
isSignedBy(address)

Parameters

_signee // The account to check

Return

true if the provided address is a recorded signature on the agreement, false otherwise

removeEventListener(bytes32)

CALL
removeEventListener(bytes32)

Parameters

_event // the event to unsubscribe from

removeEventListener(bytes32,address)

CALL
removeEventListener(bytes32,address)

Parameters

_event // the event to unsubscribe from
_listener // the address of an EventListener

setEventLogReference(bytes32,bytes32)

CALL
setEventLogReference(bytes32,bytes32)

setFulfilled()

CALL
setFulfilled()

sign()

CALL
sign()

Return

an error code indicating success or failure

DefaultActiveAgreementRegistry Interface

The DefaultActiveAgreementRegistry Interface contract is found within the agreements bundle.

addAgreementToCollection(bytes32,address)

Adds an agreement to given collection


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


createAgreement(address,bytes32,address,bytes32,bytes32,bytes32,bytes32,uint256,bool,address[],bytes32)

Creates an Active Agreement with the given parameters


createAgreementCollection(string,address,uint8,bytes32)

Creates a new agreement collection


createUserAccount(address,address,bytes32)

Creates an AgreementPartyAccount with the specified parameters and adds it to the AccountsManager


eventFired(bytes32,address)

Overwrites AbstractEventListener function to receive updates from ActiveAgreements that are registered in this registry. Currently supports AGREEMENT_STATE_CHANGED and EVENT_LOG_UPDATED


eventFired(bytes32,address,address)

Overwrites AbstractEventListener function to receive updates from ActiveAgreements that are registered in this registry. Currently supports AGREEMENT_SIGNATURE_ADDED


eventFired(bytes32,address,bytes32)

See EventListener.eventFired(bytes32,address,bytes32)


eventFired(bytes32,address,string)

See EventListener.eventFired(bytes32,address,string)


eventFired(bytes32,address,uint256)

See EventListener.eventFired(bytes32,address,uint)


getActiveAgreementAtIndex(uint256)

Gets activeAgreement address at given index


getActiveAgreementData(address)

Returns data about the ActiveAgreement at the specified address


getActiveAgreementsSize()

Gets number of activeAgreements


getAgreementAtIndexInCollection(bytes32,uint256)

Gets agreement address at index in colelction


getAgreementCollectionAtIndex(uint256)

Gets collection id at index


getAgreementCollectionData(bytes32)

Gets collection data by id


getAgreementDataInCollection(bytes32,address)

Get agreement data by collection id and agreement address


getAgreementParameterAtIndex(address,uint256)

Returns the ID of the agreement parameter value at the given index.


getAgreementParameterDetails(address,bytes32)

Returns information about the process data entry for the specified process and data ID


getArchetypeRegistry()

Returns the ArchetypeRegistry address


getBpmService()

Returns the BpmService address


getNumberOfAgreementCollections()

Gets number of agreement collections


getNumberOfAgreementParameters(address)

Returns the number of agreement parameter values.


getNumberOfAgreementsInCollection(bytes32)

Gets number of agreements in given collection


getPartiesByActiveAgreementSize(address)

Gets parties size for given Active Agreement


getPartyByActiveAgreementAtIndex(address,uint256)

Gets getPartyByActiveAgreementAtIndex


getPartyByActiveAgreementData(address,address)

Returns data about the given party's signature on the specified agreement.


getVersion()

Returns the version as 3-digit array


major()

returns the major version number


minor()

returns the minor version number


patch()

returns the patch version number


processStateChanged(address)


setArchetypeRegistry(address)

Sets the ArchetypeRegistry reference used to find archetypes in packages


setBpmService(address)

Sets the BpmService reference to use for controlling the agreement workflows.


setEventLogReference(address,bytes32,bytes32)

Updates the hoard address and secret for the event log of the specified agreement


startFormation(address)

Creates a starts a ProcessInstance to handle the formation workflow as defined by the given agreement's archetype.


transferSystemOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


upgrade(address)

Checks the version and invokes migrateTo and migrateTo in order to transfer state (push then pull)


addAgreementToCollection(bytes32,address)

CALL
addAgreementToCollection(bytes32,address)

Parameters

_agreement // agreement address
_collectionId // the bytes32 collection id

Return

error BaseErrors.NO_ERROR(), BaseErrors.RESOURCE_NOT_FOUND() collection by given id does not exist

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

createAgreement(address,bytes32,address,bytes32,bytes32,bytes32,bytes32,uint256,bool,address[],bytes32)

CALL
createAgreement(address,bytes32,address,bytes32,bytes32,bytes32,bytes32,uint256,bool,address[],bytes32)

Parameters

_archetype // archetype
_collectionId // id of agreement collection (optional)
_hoardAddress // Address of agreement params in hoard
_hoardSecret // Secret for hoard retrieval
_name // name
_parties // parties

Return

error - BaseErrors.NO_ERROR(), BaseErrors.NULL_PARAM_NOT_ALLOWED() if _archetype or _name is nullactiveAgreement - the new ActiveAgreement's address, if successfully created, 0x0 otherwise

createAgreementCollection(string,address,uint8,bytes32)

CALL
createAgreementCollection(string,address,uint8,bytes32)

Parameters

_author // address of author
_name // name

Return

error BaseErrors.NO_ERROR(), BaseErrors.NULL_PARAM_NOT_ALLOWED(), BaseErrors.RESOURCE_ALREADY_EXISTS()id bytes32 id of package

createUserAccount(address,address,bytes32)

CALL
createUserAccount(address,address,bytes32)

Parameters

_accountsManager // the AccountsManager address
_id // id (optional)
_owner // owner (optional)

Return

error BaseErrors.RESOURCE_ALREADY_EXISTS() or BaseErrors.NO_ERROR()userAccount user account address, or 0x0 if not successful

eventFired(bytes32,address)

CALL
eventFired(bytes32,address)

eventFired(bytes32,address,address)

CALL
eventFired(bytes32,address,address)

eventFired(bytes32,address,bytes32)

CALL
eventFired(bytes32,address,bytes32)

eventFired(bytes32,address,string)

CALL
eventFired(bytes32,address,string)

eventFired(bytes32,address,uint256)

CALL
eventFired(bytes32,address,uint256)

getActiveAgreementAtIndex(uint256)

CALL
getActiveAgreementAtIndex(uint256)

Parameters

_index // index

Return

the Active Agreement address

getActiveAgreementData(address)

CALL
getActiveAgreementData(address)

Parameters

_activeAgreement // Active Agreement

Return

archetype - the agreement's archetype adressname - the name of the agreementcreator - the creator of the agreementhoardAddress - address of the agreement parameters in hoard (only used when agreement is private)hoardSecret - secret for retrieval of hoard parameterseventLogHoardAddress - address of the agreement's event log in hoardeventLogHoardSecret - secret for retrieval of the hoard event log filemaxNumberOfEvents - the maximum number of events allowed to be stored for this agreementisPrivate - whether the agreement's parameters are private, i.e. stored off-chain in hoardlegalState - the agreement's Agreement.LegalState as uint8formationProcessInstance - the address of the process instance representing the formation of this agreementexecutionProcessInstance - the address of the process instance representing the execution of this agreement

getActiveAgreementsSize()

CALL
getActiveAgreementsSize()

Return

size size

getAgreementAtIndexInCollection(bytes32,uint256)

CALL
getAgreementAtIndexInCollection(bytes32,uint256)

Parameters

_id // id of the collection
_index // uint index

Return

agreement address of archetype

getAgreementCollectionAtIndex(uint256)

CALL
getAgreementCollectionAtIndex(uint256)

Parameters

_index // uint index

Return

id bytes32 id

getAgreementCollectionData(bytes32)

CALL
getAgreementCollectionData(bytes32)

Parameters

_id // bytes32 collection id

Return

name stringauthor addresscollectionType type of collectionpackageId id of the archetype package

getAgreementDataInCollection(bytes32,address)

CALL
getAgreementDataInCollection(bytes32,address)

Parameters

_agreement // address of agreement
_id // id of the collection

Return

agreementName name of agreementarchetype address of archetype

getAgreementParameterAtIndex(address,uint256)

CALL
getAgreementParameterAtIndex(address,uint256)

Parameters

_pos // the index

Return

the parameter ID

getAgreementParameterDetails(address,bytes32)

CALL
getAgreementParameterDetails(address,bytes32)

Parameters

_address // the active agreement
_dataId // the parameter ID

Return

(process,id,uintValue,bytes32Value,addressValue,boolValue)

getArchetypeRegistry()

CALL
getArchetypeRegistry()

Return

address the ArchetypeRegistry

getBpmService()

CALL
getBpmService()

Return

address the BpmService

getNumberOfAgreementCollections()

CALL
getNumberOfAgreementCollections()

Return

size size

getNumberOfAgreementParameters(address)

CALL
getNumberOfAgreementParameters(address)

Return

the number of parameters

getNumberOfAgreementsInCollection(bytes32)

CALL
getNumberOfAgreementsInCollection(bytes32)

Parameters

_id // id of the collection

Return

size agreement count

getPartiesByActiveAgreementSize(address)

CALL
getPartiesByActiveAgreementSize(address)

Parameters

_activeAgreement // Active Agreement

Return

size size

getPartyByActiveAgreementAtIndex(address,uint256)

CALL
getPartyByActiveAgreementAtIndex(address,uint256)

Parameters

_activeAgreement // Active Agreement
_index // index

Return

party party

getPartyByActiveAgreementData(address,address)

CALL
getPartyByActiveAgreementData(address,address)

Parameters

_activeAgreement // the ActiveAgreement
_party // the signing party

Return

signedBy the actual signature authorized by the partysignatureTimestamp the timestamp when the party has signed, or 0 if not signed yet

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

major()

CALL
major()

minor()

CALL
minor()

patch()

CALL
patch()

processStateChanged(address)

CALL
processStateChanged(address)

Parameters

_processInstance // the process instance whose state has changed

setArchetypeRegistry(address)

CALL
setArchetypeRegistry(address)

Parameters

_archetypeRegistry // the ArchetypeRegistry

setBpmService(address)

CALL
setBpmService(address)

Parameters

_service // the BpmService

setEventLogReference(address,bytes32,bytes32)

CALL
setEventLogReference(address,bytes32,bytes32)

Parameters

_activeAgreement // Address of active agreement
_eventLogHoardAddress // New hoard address of event log for agreement
_eventLogHoardSecret // New hoard secret key of event log for agreement

startFormation(address)

CALL
startFormation(address)

Parameters

_agreement // an ActiveAgreement

Return

error - BaseErrors.INVALID_PARAM_STATE() if the agreement is not in legal state FORMULATEDerror - BaseErrors.OVERWRITE_NOT_ALLOWED() if there is an ongoing formation process for the agreementerror - BaseErrors.NO_ERROR() if the formation process was started successfully, or a different error code if there were problems in the processthe address of the ProcessInstance, if successful

transferSystemOwnership(address)

CALL
transferSystemOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

upgrade(address)

CALL
upgrade(address)

DefaultArchetype

The DefaultArchetype contract is found within the agreements bundle.

activate()

Activates this archetype


addDocument(bytes32,bytes32,bytes32)

Adds document


addJurisdiction(bytes2,bytes32)

Adds the given jurisdiction in the form of a country code and region identifier to this archetype. References codes defined via IsoCountries interface implementations. If the region is empty, the jurisdiction will only reference the country and the regions will be emptied, i.e. any prior regions for that country will be removed.


addParameter(uint8,bytes32)

Adds parameter


deactivate()

Deactivates this archetype


getAuthor()

Gets Author


getDescription()

Gets description


getDocument(bytes32)

Gets document with given name


getDocumentAtIndex(uint256)

Gets document name at index


getExecutionProcessDefinition()

Returns the address of the ProcessDefinition that orchestrates the agreement execution.


getFormationProcessDefinition()

Returns the address of the ProcessDefinition that orchestrates the agreement formation.


getJurisdictionAtIndex(uint256)

Retrieves the key for the jurisdiction at the specified index


getJurisdictionData(bytes32)

Returns information about the jurisdiction with the specified key


getName()

Returns the archetype name


getNumberOfDocuments()

Gets number of documents


getNumberOfJurisdictions()

Returns the number jurisdictions for this archetype


getNumberOfParameters()

Gets number of parameters


getParameterAtIndex(uint256)

Gets parameter at index


getParameterType(bytes32)

Gets parameter data type


isActive()

Returns the active state


isPrivate()

Returns the private state


activate()

CALL
activate()

Return

error BaseErrors.NO_ERROR()

addDocument(bytes32,bytes32,bytes32)

CALL
addDocument(bytes32,bytes32,bytes32)

Parameters

_hoardAddress // hoard address
_name // name
_secretKey // secret key

Return

error BaseErrors.NO_ERROR() or BaseErrors.RESOURCE_ALREADY_EXISTS() if _name already exists in documentNames

addJurisdiction(bytes2,bytes32)

CALL
addJurisdiction(bytes2,bytes32)

Parameters

_country // a ISO- code, e.g. 'US'
_region // a region identifier from a IsoCountries contract

Return

BaseErrors.NO_ERROR() if successful, and key of jurisdiction just added
BaseErrors.INVALID_PARAM_VALUE() if _country is not in the DataTypes enum,

addParameter(uint8,bytes32)

CALL
addParameter(uint8,bytes32)

Parameters

_parameterName // parameter name
_parameterType // parameter type (enum)

Return

BaseErrors.NO_ERROR() if successful,
BaseErrors.NULL_PARAM_NOT_ALLOWED() if _parameter is empty,
BaseErrors.RESOURCE_ALREADY_EXISTS() if _parameter already exists

deactivate()

CALL
deactivate()

Return

error BaseErrors.NO_ERROR()

getAuthor()

CALL
getAuthor()

Return

author author

getDescription()

CALL
getDescription()

Return

description

getDocument(bytes32)

CALL
getDocument(bytes32)

Parameters

_name // document name

Return

error BaseErrors.NO_ERROR() or BaseErrors.RESOURCE_NOT_FOUND() if documentsNames does not contain _namehoardAddress hoard addresssecretKey secret key

getDocumentAtIndex(uint256)

CALL
getDocumentAtIndex(uint256)

Parameters

_index // index

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS() if index is out of boundsname

getExecutionProcessDefinition()

CALL
getExecutionProcessDefinition()

Return

the address of a ProcessDefinition

getFormationProcessDefinition()

CALL
getFormationProcessDefinition()

Return

the address of a ProcessDefinition

getJurisdictionAtIndex(uint256)

CALL
getJurisdictionAtIndex(uint256)

Parameters

_index // the index position

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS() if index is out of boundsthe key of the jurisdiction or an empty bytes32 if the index was out of bounds

getJurisdictionData(bytes32)

CALL
getJurisdictionData(bytes32)

Parameters

_key // the key identifying the jurisdiction

Return

the country and region identifiers (see IsoCountries), if the jurisdiction exists

getName()

CALL
getName()

Return

the name

getNumberOfDocuments()

CALL
getNumberOfDocuments()

Return

size number of documents

getNumberOfJurisdictions()

CALL
getNumberOfJurisdictions()

Return

the number of jurisdictions

getNumberOfParameters()

CALL
getNumberOfParameters()

Return

size number of parameters

getParameterAtIndex(uint256)

CALL
getParameterAtIndex(uint256)

Parameters

_index // index

Return

error error TBDparameter parameter

getParameterType(bytes32)

CALL
getParameterType(bytes32)

Parameters

_parameter // parameter

Return

error error TBDparameterType parameter type

isActive()

CALL
isActive()

Return

true if active, false otherwise

isPrivate()

CALL
isPrivate()

Return

true if private, false otherwise

DefaultArchetypeRegistry

The DefaultArchetypeRegistry contract is found within the agreements bundle.

activate(address)

Sets active to true for given archetype


addArchetypeToPackage(bytes32,address)

Adds archetype to package


addDocument(address,bytes32,bytes32,bytes32)

Adds Hoard document to the given Archetype


addJurisdiction(address,bytes2,bytes32)

Adds the given jurisdiction in the form of a country code and region identifier to this archetype. References codes defined via IsoCountries interface implementations.


addJurisdictions(address,bytes2[],bytes32[])

Adds the given jurisdictions in the form of a country codes and region identifiers to this archetype. References codes defined via IsoCountries interface implementations.


addParameter(address,uint8,bytes32)

Adds parameter to archetype


addParameters(address,uint8[],bytes32[])

Adds the specified parameters to the archetype. If one of the parameters cannot be added, the operation aborts and returns that error code.


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


createArchetype(bytes32,address,string,bool,address,address,bytes32)

Creates a new archetype


createArchetypePackage(string,string,address,bool)

Adds a new archetype package


deactivate(address)

Sets active to false for given archetype


getArchetypeAtIndex(uint256)

Gets archetype address at given index


getArchetypeAtIndexInPackage(bytes32,uint256)

Gets archetype address at index in package


getArchetypeData(address)

Returns data about an archetype


getArchetypeDataInPackage(bytes32,address)

Get archetype data by package id and archetype address


getArchetypePackageAtIndex(uint256)

Gets package id at index


getArchetypePackageData(bytes32)

Gets package data by id


getArchetypesSize()

Gets number of archetypes


getDocumentByArchetypeAtIndex(address,uint256)

Gets document name by Archetype At index


getDocumentByArchetypeData(address,bytes32)

Returns data about the document at the specified address


getDocumentsByArchetypeSize(address)

Gets documents size for given Archetype


getJurisdictionAtIndexForArchetype(address,uint256)

Returns the jurisdiction key at the specified index for the given archetype


getJurisdictionDataForArchetype(address,bytes32)

Returns data about the jurisdiction with the specified key in the given archetype


getNumberOfArchetypePackages()

Gets number of archetype packages


getNumberOfArchetypesInPackage(bytes32)

Gets number of archetypes in given package


getNumberOfJurisdictionsForArchetype(address)

Returns the number of jurisdictions for the given Archetype


getParameterByArchetypeAtIndex(address,uint256)

Gets parameter name by Archetype At index


getParameterByArchetypeData(address,bytes32)

Returns data about the parameter at with the specified name


getParametersByArchetypeSize(address)

Gets parameter count for given Archetype


getVersion()

Returns the version as 3-digit array


major()

returns the major version number


minor()

returns the minor version number


packageHasArchetype(bytes32,address)

Determines whether given archetype address is in the package identified by the packageId


patch()

returns the patch version number


transferSystemOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


upgrade(address)

Checks the version and invokes migrateTo and migrateTo in order to transfer state (push then pull)


activate(address)

CALL
activate(address)

Return

error BaseErrors.NO_ERROR()

addArchetypeToPackage(bytes32,address)

CALL
addArchetypeToPackage(bytes32,address)

Parameters

_archetype // the archetype address
_packageId // the bytes32 package id

Return

error BaseErrors.NO_ERROR(), BaseErrors.RESOURCE_NOT_FOUND() package by given id does not exist

addDocument(address,bytes32,bytes32,bytes32)

CALL
addDocument(address,bytes32,bytes32,bytes32)

Parameters

_archetype // archetype
_hoardAddress // hoard address
_name // name
_secretKey // secret key

Return

error BaseErrors.NO_ERROR(), BaseErrors.RESOURCE_NOT_FOUND() _archetype does not exist, or see DefaultArchetype

addJurisdiction(address,bytes2,bytes32)

CALL
addJurisdiction(address,bytes2,bytes32)

Parameters

_country // a ISO-3166-1 code, e.g. 'US'
_region // a region identifier from a IsoCountries contract

Return

BaseErrors.NO_ERROR() if succesfulBaseErrors.RESOURCE_NOT_FOUND() if archetype is not foundany error returned from the Archetype.addJurisdiction() function

addJurisdictions(address,bytes2[],bytes32[])

CALL
addJurisdictions(address,bytes2[],bytes32[])

Parameters

_countries // an array of a ISO-3166-1 code, e.g. 'US'
_regions // an array of region identifiers from a IsoCountries contract

Return

BaseErrors.NO_ERROR() if succesfulBaseErrors.RESOURCE_NOT_FOUND() if archetype is not foundBaseErrors.INVALID_PARAM_STATE() if the lengths of the two arrays don't match

addParameter(address,uint8,bytes32)

CALL
addParameter(address,uint8,bytes32)

Parameters

_archetype // the archetype address
_parameterName // the parameter name
_parameterType // data type (enum)

Return

BaseErrors.NO_ERROR() if successfulBaseErrors.RESOURCE_NOT_FOUND() if archetype is not foundany error returned from the Archetype.addParameter() function

addParameters(address,uint8[],bytes32[])

CALL
addParameters(address,uint8[],bytes32[])

Parameters

_archetype // the archetype address
_parameterNames // the parameter names
_parameterTypes // the parameter types

Return

BaseErrors.NO_ERROR() if succesfulBaseErrors.RESOURCE_NOT_FOUND() if archetype is not foundBaseErrors.INVALID_PARAM_STATE() if the lengths of the two arrays don't match

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

createArchetype(bytes32,address,string,bool,address,address,bytes32)

CALL
createArchetype(bytes32,address,string,bool,address,address,bytes32)

Parameters

_author // author
_description // description
_executionProcess // the address of a ProcessDefinition that orchestrates the agreement execution
_formationProcess // the address of a ProcessDefinition that orchestrates the agreement formation
_isPrivate // determines if the archetype's documents are encrypted
_name // name
_packageId // id of package this archetype is part of (optional)

Return

error BaseErrors.NO_ERROR(), BaseErrors.NULL_PARAM_NOT_ALLOWED() if either _name, _author, _formationProcess, or _executionProcess is nullarchetype - the new archetype's address, if successfully created

createArchetypePackage(string,string,address,bool)

CALL
createArchetypePackage(string,string,address,bool)

Parameters

_author // address of author (user account of organization)
_description // description
_isPrivate // makes it a private package visible to only the author
_name // name

Return

error BaseErrors.NO_ERROR(), BaseErrors.NULL_PARAM_NOT_ALLOWED(), BaseErrors.RESOURCE_ALREADY_EXISTS()id bytes32 id of package

deactivate(address)

CALL
deactivate(address)

Return

error BaseErrors.NO_ERROR()

getArchetypeAtIndex(uint256)

CALL
getArchetypeAtIndex(uint256)

Parameters

_index // index

Return

archetype archetype

getArchetypeAtIndexInPackage(bytes32,uint256)

CALL
getArchetypeAtIndexInPackage(bytes32,uint256)

Parameters

_id // id of the package
_index // uint index

Return

archetype address of archetype

getArchetypeData(address)

CALL
getArchetypeData(address)

Parameters

_archetype // the archetype address

Return

name namedescription descriptionauthor authoractive activeformationProcessDefinitionexecutionProcessDefinition

getArchetypeDataInPackage(bytes32,address)

CALL
getArchetypeDataInPackage(bytes32,address)

Parameters

_archetype // address of archetype
_id // id of the package

Return

archetypeName name of archetype

getArchetypePackageAtIndex(uint256)

CALL
getArchetypePackageAtIndex(uint256)

Parameters

_index // uint index

Return

id bytes32 id

getArchetypePackageData(bytes32)

CALL
getArchetypePackageData(bytes32)

Parameters

_id // bytes32 package id

Return

name stringdescription stringauthor addressisPrivate bool

getArchetypesSize()

CALL
getArchetypesSize()

Return

size size

getDocumentByArchetypeAtIndex(address,uint256)

CALL
getDocumentByArchetypeAtIndex(address,uint256)

Parameters

_archetype // archetype
_index // index

Return

name name

getDocumentByArchetypeData(address,bytes32)

CALL
getDocumentByArchetypeData(address,bytes32)

Parameters

_archetype // archetype
_name // name

Return

_hoardAddress hoard address_secretKey secret key

getDocumentsByArchetypeSize(address)

CALL
getDocumentsByArchetypeSize(address)

Parameters

_archetype // archetype

Return

size size

getJurisdictionAtIndexForArchetype(address,uint256)

CALL
getJurisdictionAtIndexForArchetype(address,uint256)

Parameters

_archetype // archetype address
_index // the index of the jurisdiction

Return

the jurisdiction primary key

getJurisdictionDataForArchetype(address,bytes32)

CALL
getJurisdictionDataForArchetype(address,bytes32)

Parameters

_archetype // archetype address
_key // the jurisdiction key

Return

country the jurisdiction's countryregion the jurisdiction's region

getNumberOfArchetypePackages()

CALL
getNumberOfArchetypePackages()

Return

size size

getNumberOfArchetypesInPackage(bytes32)

CALL
getNumberOfArchetypesInPackage(bytes32)

Parameters

_id // id of the package

Return

size archetype count

getNumberOfJurisdictionsForArchetype(address)

CALL
getNumberOfJurisdictionsForArchetype(address)

Parameters

_archetype // archetype address

Return

the number of jurisdictions

getParameterByArchetypeAtIndex(address,uint256)

CALL
getParameterByArchetypeAtIndex(address,uint256)

Parameters

_archetype // archetype
_index // index

Return

name name

getParameterByArchetypeData(address,bytes32)

CALL
getParameterByArchetypeData(address,bytes32)

Parameters

_archetype // archetype
_name // name

Return

parameterType parameter type

getParametersByArchetypeSize(address)

CALL
getParametersByArchetypeSize(address)

Parameters

_archetype // archetype

Return

size size

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

major()

CALL
major()

minor()

CALL
minor()

packageHasArchetype(bytes32,address)

CALL
packageHasArchetype(bytes32,address)

Parameters

_archetype // address of archetype
_packageId // id of the package

Return

hasArchetype bool representing if archetype is in package

patch()

CALL
patch()

transferSystemOwnership(address)

CALL
transferSystemOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

upgrade(address)

CALL
upgrade(address)

DefaultEventEmitter

The DefaultEventEmitter contract is found within the agreements bundle.

addEventListener(bytes32)

Adds the msg.sender as listener for the specified event.


addEventListener(bytes32,address)

Adds the msg.sender as listener for the specified event.


removeEventListener(bytes32)

Removes the msg.sender from the list of listeners for the specified event.


removeEventListener(bytes32,address)

Removes the msg.sender from the list of listeners for the specified event.


addEventListener(bytes32)

CALL
addEventListener(bytes32)

Parameters

_event // the event to subscribe to

addEventListener(bytes32,address)

CALL
addEventListener(bytes32,address)

Parameters

_event // the event to subscribe to
_listener // the address of an EventListener

removeEventListener(bytes32)

CALL
removeEventListener(bytes32)

Parameters

_event // the event to unsubscribe from

removeEventListener(bytes32,address)

CALL
removeEventListener(bytes32,address)

Parameters

_event // the event to unsubscribe from
_listener // the address of an EventListener

DefaultUserAccount

The DefaultUserAccount contract is found within the agreements bundle.

getId()

Returns this account's ID


getOrganization()

Returns this user account's organization, if it is associated with one.


getOwner()

Returns this account's owner


setOrganization(address)

Sets the organization of this user account


transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


getId()

CALL
getId()

getOrganization()

CALL
getOrganization()

Return

the organization's address or 0x0

getOwner()

CALL
getOwner()

setOrganization(address)

CALL
setOrganization(address)

Parameters

_organization // the organization's address with which to associate this user account

Return

BaseErrors.NO_ERROR() or BaseErrors.OVERWRITE_NOT_ALLOWED() if the organization is already set

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

ERC165 Interface

The ERC165 Interface contract is found within the agreements bundle.

supportsInterface(bytes4)

Interface identification is specified in ERC-165. This function uses less than 30,000 gas.


supportsInterface(bytes4)

CALL
supportsInterface(bytes4)

Parameters

interfaceID // The interface identifier, as specified in ERC-165

Return

`true` if the contract implements `interfaceID` and
`interfaceID` is not 0xffffffff, `false` otherwise

ERC165Utils

The ERC165Utils contract is found within the agreements bundle.

implementsInterface(address,bytes4)

Detects whether the given contract implements the specified ERC165 interface signature. This is a modified implementation of the example in EIP 881 to avoid the use of the "staticcall" opcode. This function performs two invocations: 1. A "call" to the 0x01ffc9a7 function signature to test if it can be invoked 2. If step 1 returns 'true', the contract is cast to ERC165 and the supportsInterface(bytes4) function is invoked


implementsInterface(address,bytes4)

CALL
implementsInterface(address,bytes4)

Parameters

_contract // the contract to be examined
_interfaceId // the signature of the interface for which to test

Return

true if the contract implements the interface, false otherwise

EventEmitter Interface

The EventEmitter Interface contract is found within the agreements bundle.

addEventListener(bytes32)

Adds the msg.sender as listener for the specified event.


addEventListener(bytes32,address)

Adds the msg.sender as listener for the specified event.


removeEventListener(bytes32)

Removes the msg.sender from the list of listeners for the specified event.


removeEventListener(bytes32,address)

Removes the msg.sender from the list of listeners for the specified event.


addEventListener(bytes32)

CALL
addEventListener(bytes32)

Parameters

_event // the event to subscribe to

addEventListener(bytes32,address)

CALL
addEventListener(bytes32,address)

Parameters

_event // the event to subscribe to
_listener // the address of an EventListener

removeEventListener(bytes32)

CALL
removeEventListener(bytes32)

Parameters

_event // the event to unsubscribe from

removeEventListener(bytes32,address)

CALL
removeEventListener(bytes32,address)

Parameters

_event // the event to unsubscribe from
_listener // the address of an EventListener

EventListener

The EventListener contract is found within the agreements bundle.

eventFired(bytes32,address)

Invoked by an EventEmitter for a named event without any additional data.


eventFired(bytes32,address,address)

Invoked by an EventEmitter for a named event with an additional address payload.


eventFired(bytes32,address,bytes32)

Invoked by an EventEmitter for a named event with an additional bytes32 payload.


eventFired(bytes32,address,string)

Invoked by an EventEmitter for a named event with an additional string payload.


eventFired(bytes32,address,uint256)

Invoked by an EventEmitter for a named event with an additional uint payload.


eventFired(bytes32,address)

CALL
eventFired(bytes32,address)

Parameters

_event // the event name
_source // the source of the event

eventFired(bytes32,address,address)

CALL
eventFired(bytes32,address,address)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

eventFired(bytes32,address,bytes32)

CALL
eventFired(bytes32,address,bytes32)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

eventFired(bytes32,address,string)

CALL
eventFired(bytes32,address,string)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

eventFired(bytes32,address,uint256)

CALL
eventFired(bytes32,address,uint256)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

Mappings Library Public API Contract

The Mappings Library Public API Contract contract is found within the agreements bundle.

addToArray(Mappings.AddressAddressArrayMap storage,address,address,bool)

Adds the specified value to the array that is stored in the map under the given key. The boolean parameter specifies whether duplicate values in the array are allowed.


addToArray(Mappings.AddressBytes32ArrayMap storage,address,bytes32,bool)

Adds the specified value to the array that is stored in the map under the given key. The boolean parameter specifies whether duplicate values in the array are allowed.


addToArray(Mappings.Bytes32AddressArrayMap storage,bytes32,address,bool)

Adds the specified value to the array that is stored in the map under the given key. The boolean parameter specifies whether duplicate values in the array are allowed.


addToArray(Mappings.UintAddressArrayMap storage,uint256,address,bool)

Adds the specified value to the array that is stored in the map under the given key. The boolean parameter specifies whether duplicate values in the array are allowed.


addToArray(Mappings.UintBytes32ArrayMap storage,uint256,bytes32,bool)

Adds the specified value to the array that is stored in the map under the given key. The boolean parameter specifies whether duplicate values in the array are allowed.


clear(Mappings.AddressAddressArrayMap storage)

Removes all entries stored in the given map.


clear(Mappings.AddressAddressMap storage)

Removes all entries stored in the given map.


clear(Mappings.AddressBytes32ArrayMap storage)

Removes all entries stored in the given map.


clear(Mappings.AddressBytes32Map storage)

Removes all entries stored in the given map.


clear(Mappings.Bytes32AddressArrayMap storage)

Removes all entries stored in the given map.


clear(Mappings.Bytes32AddressMap storage)

Removes all entries stored in the given map.


clear(Mappings.Bytes32Bytes32Map storage)

Removes all entries stored in the given map.


clear(Mappings.Bytes32UintMap storage)

Removes all entries stored in the given map.


clear(Mappings.UintAddressArrayMap storage)

Removes all entries stored in the given map.


clear(Mappings.UintAddressMap storage)

Removes all entries stored in the given map.


clear(Mappings.UintBytes32ArrayMap storage)

Removes all entries stored in the given map.


exists(Mappings.AddressAddressArrayMap storage,address)

Checks whether the specified key exists in the given map.


exists(Mappings.AddressAddressMap storage,address)

Checks whether the specified key exists in the given map.


exists(Mappings.AddressBytes32ArrayMap storage,address)

Checks whether the specified key exists in the given map.


exists(Mappings.AddressBytes32Map storage,address)

Checks whether the specified key exists in the given map.


exists(Mappings.Bytes32AddressArrayMap storage,bytes32)

Checks whether the specified key exists in the given map.


exists(Mappings.Bytes32AddressMap storage,bytes32)

Checks whether the specified key exists in the given map.


exists(Mappings.Bytes32Bytes32Map storage,bytes32)

Checks whether the specified key exists in the given map.


exists(Mappings.Bytes32UintMap storage,bytes32)

Checks whether the specified key exists in the given map.


exists(Mappings.UintAddressArrayMap storage,uint256)

Checks whether the specified key exists in the given map.


exists(Mappings.UintAddressMap storage,uint256)

Checks whether the specified key exists in the given map.


exists(Mappings.UintBytes32ArrayMap storage,uint256)

Checks whether the specified key exists in the given map.


get(Mappings.AddressAddressArrayMap storage,address)

Returns the value registered at the specified key in the given map.


get(Mappings.AddressAddressMap storage,address)

Returns the value registered at the specified key in the given map.


get(Mappings.AddressBytes32ArrayMap storage,address)

Returns the value registered at the specified key in the given map.


get(Mappings.AddressBytes32Map storage,address)

Returns the value registered at the specified key in the given map.


get(Mappings.Bytes32AddressArrayMap storage,bytes32)

Returns the value registered at the specified key in the given map.


get(Mappings.Bytes32AddressMap storage,bytes32)

Returns the value registered at the specified key in the given map.


get(Mappings.Bytes32Bytes32Map storage,bytes32)

Returns the value registered at the specified key in the given map.


get(Mappings.Bytes32UintMap storage,bytes32)

Returns the value registered at the specified key in the given map.


get(Mappings.UintAddressArrayMap storage,uint256)

Returns the value registered at the specified key in the given map.


get(Mappings.UintAddressMap storage,uint256)

Returns the value registered at the specified key in the given map.


get(Mappings.UintBytes32ArrayMap storage,uint256)

Returns the value registered at the specified key in the given map.


insert(Mappings.AddressAddressArrayMap storage,address,address[])

Inserts the given value at the specified key in the provided map.


insert(Mappings.AddressAddressMap storage,address,address)

Inserts the given value at the specified key in the provided map.


insert(Mappings.AddressBytes32ArrayMap storage,address,bytes32[])

Inserts the given value at the specified key in the provided map.


insert(Mappings.AddressBytes32Map storage,address,bytes32)

Inserts the given value at the specified key in the provided map.


insert(Mappings.Bytes32AddressArrayMap storage,bytes32,address[])

Inserts the given value at the specified key in the provided map.


insert(Mappings.Bytes32AddressMap storage,bytes32,address)

Inserts the given value at the specified key in the provided map.


insert(Mappings.Bytes32Bytes32Map storage,bytes32,bytes32)

Inserts the given value at the specified key in the provided map.


insert(Mappings.Bytes32UintMap storage,bytes32,uint256)

Inserts the given value at the specified key in the provided map.


insert(Mappings.UintAddressArrayMap storage,uint256,address[])

Inserts the given value at the specified key in the provided map.


insert(Mappings.UintAddressMap storage,uint256,address)

Inserts the given value at the specified key in the provided map.


insert(Mappings.UintBytes32ArrayMap storage,uint256,bytes32[])

Inserts the given value at the specified key in the provided map.


insertOrUpdate(Mappings.AddressAddressArrayMap storage,address,address[])

Inserts or updates the given value at the specified key in the provided map.


insertOrUpdate(Mappings.AddressAddressMap storage,address,address)

Inserts or updates the given value at the specified key in the provided map.


insertOrUpdate(Mappings.AddressBytes32ArrayMap storage,address,bytes32[])

Inserts or updates the given value at the specified key in the provided map.


insertOrUpdate(Mappings.AddressBytes32Map storage,address,bytes32)

Inserts or updates the given value at the specified key in the provided map.


insertOrUpdate(Mappings.Bytes32AddressArrayMap storage,bytes32,address[])

Inserts or updates the given value at the specified key in the provided map.


insertOrUpdate(Mappings.Bytes32AddressMap storage,bytes32,address)

Inserts or updates the given value at the specified key in the provided map.


insertOrUpdate(Mappings.Bytes32Bytes32Map storage,bytes32,bytes32)

Inserts or updates the given value at the specified key in the provided map.


insertOrUpdate(Mappings.Bytes32UintMap storage,bytes32,uint256)

Inserts or updates the given value at the specified key in the provided map.


insertOrUpdate(Mappings.UintAddressArrayMap storage,uint256,address[])

Inserts or updates the given value at the specified key in the provided map.


insertOrUpdate(Mappings.UintAddressMap storage,uint256,address)

Inserts or updates the given value at the specified key in the provided map.


insertOrUpdate(Mappings.UintBytes32ArrayMap storage,uint256,bytes32[])

Inserts or updates the given value at the specified key in the provided map.


keyAtIndex(Mappings.AddressAddressArrayMap storage,uint256)

Retrieves the key at the given index.


keyAtIndex(Mappings.AddressAddressMap storage,uint256)

Retrieves the key at the given index.


keyAtIndex(Mappings.AddressBytes32ArrayMap storage,uint256)

Retrieves the key at the given index.


keyAtIndex(Mappings.AddressBytes32Map storage,uint256)

Retrieves the key at the given index.


keyAtIndex(Mappings.Bytes32AddressArrayMap storage,uint256)

Retrieves the key at the given index.


keyAtIndex(Mappings.Bytes32AddressMap storage,uint256)

Retrieves the key at the given index.


keyAtIndex(Mappings.Bytes32Bytes32Map storage,uint256)

Retrieves the key at the given index.


keyAtIndex(Mappings.Bytes32UintMap storage,uint256)

Retrieves the key at the given index.


keyAtIndex(Mappings.UintAddressArrayMap storage,uint256)

Retrieves the key at the given index.


keyAtIndex(Mappings.UintAddressMap storage,uint256)

Retrieves the key at the given index.


keyAtIndex(Mappings.UintBytes32ArrayMap storage,uint256)

Retrieves the key at the given index.


keyAtIndexHasNext(Mappings.AddressAddressArrayMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.AddressAddressMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.AddressBytes32ArrayMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.AddressBytes32Map storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.Bytes32AddressArrayMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.Bytes32AddressMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.Bytes32Bytes32Map storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.Bytes32UintMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.UintAddressArrayMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.UintAddressMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.UintBytes32ArrayMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyIndex(Mappings.AddressAddressArrayMap storage,address)

Returns the index of the given key.


keyIndex(Mappings.AddressAddressMap storage,address)

Returns the index of the given key.


keyIndex(Mappings.AddressBytes32ArrayMap storage,address)

Returns the index of the given key.


keyIndex(Mappings.AddressBytes32Map storage,address)

Returns the index of the given key.


keyIndex(Mappings.Bytes32AddressArrayMap storage,bytes32)

Returns the index of the given key.


keyIndex(Mappings.Bytes32AddressMap storage,bytes32)

Returns the index of the given key.


keyIndex(Mappings.Bytes32Bytes32Map storage,bytes32)

Returns the index of the given key.


keyIndex(Mappings.Bytes32UintMap storage,bytes32)

Returns the index of the given key.


keyIndex(Mappings.UintAddressArrayMap storage,uint256)

Returns the index of the given key.


keyIndex(Mappings.UintAddressMap storage,uint256)

Returns the index of the given key.


keyIndex(Mappings.UintBytes32ArrayMap storage,uint256)

Returns the index of the given key.


remove(Mappings.AddressAddressArrayMap storage,address)

Removes the entry registered at the specified key in the provided map.


remove(Mappings.AddressAddressMap storage,address)

Removes the entry registered at the specified key in the provided map.


remove(Mappings.AddressBytes32ArrayMap storage,address)

Removes the entry registered at the specified key in the provided map.


remove(Mappings.AddressBytes32Map storage,address)

Removes the entry registered at the specified key in the provided map.


remove(Mappings.Bytes32AddressArrayMap storage,bytes32)

Removes the entry registered at the specified key in the provided map.


remove(Mappings.Bytes32AddressMap storage,bytes32)

Removes the entry registered at the specified key in the provided map.


remove(Mappings.Bytes32Bytes32Map storage,bytes32)

Removes the entry registered at the specified key in the provided map.


remove(Mappings.Bytes32UintMap storage,bytes32)

Removes the entry registered at the specified key in the provided map.


remove(Mappings.UintAddressArrayMap storage,uint256)

Removes the entry registered at the specified key in the provided map.


remove(Mappings.UintAddressMap storage,uint256)

Removes the entry registered at the specified key in the provided map.


remove(Mappings.UintBytes32ArrayMap storage,uint256)

Removes the entry registered at the specified key in the provided map.


removeFromArray(Mappings.AddressAddressArrayMap storage,address,address,bool)

Removes the specified value from the inner array in the given map structure. The bool parameter specifies whether 'all' occurences of the value should be deleted.


removeFromArray(Mappings.AddressBytes32ArrayMap storage,address,bytes32,bool)

Removes the specified value from the inner array in the given map structure. The bool parameter specifies whether 'all' occurences of the value should be deleted.


removeFromArray(Mappings.Bytes32AddressArrayMap storage,bytes32,address,bool)

Removes the specified value from the inner array in the given map structure. The bool parameter specifies whether 'all' occurences of the value should be deleted.


removeFromArray(Mappings.UintAddressArrayMap storage,uint256,address,bool)

Removes the specified value from the inner array in the given map structure. The bool parameter specifies whether 'all' occurences of the value should be deleted.


removeFromArray(Mappings.UintBytes32ArrayMap storage,uint256,bytes32,bool)

Removes the specified value from the inner array in the given map structure. The bool parameter specifies whether 'all' occurences of the value should be deleted.


valueAtIndexHasNext(Mappings.AddressAddressArrayMap storage,uint256)

Retrieves the value at the given index position and the index of the next address.


valueAtIndexHasNext(Mappings.AddressAddressMap storage,uint256)

Retrieves the value at the given index position and the index of the next address.


valueAtIndexHasNext(Mappings.AddressBytes32ArrayMap storage,uint256)

Retrieves the value at the given index position and the index of the next address.


valueAtIndexHasNext(Mappings.AddressBytes32Map storage,uint256)

Retrieves the value at the given index position and the index of the next address.


valueAtIndexHasNext(Mappings.Bytes32AddressArrayMap storage,uint256)

Retrieves the value at the given index position and the index of the next address.


valueAtIndexHasNext(Mappings.Bytes32AddressMap storage,uint256)

Retrieves the value at the given index position and the index of the next address.


valueAtIndexHasNext(Mappings.Bytes32Bytes32Map storage,uint256)

Retrieves the value at the given index position and the index of the next address.


valueAtIndexHasNext(Mappings.Bytes32UintMap storage,uint256)

Retrieves the value at the given index position and the index of the next address.


valueAtIndexHasNext(Mappings.UintAddressArrayMap storage,uint256)

Retrieves the value at the given index position and the index of the next address.


valueAtIndexHasNext(Mappings.UintAddressMap storage,uint256)

Retrieves the value at the given index position and the index of the next address.


valueAtIndexHasNext(Mappings.UintBytes32ArrayMap storage,uint256)

Retrieves the value at the given index position and the index of the next address.


addToArray(Mappings.AddressAddressArrayMap storage,address,address,bool)

CALL
addToArray(Mappings.AddressAddressArrayMap

Parameters

_key // the key for the array
_map // the map
_unique // set to true if the value should only be added if it does not already exist in the array
_value // the value to store in the array

Return

the length of the array after the operation

addToArray(Mappings.AddressBytes32ArrayMap storage,address,bytes32,bool)

CALL
addToArray(Mappings.AddressBytes32ArrayMap

Parameters

_key // the key for the array
_map // the map
_unique // set to true if the value should only be added if it does not already exist in the array
_value // the value to store in the array

Return

the length of the array after the operation

addToArray(Mappings.Bytes32AddressArrayMap storage,bytes32,address,bool)

CALL
addToArray(Mappings.Bytes32AddressArrayMap

Parameters

_key // the key for the array
_map // the map
_unique // set to true if the value should only be added if it does not already exist in the array
_value // the value to store in the array

Return

the length of the array after the operation

addToArray(Mappings.UintAddressArrayMap storage,uint256,address,bool)

CALL
addToArray(Mappings.UintAddressArrayMap

Parameters

_key // the key for the array
_map // the map
_unique // set to true if the value should only be added if it does not already exist in the array
_value // the value to store in the array

Return

the length of the array after the operation

addToArray(Mappings.UintBytes32ArrayMap storage,uint256,bytes32,bool)

CALL
addToArray(Mappings.UintBytes32ArrayMap

Parameters

_key // the key for the array
_map // the map
_unique // set to true if the value should only be added if it does not already exist in the array
_value // the value to store in the array

Return

the length of the array after the operation

clear(Mappings.AddressAddressArrayMap storage)

CALL
clear(Mappings.AddressAddressArrayMap

Parameters

_map // the map

Return

the number of removed entries

clear(Mappings.AddressAddressMap storage)

CALL
clear(Mappings.AddressAddressMap

Parameters

_map // the map

Return

the number of removed entries

clear(Mappings.AddressBytes32ArrayMap storage)

CALL
clear(Mappings.AddressBytes32ArrayMap

Parameters

_map // the map

Return

the number of removed entries

clear(Mappings.AddressBytes32Map storage)

CALL
clear(Mappings.AddressBytes32Map

Parameters

_map // the map

Return

the number of removed entries

clear(Mappings.Bytes32AddressArrayMap storage)

CALL
clear(Mappings.Bytes32AddressArrayMap

Parameters

_map // the map

Return

the number of removed entries

clear(Mappings.Bytes32AddressMap storage)

CALL
clear(Mappings.Bytes32AddressMap

Parameters

_map // the map

Return

the number of removed entries

clear(Mappings.Bytes32Bytes32Map storage)

CALL
clear(Mappings.Bytes32Bytes32Map

Parameters

_map // the map

Return

the number of removed entries

clear(Mappings.Bytes32UintMap storage)

CALL
clear(Mappings.Bytes32UintMap

Parameters

_map // the map

Return

the number of removed entries

clear(Mappings.UintAddressArrayMap storage)

CALL
clear(Mappings.UintAddressArrayMap

Parameters

_map // the map

Return

the number of removed entries

clear(Mappings.UintAddressMap storage)

CALL
clear(Mappings.UintAddressMap

Parameters

_map // the map

Return

the number of removed entries

clear(Mappings.UintBytes32ArrayMap storage)

CALL
clear(Mappings.UintBytes32ArrayMap

Parameters

_map // the map

Return

the number of removed entries

exists(Mappings.AddressAddressArrayMap storage,address)

CALL
exists(Mappings.AddressAddressArrayMap

Parameters

_key // the key
_map // the map

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.AddressAddressMap storage,address)

CALL
exists(Mappings.AddressAddressMap

Parameters

_key // the key
_map // the map

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.AddressBytes32ArrayMap storage,address)

CALL
exists(Mappings.AddressBytes32ArrayMap

Parameters

_key // the key
_map // the map

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.AddressBytes32Map storage,address)

CALL
exists(Mappings.AddressBytes32Map

Parameters

_key // the key
_map // the map

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.Bytes32AddressArrayMap storage,bytes32)

CALL
exists(Mappings.Bytes32AddressArrayMap

Parameters

_key // the key
_map // the map

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.Bytes32AddressMap storage,bytes32)

CALL
exists(Mappings.Bytes32AddressMap

Parameters

_key // the key
_map // the map

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.Bytes32Bytes32Map storage,bytes32)

CALL
exists(Mappings.Bytes32Bytes32Map

Parameters

_key // the key
_map // the map

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.Bytes32UintMap storage,bytes32)

CALL
exists(Mappings.Bytes32UintMap

Parameters

_key // the key
_map // the map

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.UintAddressArrayMap storage,uint256)

CALL
exists(Mappings.UintAddressArrayMap

Parameters

_key // the key
_map // the map

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.UintAddressMap storage,uint256)

CALL
exists(Mappings.UintAddressMap

Parameters

_key // the key
_map // the map

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.UintBytes32ArrayMap storage,uint256)

CALL
exists(Mappings.UintBytes32ArrayMap

Parameters

_key // the key
_map // the map

Return

true if the map contains valid values at the specified key, false otherwise.

get(Mappings.AddressAddressArrayMap storage,address)

CALL
get(Mappings.AddressAddressArrayMap

Parameters

_key // the key
_map // the map

Return

the value

get(Mappings.AddressAddressMap storage,address)

CALL
get(Mappings.AddressAddressMap

Parameters

_key // the key
_map // the map

Return

the value

get(Mappings.AddressBytes32ArrayMap storage,address)

CALL
get(Mappings.AddressBytes32ArrayMap

Parameters

_key // the key
_map // the map

Return

the value

get(Mappings.AddressBytes32Map storage,address)

CALL
get(Mappings.AddressBytes32Map

Parameters

_key // the key
_map // the map

Return

the value

get(Mappings.Bytes32AddressArrayMap storage,bytes32)

CALL
get(Mappings.Bytes32AddressArrayMap

Parameters

_key // the key
_map // the map

Return

the value

get(Mappings.Bytes32AddressMap storage,bytes32)

CALL
get(Mappings.Bytes32AddressMap

Parameters

_key // the key
_map // the map

Return

the value

get(Mappings.Bytes32Bytes32Map storage,bytes32)

CALL
get(Mappings.Bytes32Bytes32Map

Parameters

_key // the key
_map // the map

Return

the value

get(Mappings.Bytes32UintMap storage,bytes32)

CALL
get(Mappings.Bytes32UintMap

Parameters

_key // the key
_map // the map

Return

the value

get(Mappings.UintAddressArrayMap storage,uint256)

CALL
get(Mappings.UintAddressArrayMap

Parameters

_key // the key
_map // the map

Return

the value

get(Mappings.UintAddressMap storage,uint256)

CALL
get(Mappings.UintAddressMap

Parameters

_key // the key
_map // the map

Return

the value

get(Mappings.UintBytes32ArrayMap storage,uint256)

CALL
get(Mappings.UintBytes32ArrayMap

Parameters

_key // the key
_map // the map

Return

the value

insert(Mappings.AddressAddressArrayMap storage,address,address[])

CALL
insert(Mappings.AddressAddressArrayMap

Parameters

_key // the key
_map // the map
_value // the value

Return

error code

insert(Mappings.AddressAddressMap storage,address,address)

CALL
insert(Mappings.AddressAddressMap

Parameters

_key // the key
_map // the map
_value // the value

Return

error code

insert(Mappings.AddressBytes32ArrayMap storage,address,bytes32[])

CALL
insert(Mappings.AddressBytes32ArrayMap

Parameters

_key // the key
_map // the map
_value // the value

Return

error code

insert(Mappings.AddressBytes32Map storage,address,bytes32)

CALL
insert(Mappings.AddressBytes32Map

Parameters

_key // the key
_map // the map
_value // the value

Return

error code

insert(Mappings.Bytes32AddressArrayMap storage,bytes32,address[])

CALL
insert(Mappings.Bytes32AddressArrayMap

Parameters

_key // the key
_map // the map
_value // the value

Return

error code

insert(Mappings.Bytes32AddressMap storage,bytes32,address)

CALL
insert(Mappings.Bytes32AddressMap

Parameters

_key // the key
_map // the map
_value // the value

Return

error code

insert(Mappings.Bytes32Bytes32Map storage,bytes32,bytes32)

CALL
insert(Mappings.Bytes32Bytes32Map

Parameters

_key // the key
_map // the map
_value // the value

Return

error code

insert(Mappings.Bytes32UintMap storage,bytes32,uint256)

CALL
insert(Mappings.Bytes32UintMap

Parameters

_key // the key
_map // the map
_value // the value

Return

error code

insert(Mappings.UintAddressArrayMap storage,uint256,address[])

CALL
insert(Mappings.UintAddressArrayMap

Parameters

_key // the key
_map // the map
_value // the value

Return

error code

insert(Mappings.UintAddressMap storage,uint256,address)

CALL
insert(Mappings.UintAddressMap

Parameters

_key // the key
_map // the map
_value // the value

Return

error code

insert(Mappings.UintBytes32ArrayMap storage,uint256,bytes32[])

CALL
insert(Mappings.UintBytes32ArrayMap

Parameters

_key // the key
_map // the map
_value // the value

Return

error code

insertOrUpdate(Mappings.AddressAddressArrayMap storage,address,address[])

CALL
insertOrUpdate(Mappings.AddressAddressArrayMap

Parameters

_key // the key
_map // the map
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.AddressAddressMap storage,address,address)

CALL
insertOrUpdate(Mappings.AddressAddressMap

Parameters

_key // the key
_map // the map
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.AddressBytes32ArrayMap storage,address,bytes32[])

CALL
insertOrUpdate(Mappings.AddressBytes32ArrayMap

Parameters

_key // the key
_map // the map
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.AddressBytes32Map storage,address,bytes32)

CALL
insertOrUpdate(Mappings.AddressBytes32Map

Parameters

_key // the key
_map // the map
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.Bytes32AddressArrayMap storage,bytes32,address[])

CALL
insertOrUpdate(Mappings.Bytes32AddressArrayMap

Parameters

_key // the key
_map // the map
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.Bytes32AddressMap storage,bytes32,address)

CALL
insertOrUpdate(Mappings.Bytes32AddressMap

Parameters

_key // the key
_map // the map
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.Bytes32Bytes32Map storage,bytes32,bytes32)

CALL
insertOrUpdate(Mappings.Bytes32Bytes32Map

Parameters

_key // the key
_map // the map
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.Bytes32UintMap storage,bytes32,uint256)

CALL
insertOrUpdate(Mappings.Bytes32UintMap

Parameters

_key // the key
_map // the map
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.UintAddressArrayMap storage,uint256,address[])

CALL
insertOrUpdate(Mappings.UintAddressArrayMap

Parameters

_key // the key
_map // the map
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.UintAddressMap storage,uint256,address)

CALL
insertOrUpdate(Mappings.UintAddressMap

Parameters

_key // the key
_map // the map
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.UintBytes32ArrayMap storage,uint256,bytes32[])

CALL
insertOrUpdate(Mappings.UintBytes32ArrayMap

Parameters

_key // the key
_map // the map
_value // the value

Return

the size of the map after the operation

keyAtIndex(Mappings.AddressAddressArrayMap storage,uint256)

CALL
keyAtIndex(Mappings.AddressAddressArrayMap

Parameters

_index // the index
_map // the map

Return

error codethe key

keyAtIndex(Mappings.AddressAddressMap storage,uint256)

CALL
keyAtIndex(Mappings.AddressAddressMap

Parameters

_index // the index
_map // the map

Return

error codethe key

keyAtIndex(Mappings.AddressBytes32ArrayMap storage,uint256)

CALL
keyAtIndex(Mappings.AddressBytes32ArrayMap

Parameters

_index // the index
_map // the map

Return

error codethe key

keyAtIndex(Mappings.AddressBytes32Map storage,uint256)

CALL
keyAtIndex(Mappings.AddressBytes32Map

Parameters

_index // the index
_map // the map

Return

error codethe key

keyAtIndex(Mappings.Bytes32AddressArrayMap storage,uint256)

CALL
keyAtIndex(Mappings.Bytes32AddressArrayMap

Parameters

_index // the index
_map // the map

Return

error codethe key

keyAtIndex(Mappings.Bytes32AddressMap storage,uint256)

CALL
keyAtIndex(Mappings.Bytes32AddressMap

Parameters

_index // the index
_map // the map

Return

error code

keyAtIndex(Mappings.Bytes32Bytes32Map storage,uint256)

CALL
keyAtIndex(Mappings.Bytes32Bytes32Map

Parameters

_index // the index
_map // the map

Return

error code

keyAtIndex(Mappings.Bytes32UintMap storage,uint256)

CALL
keyAtIndex(Mappings.Bytes32UintMap

Parameters

_index // the index
_map // the map

Return

error codekey at _index

keyAtIndex(Mappings.UintAddressArrayMap storage,uint256)

CALL
keyAtIndex(Mappings.UintAddressArrayMap

Parameters

_index // the index
_map // the map

Return

error codethe key

keyAtIndex(Mappings.UintAddressMap storage,uint256)

CALL
keyAtIndex(Mappings.UintAddressMap

Parameters

_index // the index
_map // the map

Return

error codethe key

keyAtIndex(Mappings.UintBytes32ArrayMap storage,uint256)

CALL
keyAtIndex(Mappings.UintBytes32ArrayMap

Parameters

_index // the index
_map // the map

Return

error codethe key

keyAtIndexHasNext(Mappings.AddressAddressArrayMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.AddressAddressArrayMap

Parameters

_index // the index
_map // the map

Return

errorkeynextindex the next index, if there is one

keyAtIndexHasNext(Mappings.AddressAddressMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.AddressAddressMap

Parameters

_index // the index
_map // the map

Return

errorkeynextindex the next index, if there is one

keyAtIndexHasNext(Mappings.AddressBytes32ArrayMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.AddressBytes32ArrayMap

Parameters

_index // the index
_map // the map

Return

errorkeynextindex the next index, if there is one

keyAtIndexHasNext(Mappings.AddressBytes32Map storage,uint256)

CALL
keyAtIndexHasNext(Mappings.AddressBytes32Map

Parameters

_index // the index
_map // the map

Return

errorkeynextindex the next index, if there is one

keyAtIndexHasNext(Mappings.Bytes32AddressArrayMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.Bytes32AddressArrayMap

Parameters

_index // the index
_map // the map

Return

errorkeynextindex the next index, if there is one

keyAtIndexHasNext(Mappings.Bytes32AddressMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.Bytes32AddressMap

Parameters

_index // the index
_map // the map

Return

errorkeynextindex the next index, if there is one

keyAtIndexHasNext(Mappings.Bytes32Bytes32Map storage,uint256)

CALL
keyAtIndexHasNext(Mappings.Bytes32Bytes32Map

Parameters

_index // the index
_map // the map

Return

errorkeynextindex the next index, if there is one

keyAtIndexHasNext(Mappings.Bytes32UintMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.Bytes32UintMap

Parameters

_index // the index
_map // the map

Return

errorkeynextIndex the next index, if there is one

keyAtIndexHasNext(Mappings.UintAddressArrayMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.UintAddressArrayMap

Parameters

_index // the index
_map // the map

Return

errorkeynextindex the next index, if there is one

keyAtIndexHasNext(Mappings.UintAddressMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.UintAddressMap

Parameters

_index // the index
_map // the map

Return

errorkeynextindex the next index, if there is one

keyAtIndexHasNext(Mappings.UintBytes32ArrayMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.UintBytes32ArrayMap

Parameters

_index // the index
_map // the map

Return

errorkeynextindex the next index, if there is one

keyIndex(Mappings.AddressAddressArrayMap storage,address)

CALL
keyIndex(Mappings.AddressAddressArrayMap

Parameters

_key // the key
_map // the map

Return

the index

keyIndex(Mappings.AddressAddressMap storage,address)

CALL
keyIndex(Mappings.AddressAddressMap

Parameters

_key // the key
_map // the map

Return

the index

keyIndex(Mappings.AddressBytes32ArrayMap storage,address)

CALL
keyIndex(Mappings.AddressBytes32ArrayMap

Parameters

_key // the key
_map // the map

Return

the index

keyIndex(Mappings.AddressBytes32Map storage,address)

CALL
keyIndex(Mappings.AddressBytes32Map

Parameters

_key // the key
_map // the map

Return

the index

keyIndex(Mappings.Bytes32AddressArrayMap storage,bytes32)

CALL
keyIndex(Mappings.Bytes32AddressArrayMap

Parameters

_key // the key
_map // the map

Return

the index

keyIndex(Mappings.Bytes32AddressMap storage,bytes32)

CALL
keyIndex(Mappings.Bytes32AddressMap

Parameters

_key // the key
_map // the map

Return

the index

keyIndex(Mappings.Bytes32Bytes32Map storage,bytes32)

CALL
keyIndex(Mappings.Bytes32Bytes32Map

Parameters

_key // the key
_map // the map

Return

the index

keyIndex(Mappings.Bytes32UintMap storage,bytes32)

CALL
keyIndex(Mappings.Bytes32UintMap

Parameters

_key // the key
_map // the map

Return

the index

keyIndex(Mappings.UintAddressArrayMap storage,uint256)

CALL
keyIndex(Mappings.UintAddressArrayMap

Parameters

_key // the key
_map // the map

Return

the index

keyIndex(Mappings.UintAddressMap storage,uint256)

CALL
keyIndex(Mappings.UintAddressMap

Parameters

_key // the key
_map // the map

Return

the index

keyIndex(Mappings.UintBytes32ArrayMap storage,uint256)

CALL
keyIndex(Mappings.UintBytes32ArrayMap

Parameters

_key // the key
_map // the map

Return

the index

remove(Mappings.AddressAddressArrayMap storage,address)

CALL
remove(Mappings.AddressAddressArrayMap

Parameters

_key // the key
_map // the map

Return

error code

remove(Mappings.AddressAddressMap storage,address)

CALL
remove(Mappings.AddressAddressMap

Parameters

_key // the key
_map // the map

Return

error code

remove(Mappings.AddressBytes32ArrayMap storage,address)

CALL
remove(Mappings.AddressBytes32ArrayMap

Parameters

_key // the key
_map // the map

Return

error code

remove(Mappings.AddressBytes32Map storage,address)

CALL
remove(Mappings.AddressBytes32Map

Parameters

_key // the key
_map // the map

Return

error code

remove(Mappings.Bytes32AddressArrayMap storage,bytes32)

CALL
remove(Mappings.Bytes32AddressArrayMap

Parameters

_key // the key
_map // the map

Return

error code

remove(Mappings.Bytes32AddressMap storage,bytes32)

CALL
remove(Mappings.Bytes32AddressMap

Parameters

_key // the key
_map // the map

Return

error code

remove(Mappings.Bytes32Bytes32Map storage,bytes32)

CALL
remove(Mappings.Bytes32Bytes32Map

Parameters

_key // the key
_map // the map

Return

error code

remove(Mappings.Bytes32UintMap storage,bytes32)

CALL
remove(Mappings.Bytes32UintMap

Parameters

_key // the key
_map // the map

Return

error code

remove(Mappings.UintAddressArrayMap storage,uint256)

CALL
remove(Mappings.UintAddressArrayMap

Parameters

_key // the key
_map // the map

Return

error code

remove(Mappings.UintAddressMap storage,uint256)

CALL
remove(Mappings.UintAddressMap

Parameters

_key // the key
_map // the map

Return

error code

remove(Mappings.UintBytes32ArrayMap storage,uint256)

CALL
remove(Mappings.UintBytes32ArrayMap

Parameters

_key // the key
_map // the map

Return

error code

removeFromArray(Mappings.AddressAddressArrayMap storage,address,address,bool)

CALL
removeFromArray(Mappings.AddressAddressArrayMap

Parameters

_all // if true, all occurences of the value should be deleted, if false only the first encountered one
_key // the key for the array
_map // the map
_value // the value to be deleted in the array

Return

the resulting array length

removeFromArray(Mappings.AddressBytes32ArrayMap storage,address,bytes32,bool)

CALL
removeFromArray(Mappings.AddressBytes32ArrayMap

Parameters

_all // if true, all occurences of the value should be deleted, if false only the first encountered one
_key // the key for the array
_map // the map
_value // the value to be deleted in the array

Return

the resulting array length

removeFromArray(Mappings.Bytes32AddressArrayMap storage,bytes32,address,bool)

CALL
removeFromArray(Mappings.Bytes32AddressArrayMap

Parameters

_all // if true, all occurences of the value should be deleted, if false only the first encountered one
_key // the key for the array
_map // the map
_value // the value to be deleted in the array

Return

the resulting array length

removeFromArray(Mappings.UintAddressArrayMap storage,uint256,address,bool)

CALL
removeFromArray(Mappings.UintAddressArrayMap

Parameters

_all // if true, all occurences of the value should be deleted, if false only the first encountered one
_key // the key for the array
_map // the map
_value // the value to be deleted in the array

Return

the resulting array length

removeFromArray(Mappings.UintBytes32ArrayMap storage,uint256,bytes32,bool)

CALL
removeFromArray(Mappings.UintBytes32ArrayMap

Parameters

_all // if true, all occurences of the value should be deleted, if false only the first encountered one
_key // the key for the array
_map // the map
_value // the value to be deleted in the array

Return

the resulting array length

valueAtIndexHasNext(Mappings.AddressAddressArrayMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.AddressAddressArrayMap

Parameters

_index // the index
_map // the map

Return

errorvaluenextIndex the next index, if there is one

valueAtIndexHasNext(Mappings.AddressAddressMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.AddressAddressMap

Parameters

_index // the index
_map // the map

Return

errorvaluenextIndex the next index, if there is one

valueAtIndexHasNext(Mappings.AddressBytes32ArrayMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.AddressBytes32ArrayMap

Parameters

_index // the index
_map // the map

Return

errorvaluenextIndex the next index, if there is one

valueAtIndexHasNext(Mappings.AddressBytes32Map storage,uint256)

CALL
valueAtIndexHasNext(Mappings.AddressBytes32Map

Parameters

_index // the index
_map // the map

Return

errorvaluenextIndex the next index, if there is one

valueAtIndexHasNext(Mappings.Bytes32AddressArrayMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.Bytes32AddressArrayMap

Parameters

_index // the index
_map // the map

Return

errorvaluenextIndex the next index, if there is one

valueAtIndexHasNext(Mappings.Bytes32AddressMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.Bytes32AddressMap

Parameters

_index // the index
_map // the map

Return

errorvaluenextIndex the next index, if there is one

valueAtIndexHasNext(Mappings.Bytes32Bytes32Map storage,uint256)

CALL
valueAtIndexHasNext(Mappings.Bytes32Bytes32Map

Parameters

_index // the index
_map // the map

Return

errorvaluenextIndex the next index, if there is one

valueAtIndexHasNext(Mappings.Bytes32UintMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.Bytes32UintMap

Parameters

_index // the index
_map // the map

Return

errorvaluenextIndex the next index, if there is one

valueAtIndexHasNext(Mappings.UintAddressArrayMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.UintAddressArrayMap

Parameters

_index // the index
_map // the map

Return

errorvaluenextIndex the next index, if there is one

valueAtIndexHasNext(Mappings.UintAddressMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.UintAddressMap

Parameters

_index // the index
_map // the map

Return

errorvaluenextIndex the next index, if there is one

valueAtIndexHasNext(Mappings.UintBytes32ArrayMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.UintBytes32ArrayMap

Parameters

_index // the index
_map // the map

Return

errorvaluenextIndex the next index, if there is one

Migratable Interface

The Migratable Interface contract is found within the agreements bundle.

migrateFrom(address)

Implements the migration of state from the specified predecessor to this contract. This method can be used to 'read' the state of the other contract which is probably easier to achieve.


migrateTo(address)

Implements the migration of state this contract to the specified contract. This method can be used to 'write' the state from this contract to the success. It's probably a little less useful since it requires the successor contract to have appropriate functions to set state.


migrateFrom(address)

CALL
migrateFrom(address)

Parameters

predecessor // the address from which the state is migrated

Return

result the result of the operation, e.g. a constant from commons-base/BaseErrors.sol

migrateTo(address)

CALL
migrateTo(address)

Parameters

successor // the address to which the state is migrated

Return

result the result of the operation, e.g. a constant from commons-base/BaseErrors.sol

Named Interface

The Named Interface contract is found within the agreements bundle.

getName()

Returns the name of this contract.


getName()

CALL
getName()

Return

the bytes32 name

NamedElement Interface

The NamedElement Interface contract is found within the agreements bundle.

getId()

Returns the identifier of this contract.


getName()

Returns the name of this contract.


getId()

CALL
getId()

Return

the bytes32 ID

getName()

CALL
getName()

Return

the bytes32 name

Organization Interface

The Organization Interface contract is found within the agreements bundle.

addEventListener(bytes32)

Adds the msg.sender as listener for the specified event.


addEventListener(bytes32,address)

Adds the msg.sender as listener for the specified event.


addUser(address)

Adds the specified user to this organization


getApproverAtIndex(uint256)

Returns the approver's address at the given index position.


getId()

Returns the identifier of this contract.


getName()

Returns the name of this contract.


getNumberOfApprovers()

Returns the number of registered approvers.


getNumberOfUsers()

returns the number of users associated with this organization


getUserAtIndex(uint256)

Returns the user's address at the given index position.


isActiveUser(address)

Returns whether the given user account is active in this organization


removeEventListener(bytes32)

Removes the msg.sender from the list of listeners for the specified event.


removeEventListener(bytes32,address)

Removes the msg.sender from the list of listeners for the specified event.


removeUser(address)

Removes / Deactivates the user in this organization.


supportsInterface(bytes4)

Interface identification is specified in ERC-165. This function uses less than 30,000 gas.


addEventListener(bytes32)

CALL
addEventListener(bytes32)

Parameters

_event // the event to subscribe to

addEventListener(bytes32,address)

CALL
addEventListener(bytes32,address)

Parameters

_event // the event to subscribe to
_listener // the address of an EventListener

addUser(address)

CALL
addUser(address)

Parameters

_userAccount // the user to add

Return

error code indicating success or failure

getApproverAtIndex(uint256)

CALL
getApproverAtIndex(uint256)

Parameters

_pos // the index position

Return

the address, if the position exists

getId()

CALL
getId()

Return

the bytes32 ID

getName()

CALL
getName()

Return

the bytes32 name

getNumberOfApprovers()

CALL
getNumberOfApprovers()

Return

the number of approvers

getNumberOfUsers()

CALL
getNumberOfUsers()

Return

the number of users

getUserAtIndex(uint256)

CALL
getUserAtIndex(uint256)

Parameters

_pos // the index position

Return

the address or 0x0 if the position does not exist

isActiveUser(address)

CALL
isActiveUser(address)

Parameters

_userAccount // the user account

Return

true if valid, false otherwise

removeEventListener(bytes32)

CALL
removeEventListener(bytes32)

Parameters

_event // the event to unsubscribe from

removeEventListener(bytes32,address)

CALL
removeEventListener(bytes32,address)

Parameters

_event // the event to unsubscribe from
_listener // the address of an EventListener

removeUser(address)

CALL
removeUser(address)

Parameters

_userAccount // the account to deactivate

Return

error code indicating success or failure

supportsInterface(bytes4)

CALL
supportsInterface(bytes4)

Parameters

interfaceID // The interface identifier, as specified in ERC-165

Return

`true` if the contract implements `interfaceID` and
`interfaceID` is not 0xffffffff, `false` otherwise

Owned

The Owned contract is found within the agreements bundle.

transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

OwnerTransferable

The OwnerTransferable contract is found within the agreements bundle.

transferOwnership(address)

Allows to transfer control of the contract to a new owner.


transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

ProcessDefinition Interface

The ProcessDefinition Interface contract is found within the agreements bundle.

addProcessInterfaceImplementation(address,bytes32)

Adds the specified process interface to the list of supported process interfaces of this ProcessDefinition


createActivityDefinition(bytes32,uint8,uint8,uint8,bytes32,bool,bytes32,bytes32,bytes32)

Creates a new activity definition with the specified parameters.


createDataMapping(bytes32,uint8,bytes32,bytes32,bytes32,address)

Create a data mapping for the specified activity and direction.


createTransition(bytes32,bytes32)

Creates a transition between the specified source and target activities.


getActivityAtIndex(uint256)

Returns the ID of the ActivityDefinition at the specified index position of the given Process Definition


getActivityData(bytes32)

Returns information about the activity definition with the given ID.


getActivityInputGateway(bytes32)

Returns the input gateway type of the specified activity.


getActivityOutputGateway(bytes32)

Returns the output gateway type of the specified activity.


getId()

Returns the identifier of this contract.


getImplementedProcessInterfaceAtIndex(uint256)

Returns information about the process interface at the given index


getInDataMappingAtIndex(bytes32,uint256)

Returns information about the IN data mapping of the specified activity at the given index


getModel()

Returns the address of the model which contains this process definition


getName()

Returns the name of this contract.


getNumberOfActivities()

Returns the number of activity definitions in this ProcessDefinition.


getNumberOfImplementedProcessInterfaces()

Returns the number of implemented process interfaces implemented by this ProcessDefinition


getNumberOfInDataMappings(bytes32)

Returns the number of IN data mappings for the specified activity.


getNumberOfOutDataMappings(bytes32)

Returns the number of OUT data mappings for the specified activity.


getOutDataMappingAtIndex(bytes32,uint256)

Returns information about the OUT data mapping of the specified activity at the given index


getStartActivity()

Returns the ID of the start activity of this process definition. If the process is valid, this value must be set.


implementsProcessInterface(address,bytes32)

indicates whether this ProcessDefinition implements the specified interface


isValid()

Returns the current validity state


setActivityInputGateway(bytes32,uint8)

Sets the input gateway of the specified activity to the given type.


setActivityOutputGateway(bytes32,uint8)

Sets the output gateway of the specified activity to the given type.


validate()

Validates the coherence of the process definition in terms of the diagram and its configuration and sets the valid flag.


addProcessInterfaceImplementation(address,bytes32)

CALL
addProcessInterfaceImplementation(address,bytes32)

Parameters

_interfaceId // the ID of the interface
_model // the model defining the interface

Return

an error code signaling success or failure

createActivityDefinition(bytes32,uint8,uint8,uint8,bytes32,bool,bytes32,bytes32,bytes32)

CALL
createActivityDefinition(bytes32,uint8,uint8,uint8,bytes32,bool,bytes32,bytes32,bytes32)

Parameters

_activityType // the BpmModel.ActivityType [TASK|SUBPROCESS]
_application // the application handling the execution of the activity
_assignee // the ID of the participant performing the activity (for USER tasks only)
_behavior // the BpmModel.TaskBehavior [SEND|SENDRECEIVE|RECEIVE]
_id // the activity ID
_multiInstance // whether the activity represents multiple instances
_subProcessDefinitionId // references a subprocess definition (only for SUBPROCESS ActivityType)
_subProcessModelId // references the model containg a subprocess definition (only for SUBPROCESS ActivityType)
_taskType // the BpmModel.TaskType [DUMMY|USER|SERVICE|EVENT]

Return

an error code indicating success or failure

createDataMapping(bytes32,uint8,bytes32,bytes32,bytes32,address)

CALL
createDataMapping(bytes32,uint8,bytes32,bytes32,bytes32,address)

Parameters

_accessPath // the access path offered by the application
_activityId // the ID of the activity in this ProcessDefinition
_dataPath // a data path (key) to use for data lookup on a DataStorage.
_dataStorage // an optional address of a DataStorage as basis for the data path other than the default one
_dataStorageId // an optional key to identify a DataStorage as basis for the data path other than the default one
_direction // the BpmModel.Direction [IN|OUT]

createTransition(bytes32,bytes32)

CALL
createTransition(bytes32,bytes32)

Parameters

_sourceActivity // the start of the transition
_targetActivity // the end of the transition

Return

an error code indicating success or failure

getActivityAtIndex(uint256)

CALL
getActivityAtIndex(uint256)

Parameters

_index // the index position

Return

bytes32 the ActivityDefinition ID, if it exists

getActivityData(bytes32)

CALL
getActivityData(bytes32)

Parameters

_id // the bytes32 id of the activity definition

Return

activityType the BpmModel.ActivityType as uint8taskType the BpmModel.TaskType as uint8taskBehavior the BpmModel.TaskBehavior as uint8assignee the ID of the activity's assignee (for interactive activities)multiInstance whether the activity is a multi-instanceapplication the activity's applicationsubProcessModelId the ID of a process model (for subprocess activities)subProcessDefinitionId the ID of a process definition (for subprocess activities)

getActivityInputGateway(bytes32)

CALL
getActivityInputGateway(bytes32)

Parameters

_activityId // the ID of the activity

Return

the BpmModel.GatewayType

getActivityOutputGateway(bytes32)

CALL
getActivityOutputGateway(bytes32)

Parameters

_activityId // the ID of the activity

Return

the BpmModel.GatewayType

getId()

CALL
getId()

Return

the bytes32 ID

getImplementedProcessInterfaceAtIndex(uint256)

CALL
getImplementedProcessInterfaceAtIndex(uint256)

Parameters

_idx // the index position

Return

modelAddress the interface's modelinterfaceId the interface ID

getInDataMappingAtIndex(bytes32,uint256)

CALL
getInDataMappingAtIndex(bytes32,uint256)

Parameters

_activityId // the ID of the activity in this ProcessDefinition
_idx // the index position

Return

accessPath the access path on the applicationdataPath a data path (key) to use for identifying the data location in a DataStorage contractdataStorageId a key to identify a secondary DataStorage as basis for the data path other than the default onedataStorage an address of a DataStorage as basis for the data path other than the default one

getModel()

CALL
getModel()

Return

the model address

getName()

CALL
getName()

Return

the bytes32 name

getNumberOfActivities()

CALL
getNumberOfActivities()

Return

the number of activity definitions

getNumberOfImplementedProcessInterfaces()

CALL
getNumberOfImplementedProcessInterfaces()

Return

the number of process interfaces

getNumberOfInDataMappings(bytes32)

CALL
getNumberOfInDataMappings(bytes32)

Parameters

_activityId // the ID of the activity in this ProcessDefinition

Return

the number of IN data mappings

getNumberOfOutDataMappings(bytes32)

CALL
getNumberOfOutDataMappings(bytes32)

Parameters

_activityId // the ID of the activity in this ProcessDefinition

Return

the number of OUT data mappings

getOutDataMappingAtIndex(bytes32,uint256)

CALL
getOutDataMappingAtIndex(bytes32,uint256)

Parameters

_activityId // the ID of the activity in this ProcessDefinition
_idx // the index position

Return

accessPath the access path on the applicationdataPath a data path (key) to use for identifying the data location in a DataStorage contractdataStorageId a key to identify a secondary DataStorage as basis for the data path other than the default onedataStorage an address of a DataStorage as basis for the data path other than the default one

getStartActivity()

CALL
getStartActivity()

Return

the ID of the identified start activity

implementsProcessInterface(address,bytes32)

CALL
implementsProcessInterface(address,bytes32)

Parameters

_interfaceId // the ID of the interface
_model // the model defining the interface

Return

true if the interface is supported, false otherwise

isValid()

CALL
isValid()

Return

true if valid, false otherwise

setActivityInputGateway(bytes32,uint8)

CALL
setActivityInputGateway(bytes32,uint8)

Parameters

_activityId // the ID of the activity
_type // the gateway type

setActivityOutputGateway(bytes32,uint8)

CALL
setActivityOutputGateway(bytes32,uint8)

Parameters

_activityId // the ID of the activity
_type // the gateway type

validate()

CALL
validate()

Return

valid - boolean indicating validityerrorMessage - empty string if valid, otherwise contains a hint what failed

ProcessInstance Interface

The ProcessInstance Interface contract is found within the agreements bundle.

abort(address)

Aborts this ProcessInstance and halts any ongoing activities. After the abort the ProcessInstance cannot be resurrected.


addProcessStateChangeListener(address)

Adds a ProcessStateChangeListener to listeners collection


completeActivity(bytes32,address)

Completes the specified activity


execute(address)

Initiates execution of this ProcessInstance consisting of attempting to activate and process any activities and advance the state of the runtime graph.


getActivityInstanceAtIndex(uint256)

Returns the globally unique ID of the activity instance at the specified index in the ProcessInstance.


getActivityInstanceData(bytes32)

Returns information about the activity instance with the specified ID


getDataIdAtIndex(uint256)

Returns the data id at the given index


getDataType(bytes32)

Returns the data type of the Data object identified by the given id


getDataValueAsAddress(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsAddressArray(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBool(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes16Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes1Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes20Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes24Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes28Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes2Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes32Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes3Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes4Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsBytes8Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsInt(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsInt128Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsInt16Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsInt256Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsInt32Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsInt64Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsInt8Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsString(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsUint(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsUint128Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsUint16Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsUint256Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsUint32Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsUint64Array(bytes32)

Gets the value of the Data object identified by the given id


getDataValueAsUint8Array(bytes32)

Gets the value of the Data object identified by the given id


getNumberOfActivityInstances()

Returns the number of activity instances currently contained in this ProcessInstance. Note that this number is subject to change as long as the process isntance is not completed.


getNumberOfArrayEntries(bytes32,bool)

Returns the number of non-default entries in the specified array-type DataStorage field


getProcessDefinition()

Returns the process definition on which this instance is based.


getSize()

Returns the size of the DataMap


getStartedBy()

Returns the account that started this process instance


getState()

Returns the state of this process instance


initRuntime()

Initiates and populates the runtime graph that will handle the state of this ProcessInstance


notifyProcessStateChange()

Notifies listeners about a process state change


removeData(bytes32)

Removes the Data identified by the id from the DataMap


setDataValueAsAddress(bytes32,address)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsAddressArray(bytes32,address[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBool(bytes32,bool)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes(bytes32,bytes32,uint8)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes16Array(bytes32,bytes16[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes1Array(bytes32,bytes1[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes20Array(bytes32,bytes20[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes24Array(bytes32,bytes24[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes28Array(bytes32,bytes28[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes2Array(bytes32,bytes2[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes32(bytes32,bytes32)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes32Array(bytes32,bytes32[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes3Array(bytes32,bytes3[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes4Array(bytes32,bytes4[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsBytes8Array(bytes32,bytes8[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsInt(bytes32,int256,uint8)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsInt128Array(bytes32,int128[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsInt16Array(bytes32,int16[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsInt256(bytes32,int256)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsInt256Array(bytes32,int256[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsInt32Array(bytes32,int32[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsInt64Array(bytes32,int64[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsInt8Array(bytes32,int8[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsString(bytes32,string)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUint(bytes32,uint256,uint8)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUint128Array(bytes32,uint128[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUint16Array(bytes32,uint16[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUint256(bytes32,uint256)

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUint256Array(bytes32,uint256[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUint32Array(bytes32,uint32[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUint64Array(bytes32,uint64[100])

Creates a Data object with the given value and inserts it into the DataMap


setDataValueAsUint8Array(bytes32,uint8[100])

Creates a Data object with the given value and inserts it into the DataMap


transferOwnership(address)

Allows to transfer control of the contract to a new owner.


abort(address)

CALL
abort(address)

Parameters

_service // the BpmService to emit update events for ActivityInstances

addProcessStateChangeListener(address)

CALL
addProcessStateChangeListener(address)

Parameters

_listener // the ProcessStateChangeListener to add

completeActivity(bytes32,address)

CALL
completeActivity(bytes32,address)

Parameters

_activityInstanceId // the activity instance
_service // the BpmService managing this ProcessInstance (required for changes to this ProcessInstance after the activity completes)

Return

an error code indicating success or failure

execute(address)

CALL
execute(address)

Parameters

_service // the BpmService managing this ProcessInstance (required for changes to this ProcessInstance and access to the BpmServiceDb)

Return

error code indicating success or failure

getActivityInstanceAtIndex(uint256)

CALL
getActivityInstanceAtIndex(uint256)

Parameters

_idx // the index position

Return

the bytes32 ID

getActivityInstanceData(bytes32)

CALL
getActivityInstanceData(bytes32)

Parameters

_id // the global ID of the activity instance

Return

activityId - the ID of the activity as defined by the process definitioncreated - the creation timestampcompleted - the completion timestampperformer - the account who is performing the activity (for interactive activities only)completedBy - the account who completed the activity (for interactive activities only) state - the uint8 representation of the BpmRuntime.ActivityInstanceState of this activity instance

getDataIdAtIndex(uint256)

CALL
getDataIdAtIndex(uint256)

Parameters

_index // the index of the data

Return

error uint error code id bytes32 id of the data

getDataType(bytes32)

CALL
getDataType(bytes32)

Parameters

_id // the id of the data

Return

uint8 the DataType

getDataValueAsAddress(bytes32)

CALL
getDataValueAsAddress(bytes32)

Parameters

_id // the id of the data

Return

address the value of the data

getDataValueAsAddressArray(bytes32)

CALL
getDataValueAsAddressArray(bytes32)

Parameters

_id // the id of the data

Return

address[100] the value of the data

getDataValueAsBool(bytes32)

CALL
getDataValueAsBool(bytes32)

Parameters

_id // the id of the data

Return

bool the bool value of the data

getDataValueAsBytes(bytes32)

CALL
getDataValueAsBytes(bytes32)

Parameters

_id // the id of the data

Return

bytes32 the value of the data

getDataValueAsBytes16Array(bytes32)

CALL
getDataValueAsBytes16Array(bytes32)

Parameters

_id // the id of the data

Return

bytes16[100] the value of the data

getDataValueAsBytes1Array(bytes32)

CALL
getDataValueAsBytes1Array(bytes32)

Parameters

_id // the id of the data

Return

bytes1[100] the value of the data

getDataValueAsBytes20Array(bytes32)

CALL
getDataValueAsBytes20Array(bytes32)

Parameters

_id // the id of the data

Return

bytes20[100] the value of the data

getDataValueAsBytes24Array(bytes32)

CALL
getDataValueAsBytes24Array(bytes32)

Parameters

_id // the id of the data

Return

bytes24[100] the value of the data

getDataValueAsBytes28Array(bytes32)

CALL
getDataValueAsBytes28Array(bytes32)

Parameters

_id // the id of the data

Return

bytes28[100] the value of the data

getDataValueAsBytes2Array(bytes32)

CALL
getDataValueAsBytes2Array(bytes32)

Parameters

_id // the id of the data

Return

bytes2[100] the value of the data

getDataValueAsBytes32Array(bytes32)

CALL
getDataValueAsBytes32Array(bytes32)

Parameters

_id // the id of the data

Return

bytes32[100] the value of the data

getDataValueAsBytes3Array(bytes32)

CALL
getDataValueAsBytes3Array(bytes32)

Parameters

_id // the id of the data

Return

bytes3[100] the value of the data

getDataValueAsBytes4Array(bytes32)

CALL
getDataValueAsBytes4Array(bytes32)

Parameters

_id // the id of the data

Return

bytes4[100] the value of the data

getDataValueAsBytes8Array(bytes32)

CALL
getDataValueAsBytes8Array(bytes32)

Parameters

_id // the id of the data

Return

bytes8[100] the value of the data

getDataValueAsInt(bytes32)

CALL
getDataValueAsInt(bytes32)

Parameters

_id // the id of the data

Return

int the value of the data

getDataValueAsInt128Array(bytes32)

CALL
getDataValueAsInt128Array(bytes32)

Parameters

_id // the id of the data

Return

int128[100] the value of the data

getDataValueAsInt16Array(bytes32)

CALL
getDataValueAsInt16Array(bytes32)

Parameters

_id // the id of the data

Return

int16[100] the value of the data

getDataValueAsInt256Array(bytes32)

CALL
getDataValueAsInt256Array(bytes32)

Parameters

_id // the id of the data

Return

int256[100] the value of the data

getDataValueAsInt32Array(bytes32)

CALL
getDataValueAsInt32Array(bytes32)

Parameters

_id // the id of the data

Return

int32[100] the value of the data

getDataValueAsInt64Array(bytes32)

CALL
getDataValueAsInt64Array(bytes32)

Parameters

_id // the id of the data

Return

int64[100] the value of the data

getDataValueAsInt8Array(bytes32)

CALL
getDataValueAsInt8Array(bytes32)

Parameters

_id // the id of the data

Return

int8[100] the value of the data

getDataValueAsString(bytes32)

CALL
getDataValueAsString(bytes32)

Parameters

_id // the id of the data

Return

string the value of the data

getDataValueAsUint(bytes32)

CALL
getDataValueAsUint(bytes32)

Parameters

_id // the id of the data

Return

uint the value of the data

getDataValueAsUint128Array(bytes32)

CALL
getDataValueAsUint128Array(bytes32)

Parameters

_id // the id of the data

Return

uint128[100] the value of the data

getDataValueAsUint16Array(bytes32)

CALL
getDataValueAsUint16Array(bytes32)

Parameters

_id // the id of the data

Return

uint16[100] the value of the data

getDataValueAsUint256Array(bytes32)

CALL
getDataValueAsUint256Array(bytes32)

Parameters

_id // the id of the data

Return

uint256[100] the value of the data

getDataValueAsUint32Array(bytes32)

CALL
getDataValueAsUint32Array(bytes32)

Parameters

_id // the id of the data

Return

uint32[100] the value of the data

getDataValueAsUint64Array(bytes32)

CALL
getDataValueAsUint64Array(bytes32)

Parameters

_id // the id of the data

Return

uint64[100] the value of the data

getDataValueAsUint8Array(bytes32)

CALL
getDataValueAsUint8Array(bytes32)

Parameters

_id // the id of the data

Return

uint8[100] the value of the data

getNumberOfActivityInstances()

CALL
getNumberOfActivityInstances()

Return

the number of activity instances

getNumberOfArrayEntries(bytes32,bool)

CALL
getNumberOfArrayEntries(bytes32,bool)

Parameters

_fullscan // if false the function will return as soon as a default value (0 for int/uint, 0x0 for address, "" for bytes32, etc.) is encountered, if true the array will be scanned to its end
_key // the key for the array-type value

Return

the number of non-default entries in the array

getProcessDefinition()

CALL
getProcessDefinition()

Return

the address of a ProcessDefinition

getSize()

CALL
getSize()

Return

uint the size

getStartedBy()

CALL
getStartedBy()

Return

the address registered when creating the process instance

getState()

CALL
getState()

Return

the uint representation of the BpmRuntime.ProcessInstanceState

initRuntime()

CALL
initRuntime()

Return

error code indicating success or failure

notifyProcessStateChange()

CALL
notifyProcessStateChange()

removeData(bytes32)

CALL
removeData(bytes32)

Parameters

_id // the id of the data

Return

uint error code

setDataValueAsAddress(bytes32,address)

CALL
setDataValueAsAddress(bytes32,address)

Parameters

_id // the id of the data
_value // the address value of the data

setDataValueAsAddressArray(bytes32,address[100])

CALL
setDataValueAsAddressArray(bytes32,address[100])

Parameters

_id // the id of the data
_value // the address[100] value of the data

setDataValueAsBool(bytes32,bool)

CALL
setDataValueAsBool(bytes32,bool)

Parameters

_id // the id of the data
_value // the bool value of the data

setDataValueAsBytes(bytes32,bytes32,uint8)

CALL
setDataValueAsBytes(bytes32,bytes32,uint8)

Parameters

_dataType // the uint8 data type of the value denoting the bytes size
_id // the id of the data
_value // the bytes16 value of the data

setDataValueAsBytes16Array(bytes32,bytes16[100])

CALL
setDataValueAsBytes16Array(bytes32,bytes16[100])

Parameters

_id // the id of the data
_value // the bytes16[100] value of the data

setDataValueAsBytes1Array(bytes32,bytes1[100])

CALL
setDataValueAsBytes1Array(bytes32,bytes1[100])

Parameters

_id // the id of the data
_value // the bytes1[100] value of the data

setDataValueAsBytes20Array(bytes32,bytes20[100])

CALL
setDataValueAsBytes20Array(bytes32,bytes20[100])

Parameters

_id // the id of the data
_value // the bytes20[100] value of the data

setDataValueAsBytes24Array(bytes32,bytes24[100])

CALL
setDataValueAsBytes24Array(bytes32,bytes24[100])

Parameters

_id // the id of the data
_value // the bytes24[100] value of the data

setDataValueAsBytes28Array(bytes32,bytes28[100])

CALL
setDataValueAsBytes28Array(bytes32,bytes28[100])

Parameters

_id // the id of the data
_value // the bytes28[100] value of the data

setDataValueAsBytes2Array(bytes32,bytes2[100])

CALL
setDataValueAsBytes2Array(bytes32,bytes2[100])

Parameters

_id // the id of the data
_value // the bytes2[100] value of the data

setDataValueAsBytes32(bytes32,bytes32)

CALL
setDataValueAsBytes32(bytes32,bytes32)

Parameters

_id // the id of the data
_value // the bytes32 value of the data

setDataValueAsBytes32Array(bytes32,bytes32[100])

CALL
setDataValueAsBytes32Array(bytes32,bytes32[100])

Parameters

_id // the id of the data
_value // the bytes32[100] value of the data

setDataValueAsBytes3Array(bytes32,bytes3[100])

CALL
setDataValueAsBytes3Array(bytes32,bytes3[100])

Parameters

_id // the id of the data
_value // the bytes3[100] value of the data

setDataValueAsBytes4Array(bytes32,bytes4[100])

CALL
setDataValueAsBytes4Array(bytes32,bytes4[100])

Parameters

_id // the id of the data
_value // the bytes4[100] value of the data

setDataValueAsBytes8Array(bytes32,bytes8[100])

CALL
setDataValueAsBytes8Array(bytes32,bytes8[100])

Parameters

_id // the id of the data
_value // the bytes8[100] value of the data

setDataValueAsInt(bytes32,int256,uint8)

CALL
setDataValueAsInt(bytes32,int256,uint8)

Parameters

_dataType // the uint8 DataType denoting the size
_id // the id of the data
_value // the int value of the data

setDataValueAsInt128Array(bytes32,int128[100])

CALL
setDataValueAsInt128Array(bytes32,int128[100])

Parameters

_id // the id of the data
_value // the int128[100] value of the data

setDataValueAsInt16Array(bytes32,int16[100])

CALL
setDataValueAsInt16Array(bytes32,int16[100])

Parameters

_id // the id of the data
_value // the int16[100] value of the data

setDataValueAsInt256(bytes32,int256)

CALL
setDataValueAsInt256(bytes32,int256)

Parameters

_id // the id of the data
_value // the int value of the data

setDataValueAsInt256Array(bytes32,int256[100])

CALL
setDataValueAsInt256Array(bytes32,int256[100])

Parameters

_id // the id of the data
_value // the int256[100] value of the data

setDataValueAsInt32Array(bytes32,int32[100])

CALL
setDataValueAsInt32Array(bytes32,int32[100])

Parameters

_id // the id of the data
_value // the int32[100] value of the data

setDataValueAsInt64Array(bytes32,int64[100])

CALL
setDataValueAsInt64Array(bytes32,int64[100])

Parameters

_id // the id of the data
_value // the int64[100] value of the data

setDataValueAsInt8Array(bytes32,int8[100])

CALL
setDataValueAsInt8Array(bytes32,int8[100])

Parameters

_id // the id of the data
_value // the int8[100] value of the data

setDataValueAsString(bytes32,string)

CALL
setDataValueAsString(bytes32,string)

Parameters

_id // the id of the data
_value // the string value of the data

setDataValueAsUint(bytes32,uint256,uint8)

CALL
setDataValueAsUint(bytes32,uint256,uint8)

Parameters

_dataType // the uint8 DataType denoting the size
_id // the id of the data
_value // the uint value of the data

setDataValueAsUint128Array(bytes32,uint128[100])

CALL
setDataValueAsUint128Array(bytes32,uint128[100])

Parameters

_id // the id of the data
_value // the uint128[100] value of the data

setDataValueAsUint16Array(bytes32,uint16[100])

CALL
setDataValueAsUint16Array(bytes32,uint16[100])

Parameters

_id // the id of the data
_value // the uint16[100] value of the data

setDataValueAsUint256(bytes32,uint256)

CALL
setDataValueAsUint256(bytes32,uint256)

Parameters

_id // the id of the data
_value // the uint value of the data

setDataValueAsUint256Array(bytes32,uint256[100])

CALL
setDataValueAsUint256Array(bytes32,uint256[100])

Parameters

_id // the id of the data
_value // the uint256[100] value of the data

setDataValueAsUint32Array(bytes32,uint32[100])

CALL
setDataValueAsUint32Array(bytes32,uint32[100])

Parameters

_id // the id of the data
_value // the uint32[100] value of the data

setDataValueAsUint64Array(bytes32,uint64[100])

CALL
setDataValueAsUint64Array(bytes32,uint64[100])

Parameters

_id // the id of the data
_value // the uint64[100] value of the data

setDataValueAsUint8Array(bytes32,uint8[100])

CALL
setDataValueAsUint8Array(bytes32,uint8[100])

Parameters

_id // the id of the data
_value // the uint8[100] value of the data

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

ProcessModel Interface

The ProcessModel Interface contract is found within the agreements bundle.

addEventListener(bytes32)

Adds the msg.sender as listener for the specified event.


addEventListener(bytes32,address)

Adds the msg.sender as listener for the specified event.


addParticipant(bytes32,address,bytes32,bytes32,address)

Adds a participant with the specified ID and attributes to this ProcessModel


addProcessInterface(bytes32)

Adds a process interface declaration to this ProcessModel that process definitions can refer to


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


createProcessDefinition(bytes32,bytes32)

Creates a new process definition with the given parameters in this ProcessModel


fireActivityDefinitionUpdateEvent(bytes32)

To be called by a registered process definition to signal an update.


fireProcessDefinitionUpdateEvent()

To be called by a registered process definition to signal an update.


getDiagram()

Returns the HOARD file information of the model's diagram


getId()

Returns the ID of this contract.


getName()

Returns the name of this contract.


getNumberOfParticipants()

Returns the number of participants defined in this ProcessModel


getNumberOfProcessDefinitions()

Returns the number of process definitions in this ProcessModel


getNumberOfProcessInterfaces()

Returns the number of process interfaces declared in this ProcessModel


getParticipantAtIndex(uint256)

Returns the ID of the participant at the given index


getParticipantData(bytes32)

Returns information about the participant with the given ID


getProcessDefinition(bytes32)

Returns the address of the ProcessDefinition with the specified ID


getProcessDefinitionAtIndex(uint256)

Returns the address for the ProcessDefinition at the given index


getProcessDefinitionData(address)

Returns information about the ProcessDefinition at the given address


getVersion()

Returns the version as 3-digit array


hasParticipant(bytes32)

Returns whether a participant with the specified ID exists in this ProcessModel


hasProcessInterface(bytes32)

Returns whether a process interface with the specified ID exists in this ProcessModel


major()

returns the major version number


minor()

returns the minor version number


patch()

returns the patch version number


removeEventListener(bytes32)

Removes the msg.sender from the list of listeners for the specified event.


removeEventListener(bytes32,address)

Removes the msg.sender from the list of listeners for the specified event.


addEventListener(bytes32)

CALL
addEventListener(bytes32)

Parameters

_event // the event to subscribe to

addEventListener(bytes32,address)

CALL
addEventListener(bytes32,address)

Parameters

_event // the event to subscribe to
_listener // the address of an EventListener

addParticipant(bytes32,address,bytes32,bytes32,address)

CALL
addParticipant(bytes32,address,bytes32,bytes32,address)

Parameters

_account // the address of a participant account
_dataPath // the field key under which to locate the conditional participant
_dataStorage // the address of a DataStorage contract to find a conditional participant
_dataStorageId // a field key in a known DataStorage containing an address of another DataStorage contract
_id // the participant ID

Return

an error code indicating success or failure

addProcessInterface(bytes32)

CALL
addProcessInterface(bytes32)

Parameters

_interfaceId // the ID of the interface

Return

an error code indicating success of failure

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

createProcessDefinition(bytes32,bytes32)

CALL
createProcessDefinition(bytes32,bytes32)

Parameters

_id // the process ID
_name // the process name

Return

an error code indicating success or failurethe address of the new ProcessDefinition when successful

fireActivityDefinitionUpdateEvent(bytes32)

CALL
fireActivityDefinitionUpdateEvent(bytes32)

fireProcessDefinitionUpdateEvent()

CALL
fireProcessDefinitionUpdateEvent()

getDiagram()

CALL
getDiagram()

Return

location - the HOARD addresssecret - the HOARD secret

getId()

CALL
getId()

Return

the bytes32 ID

getName()

CALL
getName()

Return

the bytes32 name

getNumberOfParticipants()

CALL
getNumberOfParticipants()

Return

the number of participants

getNumberOfProcessDefinitions()

CALL
getNumberOfProcessDefinitions()

Return

the number of process definitions

getNumberOfProcessInterfaces()

CALL
getNumberOfProcessInterfaces()

Return

the number of process interfaces

getParticipantAtIndex(uint256)

CALL
getParticipantAtIndex(uint256)

Parameters

_idx // the index position

Return

the participant ID, if it exists

getParticipantData(bytes32)

CALL
getParticipantData(bytes32)

Parameters

_id // the participant ID

Return

location the applications contract address, only available for a service participantmethod the function signature of the participant, only available for a service participantwebForm the form identifier (formHash) of the web participant, only available for a web participant

getProcessDefinition(bytes32)

CALL
getProcessDefinition(bytes32)

Parameters

_id // the process ID

Return

the address of the process definition, if it exists

getProcessDefinitionAtIndex(uint256)

CALL
getProcessDefinitionAtIndex(uint256)

Parameters

_idx // the index position

Return

the address of the ProcessDefinition, if it exists

getProcessDefinitionData(address)

CALL
getProcessDefinitionData(address)

Parameters

_processDefinition // the address

Return

id the process IDname the process nameinterfaceId the first process interface the process definition supports

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

hasParticipant(bytes32)

CALL
hasParticipant(bytes32)

Parameters

_id // the participant ID

Return

true if it exists, false otherwise

hasProcessInterface(bytes32)

CALL
hasProcessInterface(bytes32)

Parameters

_interfaceId // the interface ID

Return

true if it exists, false otherwise

major()

CALL
major()

minor()

CALL
minor()

patch()

CALL
patch()

removeEventListener(bytes32)

CALL
removeEventListener(bytes32)

Parameters

_event // the event to unsubscribe from

removeEventListener(bytes32,address)

CALL
removeEventListener(bytes32,address)

Parameters

_event // the event to unsubscribe from
_listener // the address of an EventListener

ProcessModelRepository Interface

The ProcessModelRepository Interface contract is found within the agreements bundle.

activateModel(address)

Activates the given ProcessModel and deactivates any previously activated model version of the same ID


addModel(address)

Adds the given ProcessModel to this repository.


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


createProcessModel(bytes32,bytes32,uint8[3],bytes32,bytes32)

Factory function to instantiate a ProcessModel.


eventFired(bytes32,address)

Invoked by an EventEmitter for a named event without any additional data.


eventFired(bytes32,address,address)

Invoked by an EventEmitter for a named event with an additional address payload.


eventFired(bytes32,address,bytes32)

Invoked by an EventEmitter for a named event with an additional bytes32 payload.


eventFired(bytes32,address,string)

Invoked by an EventEmitter for a named event with an additional string payload.


eventFired(bytes32,address,uint256)

Invoked by an EventEmitter for a named event with an additional uint payload.


getActivityAtIndex(address,address,uint256)

Returns the ID of the ActivityDefinition at the specified index position of the given Process Definition


getActivityData(address,address,bytes32)

Returns information about the activity definition with the given ID.


getModel(bytes32)

Returns the address of the activated model with the given ID, if it exists and is activated


getModelAtIndex(uint256)

Returns the address of the ProcessModel at the given index position, if it exists


getModelByVersion(bytes32,uint8[3])

Returns the address of the model with the given ID and version


getModelData(address)

Returns information about the ProcessModel at the given address


getNumberOfActivities(address,address)

Returns the number of Activity Definitions in the specified Process


getNumberOfModels()

Returns the number of models in this repository.


getNumberOfProcessDefinitions(address)

Returns the number of process definitions in the specified model


getProcessDefinition(bytes32,bytes32)

Returns the process definition address when the model ID and process definition ID are provided


getProcessDefinitionAtIndex(address,uint256)

Returns the address of the ProcessDefinition at the specified index position of the given model


getProcessDefinitionData(address,address)

Returns data about the specified ProcessDefinition in the specified ProcessModel


getVersion()

Returns the version as 3-digit array


isDestroyOnUpgrade()

To be implemented to signal whether this contract should be destroyed after a successful upgrade.


major()

returns the major version number


migrateFrom(address)

Implements the migration of state from the specified predecessor to this contract. This method can be used to 'read' the state of the other contract which is probably easier to achieve.


migrateTo(address)

Implements the migration of state this contract to the specified contract. This method can be used to 'write' the state from this contract to the success. It's probably a little less useful since it requires the successor contract to have appropriate functions to set state.


minor()

returns the minor version number


patch()

returns the patch version number


upgrade(address)

Checks the version and invokes migrateTo and migrateTo in order to transfer state (push then pull)


activateModel(address)

CALL
activateModel(address)

Parameters

_model // the ProcessModel to activate

Return

an error indicating success or failure

addModel(address)

CALL
addModel(address)

Parameters

_model // the ProcessModel to add

Return

an error indicating success or failure

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

createProcessModel(bytes32,bytes32,uint8[3],bytes32,bytes32)

CALL
createProcessModel(bytes32,bytes32,uint8[3],bytes32,bytes32)

Parameters

_hoardAddress // the HOARD address of the model file
_hoardSecret // the HOARD secret of the model file
_id // the model ID
_name // the model name
_version // the model version

eventFired(bytes32,address)

CALL
eventFired(bytes32,address)

Parameters

_event // the event name
_source // the source of the event

eventFired(bytes32,address,address)

CALL
eventFired(bytes32,address,address)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

eventFired(bytes32,address,bytes32)

CALL
eventFired(bytes32,address,bytes32)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

eventFired(bytes32,address,string)

CALL
eventFired(bytes32,address,string)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

eventFired(bytes32,address,uint256)

CALL
eventFired(bytes32,address,uint256)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

getActivityAtIndex(address,address,uint256)

CALL
getActivityAtIndex(address,address,uint256)

Parameters

_index // the index position
_model // the model address
_processDefinition // a Process Definition address

Return

bytes32 the ActivityDefinition ID, if it exists

getActivityData(address,address,bytes32)

CALL
getActivityData(address,address,bytes32)

Parameters

_id // the bytes32 id of the activity definition
_model // the model address
_processDefinition // a Process Definition address

Return

activityType the BpmModel.ActivityType as uint8taskType the BpmModel.TaskType as uint8taskBehavior the BpmModel.TaskBehavior as uint8assignee the ID of the activity's assignee (for interactive activities)multiInstance whether the activity is a multi-instanceapplication the activity's applicationsubProcessModelId the ID of a process model (for subprocess activities)subProcessDefinitionId the ID of a process definition (for subprocess activities)

getModel(bytes32)

CALL
getModel(bytes32)

Parameters

_id // the model ID

Return

the model address, if found

getModelAtIndex(uint256)

CALL
getModelAtIndex(uint256)

Parameters

_idx // the index position

Return

the model address

getModelByVersion(bytes32,uint8[3])

CALL
getModelByVersion(bytes32,uint8[3])

Parameters

_id // the model ID
_version // the model version

Return

the model address, if found

getModelData(address)

CALL
getModelData(address)

Parameters

_model // the ProcessModel address

Return

id - the model IDname - the model nameversionMajor - the model's major versionversionMinor - the model's minor versionversionPatch - the model's patch versionactive - whether the model is activediagramAddress - the HOARD address of the model diagram filediagramSecret - the HOARD secret of the model diagram file

getNumberOfActivities(address,address)

CALL
getNumberOfActivities(address,address)

Parameters

_model // the model address
_processDefinition // a Process Definition address

Return

uint - the number of Activity Definitions

getNumberOfModels()

CALL
getNumberOfModels()

Return

size - the number of models

getNumberOfProcessDefinitions(address)

CALL
getNumberOfProcessDefinitions(address)

Parameters

_model // a ProcessModel address

Return

size - the number of process definitions

getProcessDefinition(bytes32,bytes32)

CALL
getProcessDefinition(bytes32,bytes32)

Parameters

_modelId // - the ProcessModel ID

Return

_processId - the ProcessDefinition IDaddress - the ProcessDefinition address

getProcessDefinitionAtIndex(address,uint256)

CALL
getProcessDefinitionAtIndex(address,uint256)

Parameters

_idx // the index position
_model // a ProcessModel address

Return

the ProcessDefinition address, if it exists

getProcessDefinitionData(address,address)

CALL
getProcessDefinitionData(address,address)

Parameters

_model // a ProcessModel address
_processDefinition // a ProcessDefinition address

Return

id - the ProcessDefinition IDname - the ProcessDefinition nameinterfaceId - the ProcessDefinition's first interface ID

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

isDestroyOnUpgrade()

CALL
isDestroyOnUpgrade()

major()

CALL
major()

migrateFrom(address)

CALL
migrateFrom(address)

Parameters

predecessor // the address from which the state is migrated

Return

result the result of the operation, e.g. a constant from commons-base/BaseErrors.sol

migrateTo(address)

CALL
migrateTo(address)

Parameters

successor // the address to which the state is migrated

Return

result the result of the operation, e.g. a constant from commons-base/BaseErrors.sol

minor()

CALL
minor()

patch()

CALL
patch()

upgrade(address)

CALL
upgrade(address)

ProcessStateChangeEmitter

The ProcessStateChangeEmitter contract is found within the agreements bundle.

addProcessStateChangeListener(address)

Adds a ProcessStateChangeListener to listeners collection


notifyProcessStateChange()

Notifies listeners about a process state change


addProcessStateChangeListener(address)

CALL
addProcessStateChangeListener(address)

Parameters

_listener // the ProcessStateChangeListener to add

notifyProcessStateChange()

CALL
notifyProcessStateChange()

ProcessStateChangeListener

The ProcessStateChangeListener contract is found within the agreements bundle.

processStateChanged(address)

Invoked by a ProcessStateChangeEventEmitter to notify of process state change


processStateChanged(address)

CALL
processStateChanged(address)

Parameters

_pi // the process instance whose state changed

Signable

The Signable contract is found within the agreements bundle.

sign()

Applies a signature. The implementing contract has the msg.sender, or the tx.origin at its disposal to use as signature. This function is therefore intended to be called directly from the account that is attempting to sign.


sign()

CALL
sign()

Return

a return code indicating success or type of failure

SystemOwned

The SystemOwned contract is found within the agreements bundle.

transferSystemOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


transferSystemOwnership(address)

CALL
transferSystemOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

SystemOwnerTransferable

The SystemOwnerTransferable contract is found within the agreements bundle.

transferSystemOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


transferSystemOwnership(address)

CALL
transferSystemOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

TypeUtils Library Interface

The TypeUtils Library Interface contract is found within the agreements bundle.

contentLength(bytes32)

Returns the length of the alphanumeric content of the bytes32, i.e. the number of non-empty bytes


isEmpty(bytes32)

Checks if the given bytes32 is empty.


toBytes32(string)

Converts the given string to bytes32. If the string is longer than 32 byte-sized characters (depends on encoding and character-set), it will be truncated.


toBytes32(uint256)

Converts an unsigned integer to its string representation.


contentLength(bytes32)

CALL
contentLength(bytes32)

Parameters

self // bytes32

Return

the length

isEmpty(bytes32)

CALL
isEmpty(bytes32)

Parameters

_value // the value to check

Return

true if empty, false otherwise

toBytes32(string)

CALL
toBytes32(string)

Parameters

s // a string

Return

the bytes32 representation

toBytes32(uint256)

CALL
toBytes32(uint256)

Parameters

v // The number to be converted.

Return

the bytes32 representation

Upgradeable

The Upgradeable contract is found within the agreements bundle.

compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


getVersion()

Returns the version as 3-digit array


isDestroyOnUpgrade()

To be implemented to signal whether this contract should be destroyed after a successful upgrade.


major()

returns the major version number


migrateFrom(address)

Implements the migration of state from the specified predecessor to this contract. This method can be used to 'read' the state of the other contract which is probably easier to achieve.


migrateTo(address)

Implements the migration of state this contract to the specified contract. This method can be used to 'write' the state from this contract to the success. It's probably a little less useful since it requires the successor contract to have appropriate functions to set state.


minor()

returns the minor version number


patch()

returns the patch version number


upgrade(address)

Checks the version and invokes migrateTo and migrateTo in order to transfer state (push then pull)


compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

isDestroyOnUpgrade()

CALL
isDestroyOnUpgrade()

major()

CALL
major()

migrateFrom(address)

CALL
migrateFrom(address)

Parameters

predecessor // the address from which the state is migrated

Return

result the result of the operation, e.g. a constant from commons-base/BaseErrors.sol

migrateTo(address)

CALL
migrateTo(address)

Parameters

successor // the address to which the state is migrated

Return

result the result of the operation, e.g. a constant from commons-base/BaseErrors.sol

minor()

CALL
minor()

patch()

CALL
patch()

upgrade(address)

CALL
upgrade(address)

UserAccount Interface

The UserAccount Interface contract is found within the agreements bundle.

getId()

Returns the identifier of this contract.


getOrganization()

Returns this user account's organization, if it is associated with one.


getOwner()

Returns this account's owner


setOrganization(address)

Sets the organization of this user account


getId()

CALL
getId()

Return

the bytes32 ID

getOrganization()

CALL
getOrganization()

Return

the organization's address or 0x0

getOwner()

CALL
getOwner()

Return

the owner address

setOrganization(address)

CALL
setOrganization(address)

Parameters

_organization // the organization's address with which to associate this user account

Return

error code indicating success or failure

Versioned

The Versioned contract is found within the agreements bundle.

compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


getVersion()

Returns the version as 3-digit array


major()

returns the major version number


minor()

returns the minor version number


patch()

returns the patch version number


compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

major()

CALL
major()

minor()

CALL
minor()

patch()

CALL
patch()

WorkflowProxy

The WorkflowProxy contract is found within the agreements bundle.

completeActivity(bytes32,address)

Completes the specified activity using the given BpmService to locate the relevant ProcessInstance. This sets the msg.sender of the call to the address of this proxy contract, so that it can be used to authorize the task completion.


completeActivity(bytes32,address)

CALL
completeActivity(bytes32,address)

Parameters

_activityInstanceId // the task ID
_service // the BpmService required for lookup and access to the BpmServiceDb

Return

error code if the completion failed

WorkflowUserAccount

The WorkflowUserAccount contract is found within the agreements bundle.

completeActivity(bytes32,address)

Completes the specified activity using the given BpmService to locate the relevant ProcessInstance. This sets the msg.sender of the call to the address of this proxy contract, so that it can be used to authorize the task completion.


getId()

Returns this account's ID


getOrganization()

Returns this user account's organization, if it is associated with one.


getOwner()

Returns this account's owner


setOrganization(address)

Sets the organization of this user account


transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


completeActivity(bytes32,address)

CALL
completeActivity(bytes32,address)

Parameters

_activityInstanceId // the task ID
_service // the BpmService required for lookup and access to the BpmServiceDb

Return

error code if the completion failed

getId()

CALL
getId()

getOrganization()

CALL
getOrganization()

Return

the organization's address or 0x0

getOwner()

CALL
getOwner()

setOrganization(address)

CALL
setOrganization(address)

Parameters

_organization // the organization's address with which to associate this user account

Return

BaseErrors.NO_ERROR() or BaseErrors.OVERWRITE_NOT_ALLOWED() if the organization is already set

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

bpm-model

DefaultProcessDefinition

The DefaultProcessDefinition contract is found within the bpm-model bundle.

addProcessInterfaceImplementation(address,bytes32)

Adds the specified process interface to the list of supported process interfaces of this ProcessDefinition The model address is allowed to be empty in which case this process definition's model will be used.


createActivityDefinition(bytes32,uint8,uint8,uint8,bytes32,bool,bytes32,bytes32,bytes32)

Creates a new activity definition with the specified parameters.


createDataMapping(bytes32,uint8,bytes32,bytes32,bytes32,address)

Create a data mapping for the specified activity and direction.


createTransition(bytes32,bytes32)

Creates a transition between the specified source and target activities.


getActivityAtIndex(uint256)

Returns the ID of the ActivityDefinition at the specified index position of the given Process Definition


getActivityData(bytes32)

Returns information about the activity definition with the given ID.


getActivityInputGateway(bytes32)

Returns the input gateway type of the specified activity.


getActivityOutputGateway(bytes32)

Returns the output gateway type of the specified activity.


getId()

Returns the ID of this contract.


getImplementedProcessInterfaceAtIndex(uint256)

Returns information about the process interface at the given index


getInDataMappingAtIndex(bytes32,uint256)

Returns information about the IN data mapping of the specified activity at the given index


getModel()

Returns the address of the model which contains this process definition


getName()

Returns the name of this contract.


getNumberOfActivities()

Returns the number of activity definitions in this ProcessDefinition.


getNumberOfImplementedProcessInterfaces()

Returns the number of implemented process interfaces implemented by this ProcessDefinition


getNumberOfInDataMappings(bytes32)

Returns the number of IN data mappings for the specified activity.


getNumberOfOutDataMappings(bytes32)

Returns the number of OUT data mappings for the specified activity.


getOutDataMappingAtIndex(bytes32,uint256)

Returns information about the OUT data mapping of the specified activity at the given index


getStartActivity()

Returns the ID of the start activity of this process definition. This value is set during the validate() function, if the process is valid.


implementsProcessInterface(address,bytes32)

indicates whether this ProcessDefinition implements the specified interface


isValid()

Returns the current validity state


setActivityInputGateway(bytes32,uint8)

Sets the input gateway of the specified activity to the given type.


setActivityOutputGateway(bytes32,uint8)

Sets the output gateway of the specified activity to the given type.


transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


validate()

Validates the coherence of the process definition in terms of the diagram and its configuration and sets the valid flag. Currently performed validation: 1. There must be exactly one start activity, i.e. one activity with no inputs 2. Activities with more than 1 inputs/outputs must have a supporting input/output gateway type (OR, XOR, AND). 3. User task activities must have an assignee or conditional assignee configuration


addProcessInterfaceImplementation(address,bytes32)

CALL
addProcessInterfaceImplementation(address,bytes32)

Parameters

_interfaceId // the ID of the interface
_model // the model defining the interface

Return

BaseErrors.RESOURCE_NOT_FOUND() if the specified interface cannot be located in the modelBaseErrors.NO_ERROR() upon successful creation.

createActivityDefinition(bytes32,uint8,uint8,uint8,bytes32,bool,bytes32,bytes32,bytes32)

CALL
createActivityDefinition(bytes32,uint8,uint8,uint8,bytes32,bool,bytes32,bytes32,bytes32)

Parameters

_activityType // the BpmModel.ActivityType [TASK|SUBPROCESS]
_application // the application handling the execution of the activity
_assignee // the ID of the participant performing the activity (for USER tasks only)
_behavior // the BpmModel.TaskBehavior [SEND|SENDRECEIVE|RECEIVE]
_id // the activity ID
_multiInstance // whether the activity represents multiple instances
_subProcessDefinitionId // references a subprocess definition (only for SUBPROCESS ActivityType)
_subProcessModelId // references the model containg a subprocess definition (only for SUBPROCESS ActivityType)
_taskType // the BpmModel.TaskType [DUMMY|USER|SERVICE|EVENT]

Return

BaseErrors.RESOURCE_ALREADY_EXISTS() if an activity with the same ID already existsBaseErrors.INVALID_PARAM_VALUE() if an assignee is specified, but the BpmModel.TaskType is not USERBaseErrors.NULL_PARAM_NOT_ALLOWED() if BpmModel.TaskType is USER, but no assignee was specifiedBaseErrors.RESOURCE_NOT_FOUND() if an assignee is specified that does not exist in the modelBaseErrors.NO_ERROR() upon successful creation.

createDataMapping(bytes32,uint8,bytes32,bytes32,bytes32,address)

CALL
createDataMapping(bytes32,uint8,bytes32,bytes32,bytes32,address)

Parameters

_accessPath // the access path offered by the application
_activityId // the ID of the activity in this ProcessDefinition
_dataPath // a data path (key) to use for data lookup on a DataStorage.
_dataStorage // an optional address of a DataStorage as basis for the data path other than the default one
_dataStorageId // an optional key to identify a DataStorage as basis for the data path other than the default one
_direction // the BpmModel.Direction [IN|OUT]

createTransition(bytes32,bytes32)

CALL
createTransition(bytes32,bytes32)

Parameters

_sourceActivity // the start of the transition
_targetActivity // the end of the transition

Return

BaseErrors.RESOURCE_NOT_FOUND() if either the source or target activity does not existBaseErrors.RESOURCE_ALREADY_EXISTS() if a transition between the source and target already existsBaseErrors.NO_ERROR() upon successful creation.

getActivityAtIndex(uint256)

CALL
getActivityAtIndex(uint256)

Parameters

_index // the index position

Return

bytes32 the ActivityDefinition ID, if it exists

getActivityData(bytes32)

CALL
getActivityData(bytes32)

Parameters

_id // the bytes32 id of the activity definition

Return

activityType the BpmModel.ActivityType as uint8taskType the BpmModel.TaskType as uint8taskBehavior the BpmModel.TaskBehavior as uint8assignee the ID of the activity's assignee (for interactive activities)multiInstance whether the activity is a multi-instanceapplication the activity's applicationsubProcessModelId the ID of a process model (for subprocess activities)subProcessDefinitionId the ID of a process definition (for subprocess activities)

getActivityInputGateway(bytes32)

CALL
getActivityInputGateway(bytes32)

Parameters

_activityId // the ID of the activity

Return

the BpmModel.GatewayType

getActivityOutputGateway(bytes32)

CALL
getActivityOutputGateway(bytes32)

Parameters

_activityId // the ID of the activity

Return

the BpmModel.GatewayType

getId()

CALL
getId()

Return

the bytes32 ID

getImplementedProcessInterfaceAtIndex(uint256)

CALL
getImplementedProcessInterfaceAtIndex(uint256)

Parameters

_idx // the index position

Return

modelAddress the interface's modelinterfaceId the interface ID

getInDataMappingAtIndex(bytes32,uint256)

CALL
getInDataMappingAtIndex(bytes32,uint256)

Parameters

_activityId // the ID of the activity in this ProcessDefinition
_idx // the index position

Return

accessPath the access path on the applicationdataPath a data path (key) to use for identifying the data location in a DataStorage contractdataStorageId a key to identify a secondary DataStorage as basis for the data path other than the default onedataStorage an address of a DataStorage as basis for the data path other than the default one

getModel()

CALL
getModel()

Return

the model address

getName()

CALL
getName()

Return

the bytes32 name

getNumberOfActivities()

CALL
getNumberOfActivities()

Return

the number of activity definitions

getNumberOfImplementedProcessInterfaces()

CALL
getNumberOfImplementedProcessInterfaces()

Return

the number of process interfaces

getNumberOfInDataMappings(bytes32)

CALL
getNumberOfInDataMappings(bytes32)

Parameters

_activityId // the ID of the activity in this ProcessDefinition

Return

the number of IN data mappings

getNumberOfOutDataMappings(bytes32)

CALL
getNumberOfOutDataMappings(bytes32)

Parameters

_activityId // the ID of the activity in this ProcessDefinition

Return

the number of OUT data mappings

getOutDataMappingAtIndex(bytes32,uint256)

CALL
getOutDataMappingAtIndex(bytes32,uint256)

Parameters

_activityId // the ID of the activity in this ProcessDefinition
_idx // the index position

Return

accessPath the access path on the applicationdataPath a data path (key) to use for identifying the data location in a DataStorage contractdataStorageId a key to identify a secondary DataStorage as basis for the data path other than the default onedataStorage an address of a DataStorage as basis for the data path other than the default one

getStartActivity()

CALL
getStartActivity()

Return

the ID of the identified start activity

implementsProcessInterface(address,bytes32)

CALL
implementsProcessInterface(address,bytes32)

Parameters

_interfaceId // the ID of the interface
_model // the model defining the interface

Return

true if the interface is supported, false otherwise

isValid()

CALL
isValid()

Return

true if valid, false otherwise

setActivityInputGateway(bytes32,uint8)

CALL
setActivityInputGateway(bytes32,uint8)

Parameters

_activityId // the ID of the activity
_type // the gateway type

setActivityOutputGateway(bytes32,uint8)

CALL
setActivityOutputGateway(bytes32,uint8)

Parameters

_activityId // the ID of the activity
_type // the gateway type

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

validate()

CALL
validate()

Return

result - boolean indicating validityerrorMessage - empty string if valid, otherwise contains a hint what failed

DefaultProcessModel

The DefaultProcessModel contract is found within the bpm-model bundle.

addEventListener(bytes32)

Adds the msg.sender as listener for the specified event.


addEventListener(bytes32,address)

Adds the msg.sender as listener for the specified event.


addParticipant(bytes32,address,bytes32,bytes32,address)

Adds a participant with the specified ID and attributes to this ProcessModel


addProcessInterface(bytes32)

Adds a process interface declaration to this ProcessModel that process definitions can refer to


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


createProcessDefinition(bytes32,bytes32)

Creates a new process definition with the given parameters in this ProcessModel


fireActivityDefinitionUpdateEvent(bytes32)

To be called by a registered process definition to signal an update. Causes the ProcessModel to emit an update event on behalf of the msg.sender


fireProcessDefinitionUpdateEvent()

To be called by a registered process definition to signal an update. Causes the ProcessModel to emit an update event on behalf of the msg.sender


getDiagram()

Returns the HOARD file information of the model's diagram


getId()

Returns the ID of this contract.


getName()

Returns the name of this contract.


getNumberOfParticipants()

Returns the number of participants defined in this ProcessModel


getNumberOfProcessDefinitions()

Returns the number of process definitions in this ProcessModel


getNumberOfProcessInterfaces()

Returns the number of process interfaces declared in this ProcessModel


getParticipantAtIndex(uint256)

Returns the ID of the participant at the given index


getParticipantData(bytes32)

Returns information about the participant with the given ID


getProcessDefinition(bytes32)

Returns the address of the ProcessDefinition with the specified ID


getProcessDefinitionAtIndex(uint256)

Returns the address for the ProcessDefinition at the given index


getProcessDefinitionData(address)

Returns information about the ProcessDefinition at the given address


getVersion()

Returns the version as 3-digit array


hasParticipant(bytes32)

Returns whether a participant with the specified ID exists in this ProcessModel


hasProcessInterface(bytes32)

Returns whether a process interface with the specified ID exists in this ProcessModel


major()

returns the major version number


minor()

returns the minor version number


patch()

returns the patch version number


removeEventListener(bytes32)

Removes the msg.sender from the list of listeners for the specified event.


removeEventListener(bytes32,address)

Removes the msg.sender from the list of listeners for the specified event.


addEventListener(bytes32)

CALL
addEventListener(bytes32)

Parameters

_event // the event to subscribe to

addEventListener(bytes32,address)

CALL
addEventListener(bytes32,address)

Parameters

_event // the event to subscribe to
_listener // the address of an EventListener

addParticipant(bytes32,address,bytes32,bytes32,address)

CALL
addParticipant(bytes32,address,bytes32,bytes32,address)

Parameters

_account // the address of a participant account
_dataPath // the field key under which to locate the conditional participant
_dataStorage // the address of a DataStorage contract to find a conditional participant
_dataStorageId // a field key in a known DataStorage containing an address of another DataStorage contract
_id // the participant ID

Return

BaseErrors.INVALID_PARAM_VALUE() if both participant and conditional participant are being attempted to be set or if the config for a conditional participant is missing the _dataPathBaseErrors.NO_ERROR() if successful

addProcessInterface(bytes32)

CALL
addProcessInterface(bytes32)

Parameters

_interfaceId // the ID of the interface

Return

BaseErrors.RESOURCE_ALREADY_EXISTS() if an interface with the given ID already exists, BaseErrors.NO_ERROR() otherwise

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

createProcessDefinition(bytes32,bytes32)

CALL
createProcessDefinition(bytes32,bytes32)

Parameters

_id // the process ID
_name // the process name

Return

error - BaseErrors.RESOURCE_ALREADY_EXISTS(), if a process definition with the same ID already exists, BaseErrors.NO_ERROR() otherwisenewAddress - the address of the new ProcessDefinition when successful

fireActivityDefinitionUpdateEvent(bytes32)

CALL
fireActivityDefinitionUpdateEvent(bytes32)

fireProcessDefinitionUpdateEvent()

CALL
fireProcessDefinitionUpdateEvent()

getDiagram()

CALL
getDiagram()

Return

location - the HOARD addresssecret - the HOARD secret

getId()

CALL
getId()

Return

the bytes32 ID

getName()

CALL
getName()

Return

the bytes32 name

getNumberOfParticipants()

CALL
getNumberOfParticipants()

Return

the number of participants

getNumberOfProcessDefinitions()

CALL
getNumberOfProcessDefinitions()

Return

the number of process definitions

getNumberOfProcessInterfaces()

CALL
getNumberOfProcessInterfaces()

Return

the number of process interfaces

getParticipantAtIndex(uint256)

CALL
getParticipantAtIndex(uint256)

Parameters

_idx // the index position

Return

the participant ID, if it exists

getParticipantData(bytes32)

CALL
getParticipantData(bytes32)

Parameters

_id // the participant ID

Return

location the applications contract address, only available for a service participantmethod the function signature of the participant, only available for a service participantwebForm the form identifier (formHash) of the web participant, only available for a web participant

getProcessDefinition(bytes32)

CALL
getProcessDefinition(bytes32)

Parameters

_id // the process ID

Return

the address of the process definition, if it exists

getProcessDefinitionAtIndex(uint256)

CALL
getProcessDefinitionAtIndex(uint256)

Parameters

_idx // the index position

Return

the address of the ProcessDefinition, if it exists

getProcessDefinitionData(address)

CALL
getProcessDefinitionData(address)

Parameters

_processDefinition // the address

Return

id the process IDname the process nameinterfaceId the first process interface the process definition supports

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

hasParticipant(bytes32)

CALL
hasParticipant(bytes32)

Parameters

_id // the participant ID

Return

true if it exists, false otherwise

hasProcessInterface(bytes32)

CALL
hasProcessInterface(bytes32)

Parameters

_interfaceId // the interface ID

Return

true if it exists, false otherwise

major()

CALL
major()

minor()

CALL
minor()

patch()

CALL
patch()

removeEventListener(bytes32)

CALL
removeEventListener(bytes32)

Parameters

_event // the event to unsubscribe from

removeEventListener(bytes32,address)

CALL
removeEventListener(bytes32,address)

Parameters

_event // the event to unsubscribe from
_listener // the address of an EventListener

DefaultProcessModelRepository

The DefaultProcessModelRepository contract is found within the bpm-model bundle.

activateModel(address)

Activates the given ProcessModel and deactivates any previously activated model version of the same ID


addModel(address)

Adds the given ProcessModel to this repository.


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


createProcessModel(bytes32,bytes32,uint8[3],bytes32,bytes32)

Factory function to instantiate a ProcessModel. The model is automatically added to this repository.


eventFired(bytes32,address)

Overwrites AbstractEventListener.eventFired to receive UPDATE_PROCESS_MODEL and UPDATE_PROCESS_DEFINITION events from registered models.


eventFired(bytes32,address,address)

See EventListener.eventFired(bytes32,address,address)


eventFired(bytes32,address,bytes32)

Overwrites AbstractEventListener.eventFired to receive UPDATE_ACTIVITY_DEFINITION events from registered models.


eventFired(bytes32,address,string)

See EventListener.eventFired(bytes32,address,string)


eventFired(bytes32,address,uint256)

See EventListener.eventFired(bytes32,address,uint)


getActivityAtIndex(address,address,uint256)

Returns the ID of the ActivityDefinition at the specified index position of the given Process Definition


getActivityData(address,address,bytes32)

Returns information about the activity definition with the given ID.


getModel(bytes32)

Returns the address of the activated model with the given ID


getModelAtIndex(uint256)

Returns the address of the ProcessModel at the given index position, if it exists


getModelByVersion(bytes32,uint8[3])

Returns the address of the model with the given ID and version


getModelData(address)

Returns information about the ProcessModel at the given address


getNumberOfActivities(address,address)

Returns the number of Activity Definitions in the specified Process Definition


getNumberOfModels()

Returns the number of models in this repository.


getNumberOfProcessDefinitions(address)

Returns the number of process definitions in the specified model


getProcessDefinition(bytes32,bytes32)

Returns the process definition address when the model ID and process definition ID are provided


getProcessDefinitionAtIndex(address,uint256)

Returns the address of the ProcessDefinition at the specified index position of the given model


getProcessDefinitionData(address,address)

Returns data about the specified ProcessDefinition in the specified ProcessModel


getVersion()

Returns the version as 3-digit array


major()

returns the major version number


minor()

returns the minor version number


patch()

returns the patch version number


transferSystemOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


upgrade(address)

Checks the version and invokes migrateTo and migrateTo in order to transfer state (push then pull)


activateModel(address)

CALL
activateModel(address)

Parameters

_model // the ProcessModel to activate

Return

BaseErrors.RESOURCE_NOT_FOUND() if the model ID and version is not registered in the repositoryBaseErrors.INVALID_STATE() if the model lookup produces an empty addressBaseErrors.INVALID_STATE_CHANGE() if the model registered model with the same ID and version has a different address than the specified one

addModel(address)

CALL
addModel(address)

Parameters

_model // the ProcessModel to add

Return

BaseErrors.RESOURCE_ALREADY_EXISTS() if a model with the same ID and version already existsBaseErrors.NO_ERROR() when added successfully

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

createProcessModel(bytes32,bytes32,uint8[3],bytes32,bytes32)

CALL
createProcessModel(bytes32,bytes32,uint8[3],bytes32,bytes32)

Parameters

_hoardAddress // the HOARD address of the model file
_hoardSecret // the HOARD secret of the model file
_id // the model ID
_name // the model name
_version // the model version

eventFired(bytes32,address)

CALL
eventFired(bytes32,address)

Parameters

_event // the event name
_source // the event source (process model)

eventFired(bytes32,address,address)

CALL
eventFired(bytes32,address,address)

eventFired(bytes32,address,bytes32)

CALL
eventFired(bytes32,address,bytes32)

Parameters

_activityId // the activityId
_event // the event name
_source // the event source (process model)

eventFired(bytes32,address,string)

CALL
eventFired(bytes32,address,string)

eventFired(bytes32,address,uint256)

CALL
eventFired(bytes32,address,uint256)

getActivityAtIndex(address,address,uint256)

CALL
getActivityAtIndex(address,address,uint256)

Parameters

_index // the index position
_model // the model address
_processDefinition // a Process Definition address

Return

bytes32 the ActivityDefinition ID, if it exists

getActivityData(address,address,bytes32)

CALL
getActivityData(address,address,bytes32)

Parameters

_id // the bytes32 id of the activity definition
_model // the model address
_processDefinition // a Process Definition address

Return

activityType the BpmModel.ActivityType as uint8taskType the BpmModel.TaskType as uint8taskBehavior the BpmModel.TaskBehavior as uint8assignee the ID of the activity's assignee (for interactive activities)multiInstance whether the activity is a multi-instanceapplication the activity's applicationsubProcessModelId the ID of a process model (for subprocess activities)subProcessDefinitionId the ID of a process definition (for subprocess activities)

getModel(bytes32)

CALL
getModel(bytes32)

Parameters

_id // the model ID

Return

the model address, if it exists and has an active version

getModelAtIndex(uint256)

CALL
getModelAtIndex(uint256)

Parameters

_idx // the index position

Return

the model address

getModelByVersion(bytes32,uint8[3])

CALL
getModelByVersion(bytes32,uint8[3])

Parameters

_id // the model ID
_version // the model version

Return

the model address, if found

getModelData(address)

CALL
getModelData(address)

Parameters

_model // the ProcessModel address

Return

id - the model IDname - the model nameversionMajor - the model's major versionversionMinor - the model's minor versionversionPatch - the model's patch versionactive - whether the model is activediagramAddress - the HOARD address of the model diagram filediagramSecret - the HOARD secret of the model diagram file

getNumberOfActivities(address,address)

CALL
getNumberOfActivities(address,address)

Parameters

_model // the model address
_processDefinition // a Process Definition address

Return

uint - the number of Activity Definitions

getNumberOfModels()

CALL
getNumberOfModels()

Return

size - the number of models

getNumberOfProcessDefinitions(address)

CALL
getNumberOfProcessDefinitions(address)

Parameters

_model // a ProcessModel address

Return

size - the number of process definitions

getProcessDefinition(bytes32,bytes32)

CALL
getProcessDefinition(bytes32,bytes32)

Parameters

_modelId // - the ProcessModel ID

Return

_processId - the ProcessDefinition IDaddress - the ProcessDefinition address

getProcessDefinitionAtIndex(address,uint256)

CALL
getProcessDefinitionAtIndex(address,uint256)

Parameters

_idx // the index position
_model // a ProcessModel address

Return

the ProcessDefinition address, if it exists

getProcessDefinitionData(address,address)

CALL
getProcessDefinitionData(address,address)

Parameters

_model // a ProcessModel address
_processDefinition // a ProcessDefinition address

Return

id - the ProcessDefinition IDname - the ProcessDefinition nameinterfaceId - the ProcessDefinition's first interface ID

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

major()

CALL
major()

minor()

CALL
minor()

patch()

CALL
patch()

transferSystemOwnership(address)

CALL
transferSystemOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

upgrade(address)

CALL
upgrade(address)

ProcessModelRepositoryDb Interface

The ProcessModelRepositoryDb Interface contract is found within the bpm-model bundle.

transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

bpm-runtime

AbstractProcessStateChangeEmitter

The AbstractProcessStateChangeEmitter contract is found within the bpm-runtime bundle.

addProcessStateChangeListener(address)

Adds a ProcessStateChangeListener to listeners collection


notifyProcessStateChange()

Notifies listeners about a process state change


addProcessStateChangeListener(address)

CALL
addProcessStateChangeListener(address)

Parameters

_listener // the ProcessStateChangeListener to add

notifyProcessStateChange()

CALL
notifyProcessStateChange()

ApplicationRegistryDb Interface

The ApplicationRegistryDb Interface contract is found within the bpm-runtime bundle.

transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

BpmApi Interface Library

The BpmApi Interface Library contract is found within the bpm-runtime bundle.

abort(BpmRuntime.ProcessInstance storage,BpmService)

Aborts the given ProcessInstance and all of its activities


addActivity(BpmRuntime.ProcessGraph storage,bytes32)

Adds an activity with the specified ID to the given process runtime graph.


addInputArc(BpmRuntime.ProcessGraph storage,bytes32,bytes32)

Adds an input arc to the given process runtime graph to connect from the provided activity to the provided transition.


addOutputArc(BpmRuntime.ProcessGraph storage,bytes32,bytes32)

Adds an output arc to the given process runtime graph to connect from the provided transition to the provided activity.


addTransition(BpmRuntime.ProcessGraph storage,bytes32)

Adds a transition with the specified ID to the given process runtime graph.


configure(BpmRuntime.ProcessGraph storage,ProcessDefinition)

Configures a ProcessRuntimeIntance based on the provided ProcessDefinition.


continueTransaction(BpmRuntime.ProcessInstance storage,BpmService)

Checks the given ProcessInstance for completeness and open activities. If activatable activities are detected, recursive execution is entered via execute(ProcessInstance). If the ProcessInstance is complete, its state is set to COMPLETED. Otherwise the function returns BaseErrors.NO_ERROR().


execute(BpmRuntime.ActivityInstance storage,DataStorage,ProcessDefinition,BpmService)

Executes the given ActivityInstance based on the information in the provided ProcessDefinition.


execute(BpmRuntime.ProcessGraph storage)

Executes a single iteration of the given ProcessGraph, i.e. it goes over all transitions and attempts to fire them based on the current token state of the graph.


execute(BpmRuntime.ProcessInstance storage,BpmService)

Executes the given ProcessInstance leveraging the given BpmService reference by looking for activities that are "ready" to be executed. Execution continues along the process graph until no more activities can be executed. This function implements a single transaction of all activities in a process flow until an asynchronous point in the flow is reached or the process has ended.


hasActivatableActivities(BpmRuntime.ProcessGraph storage)

Determines whether the given runtime instance has any activities that are waiting to be activated.


invokeApplication(BpmRuntime.ActivityInstance storage,address,bytes32,address,ProcessDefinition,ApplicationRegistry)

Performs a call on the given application ID defined in the provided ApplicationRegistry


isCompleted(BpmRuntime.ProcessGraph storage)

Executes the given ProcessGraph and reports back on completeness and open activities. The following scenarios are possible: (completed, !readyActivities): the process is done, there are no more activities to process (!completed, readyActivities): the process is still active and there are activities ready for processing (!completed, !readyActivities): the process is still active, but no activities are ready to be processed (which means there must be instances waiting for asynchronous events)


isTransitionEnabled(BpmRuntime.ProcessGraph storage,bytes32)

Determines whether the conditions are met to fire the provided transition.


resolveParticipant(ProcessModel,DataStorage,bytes32)

Provides runtime resolution capabilities to determine the account address or lookup location of an account for a participant in a given ProcessModel. This function supports dealing with concrete participants as well as conditional performers. Examples: Return value (FE80A3F6CDFEF73D4FACA7DBA1DFCF215299279D, "") => The address is a concrete (user) account and can be used directly Return value (AA194B34D18F710058C0B14CFDAD4FF0150856EA, "accountant") => The address is a DataStorage contract and the (user) account to use can be located using DataStorage(AA194B34D18F710058C0B14CFDAD4FF0150856EA).getDataValueAsAddress("accountant")


abort(BpmRuntime.ProcessInstance storage,BpmService)

CALL
abort(BpmRuntime.ProcessInstance

Parameters

_processInstance // the process instance to abort

addActivity(BpmRuntime.ProcessGraph storage,bytes32)

CALL
addActivity(BpmRuntime.ProcessGraph

Parameters

_graph // the process runtime graph
_id // the activity ID to add

addInputArc(BpmRuntime.ProcessGraph storage,bytes32,bytes32)

CALL
addInputArc(BpmRuntime.ProcessGraph

Parameters

_activityId // the ID of the activity from which to connect
_graph // the process runtime graph
_transitionId // the ID of the transtion to which to connect

addOutputArc(BpmRuntime.ProcessGraph storage,bytes32,bytes32)

CALL
addOutputArc(BpmRuntime.ProcessGraph

Parameters

_activityId // the ID of the activity to which to connect
_graph // the process runtime graph
_transitionId // the ID of the transtion from which to connect

addTransition(BpmRuntime.ProcessGraph storage,bytes32)

CALL
addTransition(BpmRuntime.ProcessGraph

Parameters

_graph // the process runtime graph
_id // the transition ID to add

configure(BpmRuntime.ProcessGraph storage,ProcessDefinition)

CALL
configure(BpmRuntime.ProcessGraph

Parameters

_graph // the runtime instance to configure
_processDefinition // the process definition

Return

an error code indicating success or failure

continueTransaction(BpmRuntime.ProcessInstance storage,BpmService)

CALL
continueTransaction(BpmRuntime.ProcessInstance

Parameters

_processInstance // the BpmRuntime.ProcessInstance

Return

BaseErrors.NO_ERROR() if no errors were encountered during processing or no processing happenedany error code from entering into a recursive execute(ProcessInstance) and continuing to execute the process

execute(BpmRuntime.ActivityInstance storage,DataStorage,ProcessDefinition,BpmService)

CALL
execute(BpmRuntime.ActivityInstance

Parameters

_activityInstance // the ActivityInstance
_processDefinition // a ProcessDefinition containing information how to execute the activity
_rootDataStorage // a DataStorage that can be used to resolve process data (typically this is the ProcessInstance itself)
_service // the BpmService to use for communicating

Return

an error code indicating success or failure

execute(BpmRuntime.ProcessGraph storage)

CALL
execute(BpmRuntime.ProcessGraph

Parameters

_graph // the process runtime graph

Return

the number of transitions that fired

execute(BpmRuntime.ProcessInstance storage,BpmService)

CALL
execute(BpmRuntime.ProcessInstance

Parameters

_processInstance // the ProcessInstance to execute
_service // the BpmService managing the ProcessInstance (used to register changes to the ProcessInstance and fire events)

Return

an error code signaling success or failure

hasActivatableActivities(BpmRuntime.ProcessGraph storage)

CALL
hasActivatableActivities(BpmRuntime.ProcessGraph

Parameters

_graph // the ProcessGraph

Return

true if at least one activatable activity was found, false otherwise

invokeApplication(BpmRuntime.ActivityInstance storage,address,bytes32,address,ProcessDefinition,ApplicationRegistry)

CALL
invokeApplication(BpmRuntime.ActivityInstance

Parameters

_activityInstance // the ActivityInstance
_application // the application ID
_applicationRegistry // the registry where information about an application can be retrieved
_processDefinition // the process definition
_rootDataStorage // a DataStorage that is used as the root or default for resolving data references
_txPerformer // the account that initiated the current transaction (optional)

Return

BaseErrors.RUNTIME_ERROR if there was an exception in calling the defined appliationBaseErrors.NO_ERROR() if successful

isCompleted(BpmRuntime.ProcessGraph storage)

CALL
isCompleted(BpmRuntime.ProcessGraph

Parameters

_graph // the BpmRuntime.ProcessGraph

Return

completed - if true, the graph cannot be executed any furtherreadyActivities - if true there are activities ready for processing, false otherwise

isTransitionEnabled(BpmRuntime.ProcessGraph storage,bytes32)

CALL
isTransitionEnabled(BpmRuntime.ProcessGraph

Parameters

_graph // the process runtime graph containing the transition
_transitionId // the ID specifying the transition

Return

true if the transitions can fire, false otherwise

resolveParticipant(ProcessModel,DataStorage,bytes32)

CALL
resolveParticipant(ProcessModel,DataStorage,bytes32)

Parameters

_dataStorage // a concrete DataStorage instance supporting the lookup
_participant // the ID of a participant in the given model
_processModel // a ProcessModel

Return

target - either the address of an account or the address of another DataStorage where the account can be founddataPath - empty bytes32 in case the returned target is already an identified account or a key where to retrieve the account if the target is another DataStorage

BpmRuntimeImpl Implementation Library

The BpmRuntimeImpl Implementation Library contract is found within the bpm-runtime bundle.

abort(BpmRuntime.ProcessInstance storage,BpmService)

Aborts the given ProcessInstance and all of its activities


addActivity(BpmRuntime.ProcessGraph storage,bytes32)

Adds an activity with the specified ID to the given process runtime graph.


addInputArc(BpmRuntime.ProcessGraph storage,bytes32,bytes32)

Adds an input arc to the given process runtime graph to connect from the provided activity to the provided transition.


addOutputArc(BpmRuntime.ProcessGraph storage,bytes32,bytes32)

Adds an output arc to the given process runtime graph to connect from the provided transition to the provided activity.


addTransition(BpmRuntime.ProcessGraph storage,bytes32)

Adds a transition with the specified ID to the given process runtime graph.


configure(BpmRuntime.ProcessGraph storage,ProcessDefinition)

Configures a ProcessRuntimeIntance based on the provided ProcessDefinition. Note: Placing this function in the BpmRuntimeApi library avoids import dependencies of the runtime package by the model.


continueTransaction(BpmRuntime.ProcessInstance storage,BpmService)

Checks the given ProcessInstance for completeness and open activities. If activatable activities are detected, recursive execution is entered via execute(ProcessInstance). If the ProcessInstance is complete, its state is set to COMPLETED. Otherwise the function returns BaseErrors.NO_ERROR().


createActivityInstance(BpmRuntime.ProcessInstance storage,bytes32,uint256)

Creates a new BpmRuntime.ActivityInstance with the specified parameters and adds it to the given ProcessInstance


execute(BpmRuntime.ActivityInstance storage,DataStorage,ProcessDefinition,BpmService)

Executes the given ActivityInstance based on the information in the provided ProcessDefinition.


execute(BpmRuntime.ProcessGraph storage)

Executes a single iteration of the given ProcessGraph, i.e. it goes over all transitions and attempts to fire them based on the current marker state of the network graph. If after this iteration the new marker state would result in more transitions being fired, this function should be invoked again.


execute(BpmRuntime.ProcessInstance storage,BpmService)

Executes the given ProcessInstance leveraging the given BpmService reference by looking for activities that are "ready" to be executed. Execution continues along the process graph until no more activities can be executed. This function implements a single transaction of all activities in a process flow until an asynchronous point in the flow is reached or the process has ended.


hasActivatableActivities(BpmRuntime.ProcessGraph storage)

Determines whether the given runtime instance has any activities that are waiting to be activated.


invokeApplication(BpmRuntime.ActivityInstance storage,address,bytes32,address,ProcessDefinition,ApplicationRegistry)

Performs a call on the given application ID defined in the provided ApplicationRegistry


isCompleted(BpmRuntime.ProcessGraph storage)

Executes the given ProcessGraph and reports back on completeness and open activities. The following scenarios are possible: (completed, !readyActivities): the process is done, there are no more activities to process (!completed, readyActivities): the process is still active and there are activities ready for processing (!completed, !readyActivities): the process is still active, but no activities are ready to be processed (which means there must be instances waiting for asynchronous events)


isTransitionEnabled(BpmRuntime.ProcessGraph storage,bytes32)

Determines whether the conditions are met to fire the provided transition.


resolveParticipant(ProcessModel,DataStorage,bytes32)

Provides runtime resolution capabilities to determine the account address or lookup location of an account for a participant in a given ProcessModel. This function supports dealing with concrete participants as well as conditional performers. Examples: Return value (FE80A3F6CDFEF73D4FACA7DBA1DFCF215299279D, "") => The address is a concrete (user) account and can be used directly Return value (AA194B34D18F710058C0B14CFDAD4FF0150856EA, "accountant") => The address is a DataStorage contract and the (user) account to use can be located using DataStorage(AA194B34D18F710058C0B14CFDAD4FF0150856EA).getDataValueAsAddress("accountant")


abort(BpmRuntime.ProcessInstance storage,BpmService)

CALL
abort(BpmRuntime.ProcessInstance

Parameters

_processInstance // the process instance to abort

addActivity(BpmRuntime.ProcessGraph storage,bytes32)

CALL
addActivity(BpmRuntime.ProcessGraph

Parameters

_graph // the process runtime graph
_id // the activity ID to add

addInputArc(BpmRuntime.ProcessGraph storage,bytes32,bytes32)

CALL
addInputArc(BpmRuntime.ProcessGraph

Parameters

_activityId // the ID of the activity from which to connect
_graph // the process runtime graph
_transitionId // the ID of the transtion to which to connect

addOutputArc(BpmRuntime.ProcessGraph storage,bytes32,bytes32)

CALL
addOutputArc(BpmRuntime.ProcessGraph

Parameters

_activityId // the ID of the activity to which to connect
_graph // the process runtime graph
_transitionId // the ID of the transtion from which to connect

addTransition(BpmRuntime.ProcessGraph storage,bytes32)

CALL
addTransition(BpmRuntime.ProcessGraph

Parameters

_graph // the process runtime graph
_id // the transition ID to add

configure(BpmRuntime.ProcessGraph storage,ProcessDefinition)

CALL
configure(BpmRuntime.ProcessGraph

Parameters

_processDefinition // the process definition
_runtime // the runtime instance

Return

an error code indicating success or failure

continueTransaction(BpmRuntime.ProcessInstance storage,BpmService)

CALL
continueTransaction(BpmRuntime.ProcessInstance

Parameters

_processInstance // the BpmRuntime.ProcessInstance

Return

BaseErrors.NO_ERROR() if no errors were encountered during processing or no processing happenedany error code from entering into a recursive execute(ProcessInstance) and continuing to execute the process

createActivityInstance(BpmRuntime.ProcessInstance storage,bytes32,uint256)

CALL
createActivityInstance(BpmRuntime.ProcessInstance

Parameters

_activityId // the ID of the activity as defined in the ProcessDefinition
_index // indicates the position of the ActivityInstance when used in a multi-instance context
_processInstance // the ProcessInstance to which the ActivityInstance is added

Return

the unique global ID of the activity instance

execute(BpmRuntime.ActivityInstance storage,DataStorage,ProcessDefinition,BpmService)

CALL
execute(BpmRuntime.ActivityInstance

Parameters

_activityInstance // the ActivityInstance
_processDefinition // a ProcessDefinition containing information how to execute the activity
_rootDataStorage // a DataStorage that can be used to resolve process data (typically this is the ProcessInstance itself)
_service // the BpmService to use for communicating

Return

BaseErrors.INVALID_PARAM_STATE() if the ActivityInstance's state is not CREATED, SUSPENDED, or INTERRUPTEDBaseErrors.INVALID_ACTOR() if the ActivityInstance is of TaskType.USER, but neither the msg.sender nor the tx.origin is the assignee of the task.BaseErrors.NO_ERROR() if successful

execute(BpmRuntime.ProcessGraph storage)

CALL
execute(BpmRuntime.ProcessGraph

Parameters

_graph // the process runtime graph

Return

the number of transitions that fired

execute(BpmRuntime.ProcessInstance storage,BpmService)

CALL
execute(BpmRuntime.ProcessInstance

Parameters

_processInstance // the ProcessInstance to execute
_service // the BpmService managing the ProcessInstance (used to register changes to the ProcessInstance and fire events)

Return

BaseErrors.INVALID_STATE() if the ProcessInstance is not ACTIVEBaseErrors.NO_ERROR() if successful

hasActivatableActivities(BpmRuntime.ProcessGraph storage)

CALL
hasActivatableActivities(BpmRuntime.ProcessGraph

Parameters

_graph // the ProcessGraph

Return

true if at least one activatable activity was found, false otherwise

invokeApplication(BpmRuntime.ActivityInstance storage,address,bytes32,address,ProcessDefinition,ApplicationRegistry)

CALL
invokeApplication(BpmRuntime.ActivityInstance

Parameters

_activityInstance // the ActivityInstance
_application // the application ID
_applicationRegistry // the registry where information about an application can be retrieved
_processDefinition // the process definition
_rootDataStorage // a DataStorage that is used as the root or default for resolving data references
_txPerformer // the account that initiated the current transaction (optional)

Return

BaseErrors.RUNTIME_ERROR if there was an exception in calling the defined appliationBaseErrors.NO_ERROR() if successful

isCompleted(BpmRuntime.ProcessGraph storage)

CALL
isCompleted(BpmRuntime.ProcessGraph

Parameters

_graph // the BpmRuntime.ProcessGraph

Return

completed - if true, the graph cannot be executed any furtherreadyActivities - if true there are activities ready for processing, false otherwise

isTransitionEnabled(BpmRuntime.ProcessGraph storage,bytes32)

CALL
isTransitionEnabled(BpmRuntime.ProcessGraph

Parameters

_graph // the process runtime graph containing the transition
_transitionId // the ID specifying the transition

Return

true if the transitions can fire, false otherwise

resolveParticipant(ProcessModel,DataStorage,bytes32)

CALL
resolveParticipant(ProcessModel,DataStorage,bytes32)

Parameters

_dataStorage // a concrete DataStorage instance supporting the lookup
_participant // the ID of a participant in the given model
_processModel // a ProcessModel

Return

target - either the address of an account or the address of another DataStorage where the account can be founddataPath - empty bytes32 in case the returned target is already an identified account or a key where to retrieve the account if the target is another DataStorage

ApplicationRegistry

The ApplicationRegistry contract is found within the bpm-runtime bundle.

addApplication(bytes32,uint8,address,bytes4,bytes32,bytes32)

Adds a Service application with the given parameters to this ProcessModel


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


getApplicationAccessPathAtIndex(bytes32,uint256,uint8)

Returns information about the specified I/O access path of an application


getApplicationAtIndex(uint256)

Returns the ID of the application at the given index


getApplicationData(bytes32)

Returns information about the application with the given ID


getNumberOfApplications()

Returns the number of applications defined in this ProcessModel


getVersion()

Returns the version as 3-digit array


major()

returns the major version number


minor()

returns the minor version number


patch()

returns the patch version number


setApplicationAccessPath(bytes32,bytes32,uint8,uint8)

Adds an input or output declaration to the application identified by the activity ID. Overwrites any previously recorded


transferSystemOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


upgrade(address)

Checks the version and invokes migrateTo and migrateTo in order to transfer state (push then pull)


addApplication(bytes32,uint8,address,bytes4,bytes32,bytes32)

CALL
addApplication(bytes32,uint8,address,bytes4,bytes32,bytes32)

Parameters

_eventName // the ID of an event to fire (only for event application)
_function // the signature of the completion function
_id // the ID of the application
_location // the location of the contract implementing the application
_type // the BpmModel.ApplicationType
_webForm // the hash of a web form (only for web applications)

Return

BaseErrors.RESOURCE_ALREADY_EXISTS() if an application with the given ID already exists, BaseErrors.NO_ERROR() otherwise

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

getApplicationAccessPathAtIndex(bytes32,uint256,uint8)

CALL
getApplicationAccessPathAtIndex(bytes32,uint256,uint8)

Parameters

_direction // BpmModel.Direction.[IN|OUT]
_id // the ID of the application
_idx // the index of the input/output parameter

Return

the ID of the input/outputthe uint8 representation of the DataTypes value

getApplicationAtIndex(uint256)

CALL
getApplicationAtIndex(uint256)

Parameters

_idx // the index position

Return

the application ID, if it exists

getApplicationData(bytes32)

CALL
getApplicationData(bytes32)

Parameters

_id // the application ID

Return

applicationType the BpmModel.ApplicationType as uint8location the applications contract addressmethod the function signature of the application's completion functionwebForm the form identifier (hash) of the web application (only for a web application)eventName the identifier for an event to emit (only for event application)inputs the number of inputsoutputs the number of outputs

getNumberOfApplications()

CALL
getNumberOfApplications()

Return

the number of applications

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

major()

CALL
major()

minor()

CALL
minor()

patch()

CALL
patch()

setApplicationAccessPath(bytes32,bytes32,uint8,uint8)

CALL
setApplicationAccessPath(bytes32,bytes32,uint8,uint8)

Parameters

_dataType // a DataTypes code
_direction // the BpmModel.Direction (IN/OUT) of the data flow
_id // the ID of the application to which to add the declaration
_pathId // the ID of the data path

Return

BaseErrors.RESOURCE_NOT_FOUND() if the application does not exist, BaseErrors.NO_ERROR() otherwise

transferSystemOwnership(address)

CALL
transferSystemOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

upgrade(address)

CALL
upgrade(address)

DefaultBpmService

The DefaultBpmService contract is found within the bpm-runtime bundle.

compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


createDefaultProcessInstance(address,address,bytes32)

Creates a new ProcessInstance initiated with the provided parameters. This ProcessInstance can be further customized and then submitted to the #startProcessInstance(ProcessInstance) function for execution. The ownership of the created ProcessInstance is transfered to the msg.sender, i.e. the caller of this function will be the owner of the ProcessInstance.


fireActivityUpdateEvent(address,bytes32)

Fires the UpdateActivities event to update sqlsol with given activity


fireProcessDataUpdateEvent(address,bytes32)

Fires the UpdateProcessData event to update sqlsol with given information


getActivityInstanceAtIndex(address,uint256)

Returns the ActivityInstance ID at the specified index


getActivityInstanceData(address,bytes32)

Returns ActivityInstance data for given the ActivityInstance ID


getApplicationRegistry()

Returns a reference to the ApplicationRegistry currently used by this BpmService


getBpmServiceDb()

Returns a reference to the BpmServiceDb currently used by this BpmService


getNumberOfActivityInstances(address)

Returns the number of activity instances.


getNumberOfProcessData(address)

Returns the number of process data entries.


getNumberOfProcessInstances()

Returns the number of Process Instances.


getProcessDataAtIndex(address,uint256)

Returns the process data ID at the specified index


getProcessDataDetails(address,bytes32)

Returns information about the process data entry for the specified process and data ID


getProcessInstanceAtIndex(uint256)

Returns the process instance address at the specified index


getProcessInstanceData(address)

Returns information about the process intance with the specified address


getProcessInstanceForActivity(bytes32)

Returns the address of the ProcessInstance of the specified ActivityInstance ID


getProcessModelRepository()

Gets the ProcessModelRepository address for this BpmService


getVersion()

Returns the version as 3-digit array


major()

returns the major version number


minor()

returns the minor version number


patch()

returns the patch version number


setApplicationRegistry(address)

Sets the ApplicationRegistry for this BpmService


setProcessModelRepository(address)

Sets the ProcessModelRepository for this BpmService


startProcess(address,bytes32)

Creates a new ProcessInstance based on the specified ProcessDefinition and starts its execution


startProcessFromRepository(bytes32,bytes32,bytes32)

Creates a new ProcessInstance based on the specified IDs of a ProcessModel and ProcessDefinition and starts its execution


startProcessInstance(address)

Initializes, registers, and executes a given ProcessInstance


transferSystemOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


upgrade(address)

Checks the version and invokes migrateTo and migrateTo in order to transfer state (push then pull)


compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

createDefaultProcessInstance(address,address,bytes32)

CALL
createDefaultProcessInstance(address,address,bytes32)

Parameters

_activityInstanceId // the ID of a subprocess activity instance that initiated this ProcessInstance (optional)
_processDefinition // the address of a ProcessDefinition
_startedBy // the address of an account that regarded as the starting user. If empty, the msg.sender is used.

fireActivityUpdateEvent(address,bytes32)

CALL
fireActivityUpdateEvent(address,bytes32)

Parameters

_activityId // - the bytes32 Id of the activity
_piAddress // - the address of the process instance to which the activity belongs

fireProcessDataUpdateEvent(address,bytes32)

CALL
fireProcessDataUpdateEvent(address,bytes32)

Parameters

_dataId // - the ID of the data entry
_piAddress // - the address of the process instance to which the activity belongs

getActivityInstanceAtIndex(address,uint256)

CALL
getActivityInstanceAtIndex(address,uint256)

Parameters

_address // the process instance address
_pos // the activity instance index

Return

the ActivityInstance ID

getActivityInstanceData(address,bytes32)

CALL
getActivityInstanceData(address,bytes32)

Parameters

_id // the global ID of the activity instance
_processInstance // the process instance address to which the ActivityInstance belongs

Return

activityId - the ID of the activity as defined by the process definitioncreated - the creation timestampcompleted - the completion timestampperformer - the account who is performing the activity (for interactive activities only)completedBy - the account who completed the activity (for interactive activities only) state - the uint8 representation of the BpmRuntime.ActivityInstanceState of this activity instance

getApplicationRegistry()

CALL
getApplicationRegistry()

Return

the ApplicationRegistry

getBpmServiceDb()

CALL
getBpmServiceDb()

Return

the BpmServiceDb

getNumberOfActivityInstances(address)

CALL
getNumberOfActivityInstances(address)

Return

the activity instance count as size

getNumberOfProcessData(address)

CALL
getNumberOfProcessData(address)

Return

the process data size

getNumberOfProcessInstances()

CALL
getNumberOfProcessInstances()

Return

the process instance count as size

getProcessDataAtIndex(address,uint256)

CALL
getProcessDataAtIndex(address,uint256)

Parameters

_pos // the index

Return

the data ID

getProcessDataDetails(address,bytes32)

CALL
getProcessDataDetails(address,bytes32)

Parameters

_address // the process instance
_dataId // the data ID

Return

(process,id,uintValue,bytes32Value,addressValue,boolValue)

getProcessInstanceAtIndex(uint256)

CALL
getProcessInstanceAtIndex(uint256)

Parameters

_pos // the index

Return

the process instance address or BaseErrors.INDEX_OUT_OF_BOUNDS(), 0x0

getProcessInstanceData(address)

CALL
getProcessInstanceData(address)

Parameters

_address // the process instance address

Return

processDefinition the address of the ProcessDefinitionstate the BpmRuntime.ProcessInstanceState as uint8startedBy the address of the account who started the process

getProcessInstanceForActivity(bytes32)

CALL
getProcessInstanceForActivity(bytes32)

Parameters

_aiId // the ID of an ActivityInstance

Return

the ProcessInstance address or 0x0 if it cannot be found

getProcessModelRepository()

CALL
getProcessModelRepository()

Return

the address of the repository

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

major()

CALL
major()

minor()

CALL
minor()

patch()

CALL
patch()

setApplicationRegistry(address)

CALL
setApplicationRegistry(address)

Parameters

_registry // - the address of the application registry

setProcessModelRepository(address)

CALL
setProcessModelRepository(address)

Parameters

_repository // - the address of the model repository

startProcess(address,bytes32)

CALL
startProcess(address,bytes32)

Parameters

_activityInstanceId // the ID of a subprocess activity instance that initiated this ProcessInstance (optional)
_processDefinition // the address of a ProcessDefinition

Return

any error resulting from ProcessInstance.execute() or ProcessBaseErrors.NO_ERROR(), if successfulthe address of a ProcessInstance, if successful

startProcessFromRepository(bytes32,bytes32,bytes32)

CALL
startProcessFromRepository(bytes32,bytes32,bytes32)

Parameters

_activityInstanceId // the ID of a subprocess activity instance that initiated this ProcessInstance (optional)
_modelId // the model that qualifies the process ID, if multiple models are deployed, otherwise optional
_processDefinitionId // the ID of the process definition

Return

BaseErrors.RESOURCE_NOT_FOUND() if ProcessDefinition cannot be located in the ProcessModelRepositoryany error resulting from ProcessInstance.execute() or ProcessBaseErrors.NO_ERROR(), if successfulthe address of a ProcessInstance, if successful //TODO this function should be called startProcess(bytes32, bytes32), but our JS libs have a problem with polymorphism: AN-301

startProcessInstance(address)

CALL
startProcessInstance(address)

Parameters

_pi // the ProcessInstance

Return

BaseErrors.NO_ERROR() if successful or an error code from initializing or executing the ProcessInstance

transferSystemOwnership(address)

CALL
transferSystemOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

upgrade(address)

CALL
upgrade(address)

DefaultProcessInstance

The DefaultProcessInstance contract is found within the bpm-runtime bundle.

abort(address)

Aborts this ProcessInstance and halts any ongoing activities. After the abort the ProcessInstance cannot be resurrected.


addProcessStateChangeListener(address)

Adds a ProcessStateChangeListener to listeners collection


completeActivity(bytes32,address)

Completes the specified activity


execute(address)

Initiates execution of this ProcessInstance consisting of attempting to activate and process any activities and advance the state of the runtime graph.


getActivityInstanceAtIndex(uint256)

Returns the globally unique ID of the activity instance at the specified index in the ProcessInstance.


getActivityInstanceData(bytes32)

Returns information about the activity instance with the specified ID


getNumberOfActivityInstances()

Returns the number of activity instances currently contained in this ProcessInstance. Note that this number is subject to change as long as the process isntance is not completed.


getNumberOfArrayEntries(bytes32,bool)

Returns the number of non-default entries in the specified array-type DataStorage field


getProcessDefinition()

Returns the process definition on which this instance is based.


getStartedBy()

Returns the account that started this process instance


getState()

Returns the state of this process instance


initRuntime()

Initiates the runtime graph that handles the state of this ProcessInstance and activates the start activity. The state of this ProcessInstance must be CREATED. If initiation is successful, the state of this ProcessInstance is set to ACTIVE.


notifyProcessStateChange()

Notifies listeners about a process state change


transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


abort(address)

CALL
abort(address)

Parameters

_service // the BpmService to emit update events for ActivityInstances

addProcessStateChangeListener(address)

CALL
addProcessStateChangeListener(address)

Parameters

_listener // the ProcessStateChangeListener to add

completeActivity(bytes32,address)

CALL
completeActivity(bytes32,address)

Parameters

_activityInstanceId // the activity instance
_service // the BpmService managing this ProcessInstance (required for changes to this ProcessInstance after the activity completes)

Return

BaseErrors.NO_ERROR() if successfulBaseErrors.RESOURCE_NOT_FOUND() if the activity instance cannot be locatedBaseErrors.INVALID_STATE() if the activity is not in a state to be completed (SUSPENDED or INTERRUPTED)BaseErrors.INVALID_ACTOR() if the msg.sender or tx.origin is not the assignee of the task

execute(address)

CALL
execute(address)

Parameters

_service // the BpmService managing this ProcessInstance (required for changes to this ProcessInstance and access to the BpmServiceDb)

Return

error code indicating success or failure

getActivityInstanceAtIndex(uint256)

CALL
getActivityInstanceAtIndex(uint256)

Parameters

_idx // the index position

Return

the bytes32 ID

getActivityInstanceData(bytes32)

CALL
getActivityInstanceData(bytes32)

Parameters

_id // the global ID of the activity instance

Return

created - the creation timestampcompleted - the completion timestampperformer - the account who is performing the activity (for interactive activities only)completedBy - the account who completed the activity (for interactive activities only) activityId - the ID of the activity as defined by the process definitionstate - the uint8 representation of the BpmRuntime.ActivityInstanceState of this activity instance

getNumberOfActivityInstances()

CALL
getNumberOfActivityInstances()

Return

the number of activity instances

getNumberOfArrayEntries(bytes32,bool)

CALL
getNumberOfArrayEntries(bytes32,bool)

Parameters

_fullscan // if false the function will return as soon as a default value (0 for int/uint, 0x0 for address, "" for bytes32, etc.) is encountered, if true the array will be scanned to its end
_id // the key under which to find the array-type value

Return

the number of non-default entries in the array

getProcessDefinition()

CALL
getProcessDefinition()

Return

the address of a ProcessDefinition

getStartedBy()

CALL
getStartedBy()

Return

the address registered when creating the process instance

getState()

CALL
getState()

Return

the uint8 representation of the BpmRuntime.ProcessInstanceState

initRuntime()

CALL
initRuntime()

Return

BaseErrors.INVALID_STATE() if the ProcessInstance is not in state CREATED.an error code if the runtime graph could not be created, e.g. if the process definition is corrupt.BaseErrors.NO_ERROR() otherwise

notifyProcessStateChange()

CALL
notifyProcessStateChange()

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

Ecosystem Interface

The Ecosystem Interface contract is found within the bpm-runtime bundle.

addOrganization(address)

Adds the organization at the specified address to this Ecosystem.


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


createOrganization(bytes32,bytes32,address[10])

Creates a new Organization with the specified parameters and adds it to this Ecosystem.


eventFired(bytes32,address)

Invoked by an EventEmitter for a named event without any additional data.


eventFired(bytes32,address,address)

Invoked by an EventEmitter for a named event with an additional address payload.


eventFired(bytes32,address,bytes32)

Invoked by an EventEmitter for a named event with an additional bytes32 payload.


eventFired(bytes32,address,string)

Invoked by an EventEmitter for a named event with an additional string payload.


eventFired(bytes32,address,uint256)

Invoked by an EventEmitter for a named event with an additional uint payload.


getApproverAtIndex(address,uint256)

Returns the approver's address at the given index position of the specified organization.


getApproverData(address,address)

Function supports SQLsol, but only returns the approver address parameter.


getNumberOfApprovers(address)

Returns the number of registered approvers in the specified organization.


getNumberOfOrganizations()

Returns the number of registered organizations.


getNumberOfUsers(address)

returns the number of users associated with the specified organization


getOrganization(bytes32)

Returns the address of the organization with the specified ID, if it exists


getOrganizationAtIndex(uint256)

Returns the organization at the specified index.


getOrganizationData(address)

Returns the public data of the organization at the specified address


getUserAtIndex(address,uint256)

Returns the user's address at the given index position in the specified organization.


getUserData(address,address)

Returns information about the specified user in the context of the given organization


getVersion()

Returns the version as 3-digit array


isDestroyOnUpgrade()

To be implemented to signal whether this contract should be destroyed after a successful upgrade.


major()

returns the major version number


migrateFrom(address)

Implements the migration of state from the specified predecessor to this contract. This method can be used to 'read' the state of the other contract which is probably easier to achieve.


migrateTo(address)

Implements the migration of state this contract to the specified contract. This method can be used to 'write' the state from this contract to the success. It's probably a little less useful since it requires the successor contract to have appropriate functions to set state.


minor()

returns the minor version number


organizationExists(bytes32)

Indicates whether the specified organization exists for the given organization id


patch()

returns the patch version number


upgrade(address)

Checks the version and invokes migrateTo and migrateTo in order to transfer state (push then pull)


addOrganization(address)

CALL
addOrganization(address)

Parameters

_address // the Organization contract's address

Return

error code

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

createOrganization(bytes32,bytes32,address[10])

CALL
createOrganization(bytes32,bytes32,address[10])

Parameters

_approvers // the initial owners.
_id // the organization's ID
_name // the organization's name

Return

error code and the address of the newly created organization, if successful

eventFired(bytes32,address)

CALL
eventFired(bytes32,address)

Parameters

_event // the event name
_source // the source of the event

eventFired(bytes32,address,address)

CALL
eventFired(bytes32,address,address)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

eventFired(bytes32,address,bytes32)

CALL
eventFired(bytes32,address,bytes32)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

eventFired(bytes32,address,string)

CALL
eventFired(bytes32,address,string)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

eventFired(bytes32,address,uint256)

CALL
eventFired(bytes32,address,uint256)

Parameters

_data // the payload
_event // the event name
_source // the source of the event

getApproverAtIndex(address,uint256)

CALL
getApproverAtIndex(address,uint256)

Parameters

_organization // the organization's address
_pos // the index position

Return

the approver's address, if the position exists

getApproverData(address,address)

CALL
getApproverData(address,address)

Parameters

_approver // the approver's address
_organization // the organization's address

getNumberOfApprovers(address)

CALL
getNumberOfApprovers(address)

Parameters

_organization // the organization's address

Return

the number of approvers

getNumberOfOrganizations()

CALL
getNumberOfOrganizations()

Return

the number of organizations

getNumberOfUsers(address)

CALL
getNumberOfUsers(address)

Parameters

_organization // the organization's address

Return

the number of users

getOrganization(bytes32)

CALL
getOrganization(bytes32)

Parameters

_id // the organization's ID

Return

the organization's address, if it exists

getOrganizationAtIndex(uint256)

CALL
getOrganizationAtIndex(uint256)

Parameters

_pos // the index position

Return

the address of the organization

getOrganizationData(address)

CALL
getOrganizationData(address)

Parameters

_organization // the address of an organization

Return

the organization's ID and name

getUserAtIndex(address,uint256)

CALL
getUserAtIndex(address,uint256)

Parameters

_organization // the organization's address
_pos // the index position

Return

the address or 0x0 if the position does not exist

getUserData(address,address)

CALL
getUserData(address,address)

Parameters

_organization // the organization's address
_user // the user's address

Return

active - whether the user is activated in the organization

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

isDestroyOnUpgrade()

CALL
isDestroyOnUpgrade()

major()

CALL
major()

migrateFrom(address)

CALL
migrateFrom(address)

Parameters

predecessor // the address from which the state is migrated

Return

result the result of the operation, e.g. a constant from commons-base/BaseErrors.sol

migrateTo(address)

CALL
migrateTo(address)

Parameters

successor // the address to which the state is migrated

Return

result the result of the operation, e.g. a constant from commons-base/BaseErrors.sol

minor()

CALL
minor()

organizationExists(bytes32)

CALL
organizationExists(bytes32)

Parameters

_id // organization ID

Return

bool exists

patch()

CALL
patch()

upgrade(address)

CALL
upgrade(address)

commons-auth

AbstractERC165

The AbstractERC165 contract is found within the commons-auth bundle.

supportsInterface(bytes4)

Returns whether the declared interface signature is supported by this contract


supportsInterface(bytes4)

CALL
supportsInterface(bytes4)

Parameters

_interfaceId // the signature of the ERC165 interface

Return

true if supported, false otherwise

AccountsManagerDb Interface

The AccountsManagerDb Interface contract is found within the commons-auth bundle.

transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

AuthorizationsManager

The AuthorizationsManager contract is found within the commons-auth bundle.

addRole(bytes32,address,bytes32)

Adds a role to an account in a AuthorizationsRepository


getRepository(bytes32)

Returns the address of the repository with the specified key, if it exists


hasRole(address,bytes32)

Indicates whether an account has a role in any known AuthorizationsRepository


removeRole(bytes32,address,bytes32)

Removes a role from an account in a AuthorizationsRepository


addRole(bytes32,address,bytes32)

CALL
addRole(bytes32,address,bytes32)

Parameters

_account // account
_repository // AuthorizationsRepository
_role // role

Return

error NO_ERROR, RESOURCE_ERROR, or RESOURCE_NOT_FOUND

getRepository(bytes32)

CALL
getRepository(bytes32)

Parameters

_key // the repository identifier

Return

the address or 0x0, if the repository does not exist

hasRole(address,bytes32)

CALL
hasRole(address,bytes32)

Parameters

_account // account
_role // role

Return

true if the role-account association can be found in a registered repository, false otherwise

removeRole(bytes32,address,bytes32)

CALL
removeRole(bytes32,address,bytes32)

Parameters

_account // account
_repository // AuthorizationsRepository
_role // role

Return

error NO_ERROR, RESOURCE_ERROR, or RESOURCE_NOT_FOUND

AuthorizationsRepository Interface

The AuthorizationsRepository Interface contract is found within the commons-auth bundle.

addRole(address,bytes32)

This function associates the given address with the specified role in the implementing repository. The function should return an error code indicating success or failure.


hasRole(address,bytes32)

This function allows detection of whether the given address is associated with the specified role in the implementing repository.


removeRole(address,bytes32)

This function disassociates the given address from the specified role in the implementing repository. The function should return an error code indicating success or failure.


addRole(address,bytes32)

CALL
addRole(address,bytes32)

hasRole(address,bytes32)

CALL
hasRole(address,bytes32)

removeRole(address,bytes32)

CALL
removeRole(address,bytes32)

BusinessAccount Interface

The BusinessAccount Interface contract is found within the commons-auth bundle.

addFunds(uint256)

Increases the balance by specified amount


getBalance()

Returns the current balance


getId()

Returns the identifier of this contract.


getName()

Returns the name of this contract.


getOrganization()

Returns the address of the organization this business account is associated with.


getOwner()

Returns this account's owner


withdrawFunds(uint256)

Decreases the balance by the specified amount


addFunds(uint256)

CALL
addFunds(uint256)

Parameters

_funds // the amount to add

getBalance()

CALL
getBalance()

Return

the balance

getId()

CALL
getId()

Return

the bytes32 ID

getName()

CALL
getName()

Return

the bytes32 name

getOrganization()

CALL
getOrganization()

Return

the organization address

getOwner()

CALL
getOwner()

Return

the owner address

withdrawFunds(uint256)

CALL
withdrawFunds(uint256)

Parameters

_funds // the amount to withdraw

ChainAutorizations

The ChainAutorizations contract is found within the commons-auth bundle.

addRole(address,bytes32)

Associates the given account with the specified role


hasRole(address,bytes32)

Indicates whether the given account has the specified role


removeRole(address,bytes32)

Removes the given account from the specified role


transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


addRole(address,bytes32)

CALL
addRole(address,bytes32)

Parameters

_account // account
_role // role

Return

error NO_ERROR or RUNTIME_ERROR

hasRole(address,bytes32)

CALL
hasRole(address,bytes32)

Parameters

_account // account
_role // role

Return

true if the account has the role, false otherwise

removeRole(address,bytes32)

CALL
removeRole(address,bytes32)

Parameters

_account // account
_role // role

Return

error NO_ERROR or RUNTIME_ERROR

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

Client Registry

The Client Registry contract is found within the commons-auth bundle.

addClient(bytes32,bytes32,bytes32)

Adds an client with the specified attributes to the registry.


clear()

Removes all entries stored in the mapping.


deleteClient(bytes32)

Deletes client from registry.


exists(bytes32)

returns true if the map contains a value at the specified key, false otherwise.


getClient(bytes32)

Gets an client from the mapping.


keyAtIndex(uint256)

returns the key at the given index or 0 if the index is out of bounds


keyAtIndexHasNext(uint256)

Returns the key at the given index position and the index of the next artifact, if there is one, or 0 otherwise. This method can be used as an iterator: As long as a nextIndex > 0 is returned, there is another key.


keyIndex(bytes32)

returns the index of the given key or -1 if the key does not exist


size()

returns the size of the mapping, i.e. the number of currently stored entries


transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


updateClient(bytes32,bytes32)

Updates client information.


addClient(bytes32,bytes32,bytes32)

CALL
addClient(bytes32,bytes32,bytes32)

Return

NO_ERROR or RESOURCE_ALREADY_EXISTS

clear()

CALL
clear()

Return

the number of removed entries

deleteClient(bytes32)

CALL
deleteClient(bytes32)

Return

NO_ERROR or RESOURCE_NOT_FOUND

exists(bytes32)

CALL
exists(bytes32)

getClient(bytes32)

CALL
getClient(bytes32)

Return

client

keyAtIndex(uint256)

CALL
keyAtIndex(uint256)

keyAtIndexHasNext(uint256)

CALL
keyAtIndexHasNext(uint256)

keyIndex(bytes32)

CALL
keyIndex(bytes32)

size()

CALL
size()

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

updateClient(bytes32,bytes32)

CALL
updateClient(bytes32,bytes32)

Return

NO_ERROR or RESOURCE_NOT_FOUND

DefaultAccountsManager

The DefaultAccountsManager contract is found within the commons-auth bundle.

addBusinessAccount(address)

Adds the specified BusinessAccount. Returns NO_ERROR, RESOURCE_NOT_FOUND if the organization does not exist, RESOURCE_ALREADY_EXISTS if the business account is already registered


addFunds(address,bytes32,uint256)

Adds the specified fund amount to the specified organization's business account.


addUserAccount(address)

Adds the specified UserAccount.


addUserToOrganization(address,address)

Associates the given user with the specified organization.


businessAccountExists(address,bytes32)

Indicates whether the specified business account exists for the given organization ID


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


createUserAccount(address,bytes32)

Creates and adds a user account


getBusinessAccount(address,bytes32)

Returns the business account address for the specified organization ID and business account name.


getBusinessAccount(bytes32)

Returns the business account address for the specified business account ID.


getBusinessAccountAtIndex(uint256)

Gets business account at the given position.


getBusinessAccountData(address)

Gets data for the specified business account.


getBusinessAccountsSize()

Gets business accounts size.


getUserAccount(bytes32)

Returns the user account address for the specified user account ID.


getUserAccountAtIndex(uint256)

Gets user account at the given position.


getUserAccountData(address)

Gets data for the specified user account.


getUserAccountDataById(bytes32)

Gets hashed user account ID and user account address for the specified user account ID.


getUserAccountsSize()

Gets user accounts size.


getVersion()

Returns the version as 3-digit array


major()

returns the major version number


minor()

returns the minor version number


patch()

returns the patch version number


removeUserFromOrganization(address,address)

Removes (deactivates) the given user from the specified organization.


transferSystemOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


upgrade(address)

Checks the version and invokes migrateTo and migrateTo in order to transfer state (push then pull)


userAccountExists(bytes32)

Indicates whether the specified user account exists for the given userAccount ID


withdrawFunds(address,bytes32,uint256)

Subtracts the specified fund amount from the specified organization's business account.


addBusinessAccount(address)

CALL
addBusinessAccount(address)

addFunds(address,bytes32,uint256)

CALL
addFunds(address,bytes32,uint256)

addUserAccount(address)

CALL
addUserAccount(address)

Return

NO_ERROR, RESOURCE_ALREADY_EXISTS if the user account ID is already registered

addUserToOrganization(address,address)

CALL
addUserToOrganization(address,address)

Parameters

_organization // the organization
_userAccount // the user

Return

BaseErrors.NULL_PARAM_NOT_ALLOWED if organization not given,
BaseErrors.RESOURCE_NOT_FOUND if the user account is unknown,
BaseErrors.INVALID_STATE if the given user account has the same ID, but different address as an already registered account,
BaseErrors.NO_ERROR if successful

businessAccountExists(address,bytes32)

CALL
businessAccountExists(address,bytes32)

Parameters

_name // businessAccount name
_organization // the organization's address

Return

bool exists

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

createUserAccount(address,bytes32)

CALL
createUserAccount(address,bytes32)

Parameters

_id // id (required)
_owner // owner (optional)

Return

error BaseErrors.NO_ERROR() or RESOURCE_ALREADY_EXISTS if the user account ID is already registereduserAccount user account

getBusinessAccount(address,bytes32)

CALL
getBusinessAccount(address,bytes32)

Parameters

_name // businessAccount name
_organization // the organization's address

Return

(error, address)

getBusinessAccount(bytes32)

CALL
getBusinessAccount(bytes32)

getBusinessAccountAtIndex(uint256)

CALL
getBusinessAccountAtIndex(uint256)

Parameters

_pos // position

Return

businessAccount business account address

getBusinessAccountData(address)

CALL
getBusinessAccountData(address)

Parameters

_businessAccount // the business account address

Return

organizationAddress the organization's addressbusinessAccountId business account IDbusinessAccountName business account nameaccountBalance business account balance

getBusinessAccountsSize()

CALL
getBusinessAccountsSize()

Return

size size

getUserAccount(bytes32)

CALL
getUserAccount(bytes32)

getUserAccountAtIndex(uint256)

CALL
getUserAccountAtIndex(uint256)

Parameters

_pos // position

Return

userAccount user account address

getUserAccountData(address)

CALL
getUserAccountData(address)

Parameters

_userAccount // the user account address

Return

id user account IDowner user account owner

getUserAccountDataById(bytes32)

CALL
getUserAccountDataById(bytes32)

Parameters

_id // the user account ID

Return

error RESOURCE_NOT_FOUND or NO_ERRORaddr user account addresshashedId hashed user account ID

getUserAccountsSize()

CALL
getUserAccountsSize()

Return

size size

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

major()

CALL
major()

minor()

CALL
minor()

patch()

CALL
patch()

removeUserFromOrganization(address,address)

CALL
removeUserFromOrganization(address,address)

Parameters

_organization // the organization
_userAccount // the user

Return

BaseErrors.NULL_PARAM_NOT_ALLOWED if organization not given,
BaseErrors.RESOURCE_NOT_FOUND if the user account is unknown,
BaseErrors.INVALID_STATE if the given user account has the same ID, but different address as an already registered account,
BaseErrors.NO_ERROR if successful

transferSystemOwnership(address)

CALL
transferSystemOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

upgrade(address)

CALL
upgrade(address)

userAccountExists(bytes32)

CALL
userAccountExists(bytes32)

Parameters

_id // userAccount ID

Return

bool exists

withdrawFunds(address,bytes32,uint256)

CALL
withdrawFunds(address,bytes32,uint256)

DefaultBusinessAccount

The DefaultBusinessAccount contract is found within the commons-auth bundle.

addFunds(uint256)

Increases the balance by specified amount


getBalance()

Returns the current balance


getId()

Returns this account's ID


getName()

Returns this account's name


getOrganization()

Returns the address of the organization this accounts is associated with.


getOwner()

Returns this account's owner


transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


withdrawFunds(uint256)

Decreases the balance by the specified amount


addFunds(uint256)

CALL
addFunds(uint256)

getBalance()

CALL
getBalance()

getId()

CALL
getId()

getName()

CALL
getName()

getOrganization()

CALL
getOrganization()

getOwner()

CALL
getOwner()

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

withdrawFunds(uint256)

CALL
withdrawFunds(uint256)

DefaultEcosystem

The DefaultEcosystem contract is found within the commons-auth bundle.

addOrganization(address)

Adds the organization at the specified address to this Ecosystem.


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


createOrganization(bytes32,bytes32,address[10])

Creates a new Organization with the specified parameters and adds it to this Ecosystem.


eventFired(bytes32,address)

See EventListener.eventFired(bytes32,address)


eventFired(bytes32,address,address)

Implementation of the EventListener interface. Can be called by an organization that is registered in this Ecosystem to trigger an UpdateOrganization event.


eventFired(bytes32,address,bytes32)

See EventListener.eventFired(bytes32,address,bytes32)


eventFired(bytes32,address,string)

See EventListener.eventFired(bytes32,address,string)


eventFired(bytes32,address,uint256)

See EventListener.eventFired(bytes32,address,uint)


getApproverAtIndex(address,uint256)

Returns the approver's address at the given index position of the specified organization.


getApproverData(address,address)

Function supports SQLsol, but only returns the approver address parameter.


getNumberOfApprovers(address)

Returns the number of registered approvers in the specified organization.


getNumberOfOrganizations()

Returns the number of registered organizations.


getNumberOfUsers(address)

returns the number of users associated with the specified organization


getOrganization(bytes32)

Returns the address of the organization with the specified ID, if it exists


getOrganizationAtIndex(uint256)

Returns the address of the Organization at the given index.


getOrganizationData(address)

Returns the public data of the organization at the specified address


getUserAtIndex(address,uint256)

Returns the user's address at the given index position in the specified organization.


getUserData(address,address)

Returns information about the specified user in the context of the given organization


getVersion()

Returns the version as 3-digit array


major()

returns the major version number


minor()

returns the minor version number


organizationExists(bytes32)

Indicates whether the specified organization exists for the given organization id


patch()

returns the patch version number


transferSystemOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


upgrade(address)

Checks the version and invokes migrateTo and migrateTo in order to transfer state (push then pull)


addOrganization(address)

CALL
addOrganization(address)

Parameters

_address // the Organization contract's address

Return

BaseErrors.INVALID_PARAM_VALUE() if address is empty, BaseErrors.RESOURCE_ALREADY_EXISTS() if the organization's ID is already registered, BaseErrors.NO_ERROR() if successful

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

createOrganization(bytes32,bytes32,address[10])

CALL
createOrganization(bytes32,bytes32,address[10])

Parameters

_approvers // the initial owners. If left empty, the msg.sender will be added as an owner.
_id // the organization's ID
_name // the organization's name

Return

BaseErrors.INVALID_PARAM_VALUE() if the ID is empty, BaseErrors.RESOURCE_ALREADY_EXISTS() if the organization's ID is already registered, BaseErrors.NO_ERROR() if successfulthe address of the newly created Organization, or 0x0 if not successful

eventFired(bytes32,address)

CALL
eventFired(bytes32,address)

eventFired(bytes32,address,address)

CALL
eventFired(bytes32,address,address)

Parameters

_event // the event that was fired. Currently supports custom event EVENT_UPDATE_ORGANIZATION_USER
_source // Expected to be a registered Organization

eventFired(bytes32,address,bytes32)

CALL
eventFired(bytes32,address,bytes32)

eventFired(bytes32,address,string)

CALL
eventFired(bytes32,address,string)

eventFired(bytes32,address,uint256)

CALL
eventFired(bytes32,address,uint256)

getApproverAtIndex(address,uint256)

CALL
getApproverAtIndex(address,uint256)

Parameters

_organization // the organization's address
_pos // the index position

Return

the approver's address, if the position exists

getApproverData(address,address)

CALL
getApproverData(address,address)

Parameters

_approver // the approver's address
_organization // the organization's address

Return

the approver address

getNumberOfApprovers(address)

CALL
getNumberOfApprovers(address)

Parameters

_organization // the organization's address

Return

the number of approvers

getNumberOfOrganizations()

CALL
getNumberOfOrganizations()

Return

the number of organizations

getNumberOfUsers(address)

CALL
getNumberOfUsers(address)

Parameters

_organization // the organization's address

Return

the number of users

getOrganization(bytes32)

CALL
getOrganization(bytes32)

Parameters

_id // the organization's ID

Return

the organization's address or 0x0 if it does not exist

getOrganizationAtIndex(uint256)

CALL
getOrganizationAtIndex(uint256)

Parameters

_pos // the index position

Return

the address of the Organization or 0x0 if the index position does not exist

getOrganizationData(address)

CALL
getOrganizationData(address)

Parameters

_organization // the address of an organization

Return

the organization's ID and name

getUserAtIndex(address,uint256)

CALL
getUserAtIndex(address,uint256)

Parameters

_organization // the organization's address
_pos // the index position

Return

the address or 0x0 if the position does not exist

getUserData(address,address)

CALL
getUserData(address,address)

Parameters

_organization // the organization's address
_user // the user's address

Return

active - whether the user is activated in the organization

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

major()

CALL
major()

minor()

CALL
minor()

organizationExists(bytes32)

CALL
organizationExists(bytes32)

Parameters

_id // organization ID

Return

bool exists

patch()

CALL
patch()

transferSystemOwnership(address)

CALL
transferSystemOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

upgrade(address)

CALL
upgrade(address)

DefaultOrganization

The DefaultOrganization contract is found within the commons-auth bundle.

addEventListener(bytes32)

Adds the msg.sender as listener for the specified event.


addEventListener(bytes32,address)

Adds the msg.sender as listener for the specified event.


addUser(address)

Adds the specified user to this organization as an active user. If the user already exists, the function ensures the account is active.


getApproverAtIndex(uint256)

Returns the approver's address at the given index position.


getId()

see NamedElement.getId()


getName()

see NamedElement.getName()


getNumberOfApprovers()

Returns the number of registered approvers.


getNumberOfUsers()

returns the number of users associated with this organization


getUserAtIndex(uint256)

Returns the user's address at the given index position.


isActiveUser(address)

Returns whether the given user account is valid in this organization


removeEventListener(bytes32)

Removes the msg.sender from the list of listeners for the specified event.


removeEventListener(bytes32,address)

Removes the msg.sender from the list of listeners for the specified event.


removeUser(address)

Removes / Deactivates the user in this organization.


supportsInterface(bytes4)

Returns whether the declared interface signature is supported by this contract


addEventListener(bytes32)

CALL
addEventListener(bytes32)

Parameters

_event // the event to subscribe to

addEventListener(bytes32,address)

CALL
addEventListener(bytes32,address)

Parameters

_event // the event to subscribe to
_listener // the address of an EventListener

addUser(address)

CALL
addUser(address)

Parameters

_userAccount // the user to add

Return

BaseErrors.INVALID_PARAM_STATE if the UserAccount does not have this organization as its organization.BaseErrors.NO_ERROR if successful

getApproverAtIndex(uint256)

CALL
getApproverAtIndex(uint256)

Parameters

_pos // the index position

Return

the address or 0x0 if the position does not exist

getId()

CALL
getId()

getName()

CALL
getName()

getNumberOfApprovers()

CALL
getNumberOfApprovers()

Return

the number of approvers

getNumberOfUsers()

CALL
getNumberOfUsers()

Return

the number of users

getUserAtIndex(uint256)

CALL
getUserAtIndex(uint256)

Parameters

_pos // the index position

Return

the address or 0x0 if the position does not exist

isActiveUser(address)

CALL
isActiveUser(address)

Parameters

_userAccount // the user account

Return

true if valid, false otherwise

removeEventListener(bytes32)

CALL
removeEventListener(bytes32)

Parameters

_event // the event to unsubscribe from

removeEventListener(bytes32,address)

CALL
removeEventListener(bytes32,address)

Parameters

_event // the event to unsubscribe from
_listener // the address of an EventListener

removeUser(address)

CALL
removeUser(address)

Parameters

_userAccount // the account to deactivate

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_NOT_FOUND if the user account does not exist in this organization

supportsInterface(bytes4)

CALL
supportsInterface(bytes4)

Parameters

_interfaceId // the signature of the ERC165 interface

Return

true if supported, false otherwise

EcosystemDb Interface

The EcosystemDb Interface contract is found within the commons-auth bundle.

transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

SecureNativeAuthorizations Interface

The SecureNativeAuthorizations Interface contract is found within the commons-auth bundle.

addRole(address,bytes32)

Adds a role to an account


hasBase(address,uint64)

Indicates whether an account has a subset of permissions set


hasRole(address,bytes32)

Indicates whether an account has a role


removeRole(address,bytes32)

Removes a role from an account


setBase(address,uint64,bool)

Sets the permission flags for an account. Makes them explicitly set (on or off).


setGlobal(uint64,bool)

Sets the global (default) permissions flags for the entire chain


unsetBase(address,uint64)

Unsets the permissions flags for an account. Causes permissions being unset to fall through to global permissions.


addRole(address,bytes32)

CALL
addRole(address,bytes32)

Parameters

_account // account address
_role // role name

Return

result whether role was added

hasBase(address,uint64)

CALL
hasBase(address,uint64)

Parameters

_account // account address
_permission // the permissions flags (mask) to check whether enabled against base permissions for the account

Return

result whether account has the passed permissions flags set

hasRole(address,bytes32)

CALL
hasRole(address,bytes32)

Parameters

_account // account address
_role // role name

Return

result whether account has role

removeRole(address,bytes32)

CALL
removeRole(address,bytes32)

Parameters

_account // account address
_role // role name

Return

result whether role was removed

setBase(address,uint64,bool)

CALL
setBase(address,uint64,bool)

Parameters

_account // account address
_permission // the base permissions flags to set for the account
_set // whether to set or unset the permissions flags at the account level

Return

result the effective permissions flags on the account after the call

setGlobal(uint64,bool)

CALL
setGlobal(uint64,bool)

Parameters

_permission // the permissions flags to set
_set // whether to set (or unset) the permissions flags

Return

result the global permissions flags after the call

unsetBase(address,uint64)

CALL
unsetBase(address,uint64)

Parameters

_account // account address
_permission // the permissions flags to unset for the account

Return

result the effective permissions flags on the account after the call

commons-base

Destructible

The Destructible contract is found within the commons-base bundle.

destroy()

Transfers this contract's value to the owner and frees up storage


isDestructible()

Function that can be actively checked to detect if the contract is a destructible contract.


transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


destroy()

CALL
destroy()

isDestructible()

CALL
isDestructible()

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

commons-collections

Mappings API Library

The Mappings API Library contract is found within the commons-collections bundle.

addToArray(Mappings.AddressAddressArrayMap storage,address,address,bool)

Adds the specified value to the array that is stored in the map under the given key. The boolean parameter can be used to avoid duplicate values in the array.Note that the array will be automatically initiated even if there was no prior entry at the specified key. If you want to make sure the key is valid, use exists(key).


addToArray(Mappings.AddressBytes32ArrayMap storage,address,bytes32,bool)

Adds the specified value to the array that is stored in the map under the given key. The boolean parameter can be used to avoid duplicate values in the array.Note that the array will be automatically initiated even if there was no prior entry at the specified key. If you want to make sure the key is valid, use exists(key).


addToArray(Mappings.Bytes32AddressArrayMap storage,bytes32,address,bool)

Adds the specified value to the array that is stored in the map under the given key. The boolean parameter can be used to avoid duplicate values in the array.Note that the array will be automatically initiated even if there was no prior entry at the specified key. If you want to make sure the key is valid, use exists(key).


addToArray(Mappings.UintAddressArrayMap storage,uint256,address,bool)

Adds the specified value to the array that is stored in the map under the given key. The boolean parameter can be used to avoid duplicate values in the array.Note that the array will be automatically initiated even if there was no prior entry at the specified key. If you want to make sure the key is valid, use exists(key).


addToArray(Mappings.UintBytes32ArrayMap storage,uint256,bytes32,bool)

Adds the specified value to the array that is stored in the map under the given key. The boolean parameter can be used to avoid duplicate values in the array.Note that the array will be automatically initiated even if there was no prior entry at the specified key. If you want to make sure the key is valid, use exists(key).


clear(Mappings.AddressAddressArrayMap storage)

Removes all entries stored in the mapping.


clear(Mappings.AddressAddressMap storage)

Removes all entries stored in the mapping.


clear(Mappings.AddressBytes32ArrayMap storage)

Removes all entries stored in the mapping.


clear(Mappings.AddressBytes32Map storage)

Removes all entries stored in the mapping.


clear(Mappings.Bytes32AddressArrayMap storage)

Removes all entries stored in the mapping.


clear(Mappings.Bytes32AddressMap storage)

Removes all entries stored in the map.


clear(Mappings.Bytes32Bytes32Map storage)

Removes all entries stored in the map.


clear(Mappings.Bytes32UintMap storage)

Removes all entries stored in the map.


clear(Mappings.UintAddressArrayMap storage)

Removes all entries stored in the mapping.


clear(Mappings.UintAddressMap storage)

Removes all entries stored in the mapping.


clear(Mappings.UintBytes32ArrayMap storage)

Removes all entries stored in the mapping.


exists(Mappings.AddressAddressArrayMap storage,address)


exists(Mappings.AddressAddressMap storage,address)


exists(Mappings.AddressBytes32ArrayMap storage,address)


exists(Mappings.AddressBytes32Map storage,address)


exists(Mappings.Bytes32AddressArrayMap storage,bytes32)


exists(Mappings.Bytes32AddressMap storage,bytes32)

Convenience function to return the row[_key].exists value.


exists(Mappings.Bytes32Bytes32Map storage,bytes32)

Convenience function to return the row[_key].exists value.


exists(Mappings.Bytes32UintMap storage,bytes32)

Convenience function to return the row[_key].exists value.


exists(Mappings.UintAddressArrayMap storage,uint256)


exists(Mappings.UintAddressMap storage,uint256)


exists(Mappings.UintBytes32ArrayMap storage,uint256)


get(Mappings.AddressAddressArrayMap storage,address)

Retrieves the address array in the map at the specified key.


get(Mappings.AddressAddressMap storage,address)


get(Mappings.AddressBytes32ArrayMap storage,address)

Retrieves the bytes32 array in the map at the specified key.


get(Mappings.AddressBytes32Map storage,address)


get(Mappings.Bytes32AddressArrayMap storage,bytes32)

Retrieves the address array in the map at the specified key.


get(Mappings.Bytes32AddressMap storage,bytes32)


get(Mappings.Bytes32Bytes32Map storage,bytes32)


get(Mappings.Bytes32UintMap storage,bytes32)


get(Mappings.UintAddressArrayMap storage,uint256)

Retrieves the address array in the map at the specified key.


get(Mappings.UintAddressMap storage,uint256)


get(Mappings.UintBytes32ArrayMap storage,uint256)

Retrieves the address array in the map at the specified key.


insert(Mappings.AddressAddressArrayMap storage,address,address[])

Inserts the given address array value at the specified key in the provided map, but only if the key does not exist, yet. The insert function essentially behaves like a database insert in that it avoids entering duplicate keys. In most cases you'd want to use insertOrUpdate(...)


insert(Mappings.AddressAddressMap storage,address,address)

Inserts the given value at the specified key in the provided map, but only if the key does not exist, yet. The insert function essentially behaves like a database insert in that it avoids entering duplicate keys. In most cases you'd want to use insertOrUpdate(...)


insert(Mappings.AddressBytes32ArrayMap storage,address,bytes32[])

Inserts the given bytes32 array value at the specified key in the provided map, but only if the key does not exist, yet. The insert function essentially behaves like a database insert in that it avoids entering duplicate keys. In most cases you'd want to use insertOrUpdate(...)


insert(Mappings.AddressBytes32Map storage,address,bytes32)

Inserts the given value at the specified key in the provided map, but only if the key does not exist, yet. The insert function essentially behaves like a database insert in that it avoids entering duplicate keys. In most cases you'd want to use insertOrUpdate(...)


insert(Mappings.Bytes32AddressArrayMap storage,bytes32,address[])

Inserts the given address array value at the specified key in the provided map, but only if the key does not exist, yet. The insert function essentially behaves like a database insert in that it avoids entering duplicate keys. In most cases you'd want to use insertOrUpdate(...)


insert(Mappings.Bytes32AddressMap storage,bytes32,address)

Inserts the given value at the specified key in the provided map, but only if the key does not exist, yet. The insert function essentially behaves like a database insert in that it avoids entering duplicate keys. In most cases you'd want to use insertOrUpdate(...)


insert(Mappings.Bytes32Bytes32Map storage,bytes32,bytes32)

Inserts the given value at the specified key in the provided map, but only if the key does not exist, yet. The insert function essentially behaves like a database insert in that it avoids entering duplicate keys. In most cases you'd want to use insertOrUpdate(...)


insert(Mappings.Bytes32UintMap storage,bytes32,uint256)

Inserts the given value at the specified key in the provided map, but only if the key does not exist, yet. The insert function essentially behaves like a database insert in that it avoids entering duplicate keys. In most cases you'd want to use insertOrUpdate(...)


insert(Mappings.UintAddressArrayMap storage,uint256,address[])

Inserts the given address array value at the specified key in the provided map, but only if the key does not exist, yet. The insert function essentially behaves like a database insert in that it avoids entering duplicate keys. In most cases you'd want to use insertOrUpdate(...)


insert(Mappings.UintAddressMap storage,uint256,address)

Inserts the given value at the specified key in the provided map, but only if the key does not exist, yet. The insert function essentially behaves like a database insert in that it avoids entering duplicate keys. In most cases you'd want to use insertOrUpdate(...)


insert(Mappings.UintBytes32ArrayMap storage,uint256,bytes32[])

Inserts the given bytes32 array value at the specified key in the provided map, but only if the key does not exist, yet. The insert function essentially behaves like a database insert in that it avoids entering duplicate keys. In most cases you'd want to use insertOrUpdate(...)


insertOrUpdate(Mappings.AddressAddressArrayMap storage,address,address[])

Inserts or updates the given address array value at the specified key in the provided map.


insertOrUpdate(Mappings.AddressAddressMap storage,address,address)

Inserts or updates the given value at the specified key in the provided map.


insertOrUpdate(Mappings.AddressBytes32ArrayMap storage,address,bytes32[])

Inserts or updates the given address array value at the specified key in the provided map.


insertOrUpdate(Mappings.AddressBytes32Map storage,address,bytes32)

Inserts or updates the given value at the specified key in the provided map.


insertOrUpdate(Mappings.Bytes32AddressArrayMap storage,bytes32,address[])

Inserts or updates the given address array value at the specified key in the provided map.


insertOrUpdate(Mappings.Bytes32AddressMap storage,bytes32,address)

Inserts or updates the given value at the specified key in the provided map.


insertOrUpdate(Mappings.Bytes32Bytes32Map storage,bytes32,bytes32)

Inserts or updates the given value at the specified key in the provided map.


insertOrUpdate(Mappings.Bytes32UintMap storage,bytes32,uint256)

Inserts or updates the given value at the specified key in the provided map.


insertOrUpdate(Mappings.UintAddressArrayMap storage,uint256,address[])

Inserts or updates the given address array value at the specified key in the provided map.


insertOrUpdate(Mappings.UintAddressMap storage,uint256,address)

Inserts or updates the given value at the specified key in the provided map.


insertOrUpdate(Mappings.UintBytes32ArrayMap storage,uint256,bytes32[])

Inserts or updates the given address array value at the specified key in the provided map.


keyAtIndex(Mappings.AddressAddressArrayMap storage,uint256)

Retrieves the key at the given index, if it exists.


keyAtIndex(Mappings.AddressAddressMap storage,uint256)

Retrieves the key at the given index, if it exists.


keyAtIndex(Mappings.AddressBytes32ArrayMap storage,uint256)

Retrieves the key at the given index, if it exists.


keyAtIndex(Mappings.AddressBytes32Map storage,uint256)

Retrieves the key at the given index, if it exists.


keyAtIndex(Mappings.Bytes32AddressArrayMap storage,uint256)

Retrieves the key at the given index, if it exists.


keyAtIndex(Mappings.Bytes32AddressMap storage,uint256)

Retrieves the key at the given index, if it exists.


keyAtIndex(Mappings.Bytes32Bytes32Map storage,uint256)

Retrieves the key at the given index, if it exists.


keyAtIndex(Mappings.Bytes32UintMap storage,uint256)

Retrieves the key at the given index, if it exists.


keyAtIndex(Mappings.UintAddressArrayMap storage,uint256)

Retrieves the key at the given index, if it exists.


keyAtIndex(Mappings.UintAddressMap storage,uint256)

Retrieves the key at the given index, if it exists.


keyAtIndex(Mappings.UintBytes32ArrayMap storage,uint256)

Retrieves the key at the given index, if it exists.


keyAtIndexHasNext(Mappings.AddressAddressArrayMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.AddressAddressMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.AddressBytes32ArrayMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.AddressBytes32Map storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.Bytes32AddressArrayMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.Bytes32AddressMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.Bytes32Bytes32Map storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.Bytes32UintMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.UintAddressArrayMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.UintAddressMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyAtIndexHasNext(Mappings.UintBytes32ArrayMap storage,uint256)

Retrieves the key at the given index position and the index of the next artifact.


keyIndex(Mappings.AddressAddressArrayMap storage,address)

Retrieves the index of the specified key.


keyIndex(Mappings.AddressAddressMap storage,address)


keyIndex(Mappings.AddressBytes32ArrayMap storage,address)

Retrieves the index of the specified key.


keyIndex(Mappings.AddressBytes32Map storage,address)


keyIndex(Mappings.Bytes32AddressArrayMap storage,bytes32)

Retrieves the index of the specified key.


keyIndex(Mappings.Bytes32AddressMap storage,bytes32)


keyIndex(Mappings.Bytes32Bytes32Map storage,bytes32)


keyIndex(Mappings.Bytes32UintMap storage,bytes32)


keyIndex(Mappings.UintAddressArrayMap storage,uint256)

Retrieves the index of the specified key.


keyIndex(Mappings.UintAddressMap storage,uint256)

Retrieves the index of the specified key.


keyIndex(Mappings.UintBytes32ArrayMap storage,uint256)

Retrieves the index of the specified key.


remove(Mappings.AddressAddressArrayMap storage,address)

Removes the address array registered at the specified key in the provided map.the _map.keys array might get re-ordered by this operation: if the removed entry was not the last element in the map's keys, the last element will be moved into the void position created by the removal.


remove(Mappings.AddressAddressMap storage,address)

Removes the entry registered at the specified key in the provided map.the _map.keys array may get re-ordered by this operation: unless the removed entry was the last element in the map's keys, the last key will be moved into the void position created by the removal.


remove(Mappings.AddressBytes32ArrayMap storage,address)

Removes the bytes32 array registered at the specified key in the provided map.the _map.keys array might get re-ordered by this operation: if the removed entry was not the last element in the map's keys, the last element will be moved into the void position created by the removal.


remove(Mappings.AddressBytes32Map storage,address)

Removes the entry registered at the specified key in the provided map.the _map.keys array may get re-ordered by this operation: unless the removed entry was the last element in the map's keys, the last key will be moved into the void position created by the removal.


remove(Mappings.Bytes32AddressArrayMap storage,bytes32)

Removes the address array registered at the specified key in the provided map.the _map.keys array might get re-ordered by this operation: if the removed entry was not the last element in the map's keys, the last element will be moved into the void position created by the removal.


remove(Mappings.Bytes32AddressMap storage,bytes32)

Removes the entry registered at the specified key in the provided map.the _map.keys array may get re-ordered by this operation: unless the removed entry was the last element in the map's keys, the last key will be moved into the void position created by the removal.


remove(Mappings.Bytes32Bytes32Map storage,bytes32)

Removes the entry registered at the specified key in the provided map.the _map.keys array may get re-ordered by this operation: unless the removed entry was the last element in the map's keys, the last key will be moved into the void position created by the removal.


remove(Mappings.Bytes32UintMap storage,bytes32)

Removes the entry registered at the specified key in the provided map.the _map.keys array may get re-ordered by this operation: unless the removed entry was the last element in the map's keys, the last key will be moved into the void position created by the removal.


remove(Mappings.UintAddressArrayMap storage,uint256)

Removes the address array registered at the specified key in the provided map.the _map.keys array might get re-ordered by this operation: if the removed entry was not the last element in the map's keys, the last element will be moved into the void position created by the removal.


remove(Mappings.UintAddressMap storage,uint256)

Removes the entry registered at the specified key in the provided map.the _map.keys array might get re-ordered by this operation: if the removed entry was not the last element in the map's keys, the last element will be moved into the void position created by the removal.


remove(Mappings.UintBytes32ArrayMap storage,uint256)

Removes the address array registered at the specified key in the provided map.the _map.keys array might get re-ordered by this operation: if the removed entry was not the last element in the map's keys, the last element will be moved into the void position created by the removal.


removeFromArray(Mappings.AddressAddressArrayMap storage,address,address,bool)

Removes the given value from the inner array in the given map structure. The bool parameter controls if 'all' occurences of the value should be deleted.Searching for the value to be deleted starts at the end of the array, but LIFO is not guaranteed, because entries can be moved around as part of this function, i.e. when the deletion does not happen to be at the end of the array, the last entry is swapped into position of the deleted item and the array is truncated at the end.


removeFromArray(Mappings.AddressBytes32ArrayMap storage,address,bytes32,bool)

Removes the given value from the inner array in the given map structure. The bool parameter controls if 'all' occurences of the value should be deleted.Searching for the value to be deleted starts at the end of the array, but LIFO is not guaranteed, because entries can be moved around as part of this function, i.e. when the deletion does not happen to be at the end of the array, the last entry is swapped into position of the deleted item and the array is truncated at the end.


removeFromArray(Mappings.Bytes32AddressArrayMap storage,bytes32,address,bool)

Removes the given value from the inner array in the given map structure. The bool parameter controls if 'all' occurences of the value should be deleted.Searching for the value to be deleted starts at the end of the array, but LIFO is not guaranteed, because entries can be moved around as part of this function, i.e. when the deletion does not happen to be at the end of the array, the last entry is swapped into position of the deleted item and the array is truncated at the end.


removeFromArray(Mappings.UintAddressArrayMap storage,uint256,address,bool)

Removes the given value from the inner array in the given map structure. The bool parameter controls if 'all' occurences of the value should be deleted.Searching for the value to be deleted starts at the end of the array, but LIFO is not guaranteed, because entries can be moved around as part of this function, i.e. when the deletion does not happen to be at the end of the array, the last entry is swapped into position of the deleted item and the array is truncated at the end.


removeFromArray(Mappings.UintBytes32ArrayMap storage,uint256,bytes32,bool)

Removes the given value from the inner array in the given map structure. The bool parameter controls if 'all' occurences of the value should be deleted.Searching for the value to be deleted starts at the end of the array, but LIFO is not guaranteed, because entries can be moved around as part of this function, i.e. when the deletion does not happen to be at the end of the array, the last entry is swapped into position of the deleted item and the array is truncated at the end.


valueAtIndexHasNext(Mappings.AddressAddressArrayMap storage,uint256)

Retrieves the array at the given index position and the index of the next array.Internal function to retrieve the value and nextIndex from a given Map


valueAtIndexHasNext(Mappings.AddressAddressMap storage,uint256)

Retrieves the value at the given index position and the index of the next address.


valueAtIndexHasNext(Mappings.AddressBytes32ArrayMap storage,uint256)

Retrieves the array at the given index position and the index of the next array.Internal function to retrieve the value and nextIndex from a given Map


valueAtIndexHasNext(Mappings.AddressBytes32Map storage,uint256)

Retrieves the value at the given index position and the index of the next address.


valueAtIndexHasNext(Mappings.Bytes32AddressArrayMap storage,uint256)

Retrieves the array at the given index position and the index of the next array.Internal function to retrieve the value and nextIndex from a given Map


valueAtIndexHasNext(Mappings.Bytes32AddressMap storage,uint256)

Retrieves the value at the given index position and the index of the next address.


valueAtIndexHasNext(Mappings.Bytes32Bytes32Map storage,uint256)

Retrieves the value at the given index position and the index of the next address.


valueAtIndexHasNext(Mappings.Bytes32UintMap storage,uint256)

Retrieves the value at the given index position and the index of the next value.


valueAtIndexHasNext(Mappings.UintAddressArrayMap storage,uint256)

Retrieves the array at the given index position and the index of the next array.Internal function to retrieve the value and nextIndex from a given Map


valueAtIndexHasNext(Mappings.UintAddressMap storage,uint256)

Retrieves the value at the given index position and the index of the next address.Internal function to retrieve the value and nextIndex from a given Map


valueAtIndexHasNext(Mappings.UintBytes32ArrayMap storage,uint256)

Retrieves the array at the given index position and the index of the next array.Internal function to retrieve the value and nextIndex from a given Map


addToArray(Mappings.AddressAddressArrayMap storage,address,address,bool)

CALL
addToArray(Mappings.AddressAddressArrayMap

Parameters

_key // the key for the array
_map // the map
_unique // set to true if the value should only be added if it does not already exist in the array
_value // the value to store in the array

Return

the length of the array after the operation

addToArray(Mappings.AddressBytes32ArrayMap storage,address,bytes32,bool)

CALL
addToArray(Mappings.AddressBytes32ArrayMap

Parameters

_key // the key for the array
_map // the map
_unique // set to true if the value should only be added if it does not already exist in the array
_value // the value to store in the array

Return

the length of the array after the operation

addToArray(Mappings.Bytes32AddressArrayMap storage,bytes32,address,bool)

CALL
addToArray(Mappings.Bytes32AddressArrayMap

Parameters

_key // the key for the array
_map // the map
_unique // set to true if the value should only be added if it does not already exist in the array
_value // the value to store in the array

Return

the length of the array after the operation

addToArray(Mappings.UintAddressArrayMap storage,uint256,address,bool)

CALL
addToArray(Mappings.UintAddressArrayMap

Parameters

_key // the key for the array
_map // the map
_unique // set to true if the value should only be added if it does not already exist in the array
_value // the value to store in the array

Return

the length of the array after the operation

addToArray(Mappings.UintBytes32ArrayMap storage,uint256,bytes32,bool)

CALL
addToArray(Mappings.UintBytes32ArrayMap

Parameters

_key // the key for the array
_map // the map
_unique // set to true if the value should only be added if it does not already exist in the array
_value // the value to store in the array

Return

the length of the array after the operation

clear(Mappings.AddressAddressArrayMap storage)

CALL
clear(Mappings.AddressAddressArrayMap

Parameters

_map // the AddressArrayMap

Return

the number of removed entries

clear(Mappings.AddressAddressMap storage)

CALL
clear(Mappings.AddressAddressMap

Parameters

_map // the map

Return

the number of removed entries

clear(Mappings.AddressBytes32ArrayMap storage)

CALL
clear(Mappings.AddressBytes32ArrayMap

Parameters

_map // the AddressBytes32ArrayMap

Return

the number of removed entries

clear(Mappings.AddressBytes32Map storage)

CALL
clear(Mappings.AddressBytes32Map

Parameters

_map // the map

Return

the number of removed entries

clear(Mappings.Bytes32AddressArrayMap storage)

CALL
clear(Mappings.Bytes32AddressArrayMap

Parameters

_map // the AddressArrayMap

Return

the number of removed entries

clear(Mappings.Bytes32AddressMap storage)

CALL
clear(Mappings.Bytes32AddressMap

Parameters

_map // the map

Return

the number of removed entries

clear(Mappings.Bytes32Bytes32Map storage)

CALL
clear(Mappings.Bytes32Bytes32Map

Parameters

_map // the Bytes32Bytes32Map

Return

the number of removed entries

clear(Mappings.Bytes32UintMap storage)

CALL
clear(Mappings.Bytes32UintMap

Parameters

_map // the map

Return

the number of removed entries

clear(Mappings.UintAddressArrayMap storage)

CALL
clear(Mappings.UintAddressArrayMap

Parameters

_map // the AddressArrayMap

Return

the number of removed entries

clear(Mappings.UintAddressMap storage)

CALL
clear(Mappings.UintAddressMap

Parameters

_map // the map

Return

the number of removed entries

clear(Mappings.UintBytes32ArrayMap storage)

CALL
clear(Mappings.UintBytes32ArrayMap

Parameters

_map // the AddressArrayMap

Return

the number of removed entries

exists(Mappings.AddressAddressArrayMap storage,address)

CALL
exists(Mappings.AddressAddressArrayMap

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.AddressAddressMap storage,address)

CALL
exists(Mappings.AddressAddressMap

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.AddressBytes32ArrayMap storage,address)

CALL
exists(Mappings.AddressBytes32ArrayMap

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.AddressBytes32Map storage,address)

CALL
exists(Mappings.AddressBytes32Map

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.Bytes32AddressArrayMap storage,bytes32)

CALL
exists(Mappings.Bytes32AddressArrayMap

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.Bytes32AddressMap storage,bytes32)

CALL
exists(Mappings.Bytes32AddressMap

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.Bytes32Bytes32Map storage,bytes32)

CALL
exists(Mappings.Bytes32Bytes32Map

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.Bytes32UintMap storage,bytes32)

CALL
exists(Mappings.Bytes32UintMap

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.UintAddressArrayMap storage,uint256)

CALL
exists(Mappings.UintAddressArrayMap

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.UintAddressMap storage,uint256)

CALL
exists(Mappings.UintAddressMap

Return

true if the map contains valid values at the specified key, false otherwise.

exists(Mappings.UintBytes32ArrayMap storage,uint256)

CALL
exists(Mappings.UintBytes32ArrayMap

Return

true if the map contains valid values at the specified key, false otherwise.

get(Mappings.AddressAddressArrayMap storage,address)

CALL
get(Mappings.AddressAddressArrayMap

Parameters

_key // the key
_map // the AddressArrayMap

Return

the addresses array value registered at the specified key, or empty address[] if it doesn't exist

get(Mappings.AddressAddressMap storage,address)

CALL
get(Mappings.AddressAddressMap

Return

the value registered at the specified key, or 0x0 if it doesn't exist

get(Mappings.AddressBytes32ArrayMap storage,address)

CALL
get(Mappings.AddressBytes32ArrayMap

Parameters

_key // the key
_map // the AddressBytes32ArrayMap

Return

the addresses array value registered at the specified key, or empty bytes32[] if it doesn't exist

get(Mappings.AddressBytes32Map storage,address)

CALL
get(Mappings.AddressBytes32Map

Return

the value registered at the specified key, or an empty bytes32 if it doesn't exist

get(Mappings.Bytes32AddressArrayMap storage,bytes32)

CALL
get(Mappings.Bytes32AddressArrayMap

Parameters

_key // the key
_map // the AddressArrayMap

Return

the addresses array value registered at the specified key, or empty address[] if it doesn't exist

get(Mappings.Bytes32AddressMap storage,bytes32)

CALL
get(Mappings.Bytes32AddressMap

Return

the value registered at the specified key, or 0x0 if it doesn't exist

get(Mappings.Bytes32Bytes32Map storage,bytes32)

CALL
get(Mappings.Bytes32Bytes32Map

Return

the value registered at the specified key, or 0x0 if it doesn't exist

get(Mappings.Bytes32UintMap storage,bytes32)

CALL
get(Mappings.Bytes32UintMap

Return

the value registered at the specified key

get(Mappings.UintAddressArrayMap storage,uint256)

CALL
get(Mappings.UintAddressArrayMap

Parameters

_key // the key
_map // the AddressArrayMap

Return

the addresses array value registered at the specified key, or empty address[] if it doesn't exist

get(Mappings.UintAddressMap storage,uint256)

CALL
get(Mappings.UintAddressMap

Return

the value registered at the specified key, or 0x0 if it doesn't exist

get(Mappings.UintBytes32ArrayMap storage,uint256)

CALL
get(Mappings.UintBytes32ArrayMap

Parameters

_key // the key
_map // the AddressArrayMap

Return

the addresses array value registered at the specified key, or empty bytes32[] if it doesn't exist

insert(Mappings.AddressAddressArrayMap storage,address,address[])

CALL
insert(Mappings.AddressAddressArrayMap

Parameters

_key // the key
_map // the map
_value // the value

Return

BaseErrors.NO_ERROR() or BaseErrors.RESOURCE_ALREADY_EXISTS()

insert(Mappings.AddressAddressMap storage,address,address)

CALL
insert(Mappings.AddressAddressMap

Parameters

_key // the key
_map // the map
_value // the value

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_ALREADY_EXISTS

insert(Mappings.AddressBytes32ArrayMap storage,address,bytes32[])

CALL
insert(Mappings.AddressBytes32ArrayMap

Parameters

_key // the key
_map // the map
_value // the value

Return

BaseErrors.NO_ERROR() or BaseErrors.RESOURCE_ALREADY_EXISTS()

insert(Mappings.AddressBytes32Map storage,address,bytes32)

CALL
insert(Mappings.AddressBytes32Map

Parameters

_key // the key
_map // the map
_value // the value

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_ALREADY_EXISTS

insert(Mappings.Bytes32AddressArrayMap storage,bytes32,address[])

CALL
insert(Mappings.Bytes32AddressArrayMap

Parameters

_key // the key
_map // the AddressArrayMap
_value // the value

Return

BaseErrors.NO_ERROR() or BaseErrors.RESOURCE_ALREADY_EXISTS()

insert(Mappings.Bytes32AddressMap storage,bytes32,address)

CALL
insert(Mappings.Bytes32AddressMap

Parameters

_key // the key
_map // the AddressMap
_value // the value

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_ALREADY_EXISTS

insert(Mappings.Bytes32Bytes32Map storage,bytes32,bytes32)

CALL
insert(Mappings.Bytes32Bytes32Map

Parameters

_key // the key
_map // the Bytes32Bytes32Map
_value // the value

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_ALREADY_EXISTS

insert(Mappings.Bytes32UintMap storage,bytes32,uint256)

CALL
insert(Mappings.Bytes32UintMap

Parameters

_key // the key
_map // the Uint Map
_value // the value

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_ALREADY_EXISTS

insert(Mappings.UintAddressArrayMap storage,uint256,address[])

CALL
insert(Mappings.UintAddressArrayMap

Parameters

_key // the key
_map // the map
_value // the value

Return

BaseErrors.NO_ERROR() or BaseErrors.RESOURCE_ALREADY_EXISTS()

insert(Mappings.UintAddressMap storage,uint256,address)

CALL
insert(Mappings.UintAddressMap

Parameters

_key // the key
_map // the map
_value // the value

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_ALREADY_EXISTS

insert(Mappings.UintBytes32ArrayMap storage,uint256,bytes32[])

CALL
insert(Mappings.UintBytes32ArrayMap

Parameters

_key // the key
_map // the map
_value // the value

Return

BaseErrors.NO_ERROR() or BaseErrors.RESOURCE_ALREADY_EXISTS()

insertOrUpdate(Mappings.AddressAddressArrayMap storage,address,address[])

CALL
insertOrUpdate(Mappings.AddressAddressArrayMap

Parameters

_key // the key
_map // the map
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.AddressAddressMap storage,address,address)

CALL
insertOrUpdate(Mappings.AddressAddressMap

Parameters

_key // the key
_map // the map
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.AddressBytes32ArrayMap storage,address,bytes32[])

CALL
insertOrUpdate(Mappings.AddressBytes32ArrayMap

Parameters

_key // the key
_map // the map
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.AddressBytes32Map storage,address,bytes32)

CALL
insertOrUpdate(Mappings.AddressBytes32Map

Parameters

_key // the key
_map // the map
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.Bytes32AddressArrayMap storage,bytes32,address[])

CALL
insertOrUpdate(Mappings.Bytes32AddressArrayMap

Parameters

_key // the key
_map // the AddressArrayMap
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.Bytes32AddressMap storage,bytes32,address)

CALL
insertOrUpdate(Mappings.Bytes32AddressMap

Parameters

_key // the key
_map // the AddressMap
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.Bytes32Bytes32Map storage,bytes32,bytes32)

CALL
insertOrUpdate(Mappings.Bytes32Bytes32Map

Parameters

_key // the key
_map // the Bytes32Bytes32Map
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.Bytes32UintMap storage,bytes32,uint256)

CALL
insertOrUpdate(Mappings.Bytes32UintMap

Parameters

_key // the key
_map // the Uint Map
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.UintAddressArrayMap storage,uint256,address[])

CALL
insertOrUpdate(Mappings.UintAddressArrayMap

Parameters

_key // the key
_map // the map
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.UintAddressMap storage,uint256,address)

CALL
insertOrUpdate(Mappings.UintAddressMap

Parameters

_key // the key
_map // the map
_value // the value

Return

the size of the map after the operation

insertOrUpdate(Mappings.UintBytes32ArrayMap storage,uint256,bytes32[])

CALL
insertOrUpdate(Mappings.UintBytes32ArrayMap

Parameters

_key // the key
_map // the map
_value // the value

Return

the size of the map after the operation

keyAtIndex(Mappings.AddressAddressArrayMap storage,uint256)

CALL
keyAtIndex(Mappings.AddressAddressArrayMap

Parameters

_index // the index
_map // the AddressArrayMap

Return

(BaseErrors.NO_ERROR(), key) or (BaseErrors.INDEX_OUT_OF_BOUNDS(), "")

keyAtIndex(Mappings.AddressAddressMap storage,uint256)

CALL
keyAtIndex(Mappings.AddressAddressMap

Parameters

_index // the index
_map // the map

Return

(BaseErrors.NO_ERROR(), key) or (BaseErrors.INDEX_OUT_OF_BOUNDS(), 0x0)

keyAtIndex(Mappings.AddressBytes32ArrayMap storage,uint256)

CALL
keyAtIndex(Mappings.AddressBytes32ArrayMap

Parameters

_index // the index
_map // the AddressBytes32ArrayMap

Return

(BaseErrors.NO_ERROR(), key) or (BaseErrors.INDEX_OUT_OF_BOUNDS(), "")

keyAtIndex(Mappings.AddressBytes32Map storage,uint256)

CALL
keyAtIndex(Mappings.AddressBytes32Map

Parameters

_index // the index
_map // the map

Return

(BaseErrors.NO_ERROR(), key) or (BaseErrors.INDEX_OUT_OF_BOUNDS(), 0x0)

keyAtIndex(Mappings.Bytes32AddressArrayMap storage,uint256)

CALL
keyAtIndex(Mappings.Bytes32AddressArrayMap

Parameters

_index // the index
_map // the AddressArrayMap

Return

(BaseErrors.NO_ERROR(), key) or (BaseErrors.INDEX_OUT_OF_BOUNDS(), "")

keyAtIndex(Mappings.Bytes32AddressMap storage,uint256)

CALL
keyAtIndex(Mappings.Bytes32AddressMap

Parameters

_index // the index
_map // the map

Return

(BaseErrors.NO_ERROR(), key) or (BaseErrors.INDEX_OUT_OF_BOUNDS(), "")

keyAtIndex(Mappings.Bytes32Bytes32Map storage,uint256)

CALL
keyAtIndex(Mappings.Bytes32Bytes32Map

Parameters

_index // the index
_map // the Bytes32Bytes32Map

Return

(BaseErrors.NO_ERROR(), key) or (BaseErrors.INDEX_OUT_OF_BOUNDS(), "")

keyAtIndex(Mappings.Bytes32UintMap storage,uint256)

CALL
keyAtIndex(Mappings.Bytes32UintMap

Parameters

_index // the index
_map // the map

Return

(BaseErrors.NO_ERROR(), key) or (BaseErrors.INDEX_OUT_OF_BOUNDS(), "")

keyAtIndex(Mappings.UintAddressArrayMap storage,uint256)

CALL
keyAtIndex(Mappings.UintAddressArrayMap

Parameters

_index // the index
_map // the AddressArrayMap

Return

(BaseErrors.NO_ERROR(), key) or (BaseErrors.INDEX_OUT_OF_BOUNDS(), "")

keyAtIndex(Mappings.UintAddressMap storage,uint256)

CALL
keyAtIndex(Mappings.UintAddressMap

Parameters

_index // the index
_map // the map

Return

(BaseErrors.NO_ERROR(), key) or (BaseErrors.INDEX_OUT_OF_BOUNDS(), uint(-1))

keyAtIndex(Mappings.UintBytes32ArrayMap storage,uint256)

CALL
keyAtIndex(Mappings.UintBytes32ArrayMap

Parameters

_index // the index
_map // the AddressArrayMap

Return

(BaseErrors.NO_ERROR(), key) or (BaseErrors.INDEX_OUT_OF_BOUNDS(), "")

keyAtIndexHasNext(Mappings.AddressAddressArrayMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.AddressAddressArrayMap

Parameters

_index // the index
_map // the map

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS()key the key or 0x0nextindex the next index if there is one or 0

keyAtIndexHasNext(Mappings.AddressAddressMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.AddressAddressMap

Parameters

_index // the index
_map // the map

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS()key the key or 0x0nextindex the next index if there is one or 0

keyAtIndexHasNext(Mappings.AddressBytes32ArrayMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.AddressBytes32ArrayMap

Parameters

_index // the index
_map // the map

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS()key the key or uint(-1)nextIndex the next index if there is one or 0

keyAtIndexHasNext(Mappings.AddressBytes32Map storage,uint256)

CALL
keyAtIndexHasNext(Mappings.AddressBytes32Map

Parameters

_index // the index
_map // the map

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS()key the key or 0x0nextindex the next index if there is one or 0

keyAtIndexHasNext(Mappings.Bytes32AddressArrayMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.Bytes32AddressArrayMap

Parameters

_index // the index
_map // the map

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS()key the key or ""nextindex the next index if there is one or 0

keyAtIndexHasNext(Mappings.Bytes32AddressMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.Bytes32AddressMap

Parameters

_index // the index
_map // the map

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS()key the key or ""nextindex the next index if there is one or 0

keyAtIndexHasNext(Mappings.Bytes32Bytes32Map storage,uint256)

CALL
keyAtIndexHasNext(Mappings.Bytes32Bytes32Map

Parameters

_index // the index
_map // the Bytes32Bytes32Map

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS()key the key or ""nextindex the next index if there is one or 0

keyAtIndexHasNext(Mappings.Bytes32UintMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.Bytes32UintMap

Parameters

_index // the index
_map // the map

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS()key the key or ""nextindex the next index if there is one or 0

keyAtIndexHasNext(Mappings.UintAddressArrayMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.UintAddressArrayMap

Parameters

_index // the index
_map // the map

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS()key the key or uint(-1)nextindex the next index if there is one or 0

keyAtIndexHasNext(Mappings.UintAddressMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.UintAddressMap

Parameters

_index // the index
_map // the map

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS()key the key or uint(-1)nextindex the next index if there is one or 0

keyAtIndexHasNext(Mappings.UintBytes32ArrayMap storage,uint256)

CALL
keyAtIndexHasNext(Mappings.UintBytes32ArrayMap

Parameters

_index // the index
_map // the map

Return

error BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS()key the key or uint(-1)nextindex the next index if there is one or 0

keyIndex(Mappings.AddressAddressArrayMap storage,address)

CALL
keyIndex(Mappings.AddressAddressArrayMap

Parameters

_key // the key
_map // the AddressArrayMap

Return

the index of the given key or int_constant uint(-1) if the key does not exist

keyIndex(Mappings.AddressAddressMap storage,address)

CALL
keyIndex(Mappings.AddressAddressMap

Return

the index of the given key or int_constant uint(-1) if the key does not exist

keyIndex(Mappings.AddressBytes32ArrayMap storage,address)

CALL
keyIndex(Mappings.AddressBytes32ArrayMap

Parameters

_key // the key
_map // the AddressBytes32ArrayMap

Return

the index of the given key or int_constant uint(-1) if the key does not exist

keyIndex(Mappings.AddressBytes32Map storage,address)

CALL
keyIndex(Mappings.AddressBytes32Map

Return

the index of the given key or int_constant uint(-1) if the key does not exist

keyIndex(Mappings.Bytes32AddressArrayMap storage,bytes32)

CALL
keyIndex(Mappings.Bytes32AddressArrayMap

Parameters

_key // the key
_map // the AddressArrayMap

Return

the index of the given key or int_constant uint(-1) if the key does not exist

keyIndex(Mappings.Bytes32AddressMap storage,bytes32)

CALL
keyIndex(Mappings.Bytes32AddressMap

Return

the index of the given key or int_constant uint(-1) if the key does not exist

keyIndex(Mappings.Bytes32Bytes32Map storage,bytes32)

CALL
keyIndex(Mappings.Bytes32Bytes32Map

Return

the index of the given key or int_constant uint(-1) if the key does not exist

keyIndex(Mappings.Bytes32UintMap storage,bytes32)

CALL
keyIndex(Mappings.Bytes32UintMap

Return

the index of the given key or int_constant uint(-1) if the key does not exist

keyIndex(Mappings.UintAddressArrayMap storage,uint256)

CALL
keyIndex(Mappings.UintAddressArrayMap

Parameters

_key // the key
_map // the AddressArrayMap

Return

the index of the given key or int_constant uint(-1) if the key does not exist

keyIndex(Mappings.UintAddressMap storage,uint256)

CALL
keyIndex(Mappings.UintAddressMap

Parameters

_key // the key
_map // the map

Return

the index of the given key or int_constant uint(-1) if the key does not exist

keyIndex(Mappings.UintBytes32ArrayMap storage,uint256)

CALL
keyIndex(Mappings.UintBytes32ArrayMap

Parameters

_key // the key
_map // the AddressArrayMap

Return

the index of the given key or int_constant uint(-1) if the key does not exist

remove(Mappings.AddressAddressArrayMap storage,address)

CALL
remove(Mappings.AddressAddressArrayMap

Parameters

_key // the key
_map // the AddressArrayMap

Return

BaseErrors.NO_ERROR() or BaseErrors.RESOURCE_NOT_FOUND().

remove(Mappings.AddressAddressMap storage,address)

CALL
remove(Mappings.AddressAddressMap

Parameters

_key // the key
_map // the map

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_NOT_FOUND.

remove(Mappings.AddressBytes32ArrayMap storage,address)

CALL
remove(Mappings.AddressBytes32ArrayMap

Parameters

_key // the key
_map // the map

Return

BaseErrors.NO_ERROR() or BaseErrors.RESOURCE_NOT_FOUND().

remove(Mappings.AddressBytes32Map storage,address)

CALL
remove(Mappings.AddressBytes32Map

Parameters

_key // the key
_map // the map

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_NOT_FOUND.

remove(Mappings.Bytes32AddressArrayMap storage,bytes32)

CALL
remove(Mappings.Bytes32AddressArrayMap

Parameters

_key // the key
_map // the AddressArrayMap

Return

BaseErrors.NO_ERROR() or BaseErrors.RESOURCE_NOT_FOUND().

remove(Mappings.Bytes32AddressMap storage,bytes32)

CALL
remove(Mappings.Bytes32AddressMap

Parameters

_key // the key
_map // the AddressMap

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_NOT_FOUND.

remove(Mappings.Bytes32Bytes32Map storage,bytes32)

CALL
remove(Mappings.Bytes32Bytes32Map

Parameters

_key // the key
_map // the Bytes32Bytes32Map

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_NOT_FOUND.

remove(Mappings.Bytes32UintMap storage,bytes32)

CALL
remove(Mappings.Bytes32UintMap

Parameters

_key // the key
_map // the Uint Map

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_NOT_FOUND.

remove(Mappings.UintAddressArrayMap storage,uint256)

CALL
remove(Mappings.UintAddressArrayMap

Parameters

_key // the key
_map // the AddressArrayMap

Return

BaseErrors.NO_ERROR() or BaseErrors.RESOURCE_NOT_FOUND().

remove(Mappings.UintAddressMap storage,uint256)

CALL
remove(Mappings.UintAddressMap

Parameters

_key // the key
_map // the map

Return

BaseErrors.NO_ERROR or BaseErrors.RESOURCE_NOT_FOUND.

remove(Mappings.UintBytes32ArrayMap storage,uint256)

CALL
remove(Mappings.UintBytes32ArrayMap

Parameters

_key // the key
_map // the map

Return

BaseErrors.NO_ERROR() or BaseErrors.RESOURCE_NOT_FOUND().

removeFromArray(Mappings.AddressAddressArrayMap storage,address,address,bool)

CALL
removeFromArray(Mappings.AddressAddressArrayMap

Parameters

_all // if true, the entire array will be traversed and all occurences deleted, if false only the first encountered one
_key // the key for the array
_map // the map
_value // the value to be deleted in the array

Return

the resulting array length

removeFromArray(Mappings.AddressBytes32ArrayMap storage,address,bytes32,bool)

CALL
removeFromArray(Mappings.AddressBytes32ArrayMap

Parameters

_all // if true, the entire array will be traversed and all occurences deleted, if false only the first encountered one
_key // the key for the array
_map // the map
_value // the value to be deleted in the array

Return

the resulting array length

removeFromArray(Mappings.Bytes32AddressArrayMap storage,bytes32,address,bool)

CALL
removeFromArray(Mappings.Bytes32AddressArrayMap

Parameters

_all // if true, the entire array will be traversed and all occurences deleted, if false only the first encountered one
_key // the key for the array
_map // the map
_value // the value to be deleted in the array

Return

the resulting array length

removeFromArray(Mappings.UintAddressArrayMap storage,uint256,address,bool)

CALL
removeFromArray(Mappings.UintAddressArrayMap

Parameters

_all // if true, the entire array will be traversed and all occurences deleted, if false only the first encountered one
_key // the key for the array
_map // the map
_value // the value to be deleted in the array

Return

the resulting array length

removeFromArray(Mappings.UintBytes32ArrayMap storage,uint256,bytes32,bool)

CALL
removeFromArray(Mappings.UintBytes32ArrayMap

Parameters

_all // if true, the entire array will be traversed and all occurences deleted, if false only the first encountered one
_key // the key for the array
_map // the map
_value // the value to be deleted in the array

Return

the resulting array length

valueAtIndexHasNext(Mappings.AddressAddressArrayMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.AddressAddressArrayMap

Parameters

_index // the index
_map // the AddressArrayMap

Return

BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS(), value or address[], and nextIndex

valueAtIndexHasNext(Mappings.AddressAddressMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.AddressAddressMap

Parameters

_index // the index
_map // the map

Return

BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS(), value, and nextIndex

valueAtIndexHasNext(Mappings.AddressBytes32ArrayMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.AddressBytes32ArrayMap

Parameters

_index // the index
_map // the AddressArrayMap

Return

BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS(), value or bytes32[], and nextIndex

valueAtIndexHasNext(Mappings.AddressBytes32Map storage,uint256)

CALL
valueAtIndexHasNext(Mappings.AddressBytes32Map

Parameters

_index // the index
_map // the map

Return

BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS(), value, and nextIndex

valueAtIndexHasNext(Mappings.Bytes32AddressArrayMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.Bytes32AddressArrayMap

Parameters

_index // the index
_map // the AddressArrayMap

Return

BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS(), value or address[], and nextIndex

valueAtIndexHasNext(Mappings.Bytes32AddressMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.Bytes32AddressMap

Parameters

_index // the index
_map // the map

Return

BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS(), value, and nextIndex

valueAtIndexHasNext(Mappings.Bytes32Bytes32Map storage,uint256)

CALL
valueAtIndexHasNext(Mappings.Bytes32Bytes32Map

Parameters

_index // the index
_map // the Bytes32Bytes32Map

Return

BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS(), value, and nextIndex

valueAtIndexHasNext(Mappings.Bytes32UintMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.Bytes32UintMap

Parameters

_index // the index
_map // the map

Return

BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS(), value, and nextIndex

valueAtIndexHasNext(Mappings.UintAddressArrayMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.UintAddressArrayMap

Parameters

_index // the index
_map // the AddressArrayMap

Return

BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS(), value or address[], and nextIndex

valueAtIndexHasNext(Mappings.UintAddressMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.UintAddressMap

Parameters

_index // the index
_map // the map

Return

BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS(), value, and nextIndex

valueAtIndexHasNext(Mappings.UintBytes32ArrayMap storage,uint256)

CALL
valueAtIndexHasNext(Mappings.UintBytes32ArrayMap

Parameters

_index // the index
_map // the AddressArrayMap

Return

BaseErrors.NO_ERROR() or BaseErrors.INDEX_OUT_OF_BOUNDS(), value or bytes32[], and nextIndex

VersionLinked

The VersionLinked contract is found within the commons-collections bundle.

acceptVersionLink(address)

Adds the given VersionLinked contract into the linked version list or returns an error, if the operation is not possible


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


getOwner()

Returns the owner


getPredecessor()

Returns the predecessor version


getSuccessor()

Returns the successor version


getVersion()

Returns the version as 3-digit array


major()

returns the major version number


minor()

returns the minor version number


patch()

returns the patch version number


transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


acceptVersionLink(address)

CALL
acceptVersionLink(address)

Parameters

_link // a new VersionedLink contract.

Return

BaseErrors.NO_ERROR() if the given VersionLinked instance was successfully placed into the linked version list.
BaseErrors.NULL_PARAM_NOT_ALLOWED() if the _newPredecessor is empty (null address).
BaseErrors.INVALID_STATE() if the given VersionLinked instance has a different owner than this contract.
BaseErrors.INVALID_PARAM_VALUE() if the given VersionLinked instance has the same version or address as this contract.

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

getOwner()

CALL
getOwner()

Return

the address of the owner

getPredecessor()

CALL
getPredecessor()

Return

the address of the predecessor or 0x0 if not set

getSuccessor()

CALL
getSuccessor()

Return

the address of the successor or 0x0 if not set

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

major()

CALL
major()

minor()

CALL
minor()

patch()

CALL
patch()

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

VersionLinkedAppendOnly Interface

The VersionLinkedAppendOnly Interface contract is found within the commons-collections bundle.

appendNewVersion(address)

Appends the given version as the latest in version linked list


compareVersion(address)

Compares this contract's version to the version of the contract at the specified address.


compareVersion(uint8[3])

Compares this contract's version to the specified version.


getTargetVersion(uint8[3])

Retrieves the specified version


getVersion()

Returns the version as 3-digit array


major()

returns the major version number


minor()

returns the minor version number


patch()

returns the patch version number


setLatest(address)

Sets the latest version, and recursively sets latest for preceeding links


setPredecessor()

Sets the predecessor to msg.sender who should also have the same owner


transferOwnership(address)

Allows the current owner to transfer control of the contract to a new owner.


appendNewVersion(address)

CALL
appendNewVersion(address)

Return

error - failure to append due to various reasons

compareVersion(address)

CALL
compareVersion(address)

Parameters

_other // the address to which this contract is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

compareVersion(uint8[3])

CALL
compareVersion(uint8[3])

Parameters

_version // the version to which this contract's version is compared

Return

0 (equal), -1 (the other version is lower), or 1 (the other version is higher).

getTargetVersion(uint8[3])

CALL
getTargetVersion(uint8[3])

Parameters

_targetVer // - the version to retrieve

Return

targetAddr - address of the version to retrieve, 0x0 if not found

getVersion()

CALL
getVersion()

Return

the version as unit8[3]

major()

CALL
major()

minor()

CALL
minor()

patch()

CALL
patch()

setLatest(address)

CALL
setLatest(address)

Parameters

_latest // - the latest version

Return

success - representing whether latest was successfully set for all links

setPredecessor()

CALL
setPredecessor()

Return

error - if a predecessor is already set (i.e. no overwriting allowed), or if there is a owner mismatch

transferOwnership(address)

CALL
transferOwnership(address)

Parameters

_newOwner // The address to transfer ownership to.

commons-management

ContractLocator Interface

The ContractLocator Interface contract is found within the commons-management bundle.

addContract(bytes32,address)

Adds the specified contract address to the locator under the given name.


getContract(bytes32)

returns the address of the contract registered under the specified name. TODO can be extended in the future to include version!


addContract(bytes32,address)

CALL
addContract(bytes32,address)

Parameters

_address // the contract address
_name // the name to register

Return

the number of contracts registered at the end of this operation

getContract(bytes32)

CALL