Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

Commit 4687ddc

Browse files
Paul O'Mbestbeforetoday
authored andcommitted
Multi-Org 1.2 changes, TP docs changes (#4318)
* Use different fabric-samples repo to support BYFN/EYFN * Add information about REST API @returns in TP functions Signed-off-by: Paul O'M <[email protected]>
1 parent c754012 commit 4687ddc

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

packages/composer-website/jekylldocs/reference/js_scripts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ async function simpleNativeHistoryTransaction (transaction) {
326326

327327
## Returning data from transaction processor functions
328328

329-
Transaction processor functions can optionally return data to client applications. This can be useful for returning a receipt to the submitter of the transaction, or returning an asset modified by the transaction to avoid a separate lookup of the asset after the transaction has been committed.
329+
Transaction processor functions can optionally return data to client applications. This can be useful for returning a receipt to the submitter of the transaction, or returning an asset modified by the transaction to avoid a separate lookup of the asset after the transaction has been committed. Data can also be returned to the client application via a transaction REST API for the business network, eg a POST method to return data (as described below) to the client application.
330330

331331
The return data for a transaction processor function must be a valid type, either a primitive type (String, Integer, Long, etc.), or a type modelled using the Composer modelling language - a concept, asset, participant, transaction, event or enumeration.
332332

@@ -600,7 +600,7 @@ Transaction processor function:
600600
const assetRegistry = await getAssetRegistry('org.sample.MyAsset');
601601
const localAssets = await assetRegistry.getAll();
602602
for (const asset of localAssets) {
603-
localAssets.push(asset);
603+
allAssets.push(asset);
604604
}
605605
const businessNetworkNames = ['other-network-1', 'other-network-2'];
606606
for (const businessNetworkName of businessNetworkNames) {

packages/composer-website/jekylldocs/tutorials/deploy-to-fabric-multi-org.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ If you have previously installed the Composer development environment, you will
4646
./stopFabric.sh
4747
./teardownFabric.sh
4848

49-
Next, clone the following GitHub Fabric Samples repository using the command line (do not use the samples from the [Fabric site:](http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html) as it is missing some changes that are required for this tutorial)
49+
Next, clone the following GitHub Fabric Samples repository using the command line (IMPORTANT: DO NOT USE the samples from the [Fabric site:](http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html) as it is missing some changes that are required for this tutorial)
5050

51-
git clone -b issue-6978 https://github.com/sstone1/fabric-samples.git
51+
git clone https://github.com/mahoney1/fabric-samples.git
5252

5353
We are using the [Building Your First Network](http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html) Fabric sample network for this multi-org tutorial. We will refer to this {{site.data.conrefs.hlf_full}} network as the 'BYFN' (Building Your First Network) network henceforth. If you choose to split your organisations across separate physical machines or separate virtual machines running on different IP networks, it is outside the scope of this particular tutorial.
5454

@@ -66,15 +66,19 @@ In order to follow this tutorial, you must start up a fresh {{site.data.conrefs.
6666

6767
Verify the list of docker images downloaded without issues.
6868

69-
(Please note that you can ignore the initial "error: pathspec v1.1.0 did not match" message in the output for now)
69+
(Please note that you can ignore the initial "error: pathspec v1.x.x did not match" message in the output - you may not even see this message)
7070

71-
3. change directory into `first-network` sample
71+
3. We need to use the 'multi-org' branch from the Git repo we cloned earlier (to work with current Fabric level):
72+
73+
git checkout multi-org
74+
75+
4. change directory into `first-network` sample
7276

7377
cd first-network
7478

75-
4. Next, start the BYFN network - additional flags (to the `byfn.sh` script below) must be specified, as we're using CouchDB as the world state database (different to that specified on the Fabric BYFN page) - we also want to start a Certificate Authority (CA) for **each** organization.
79+
5. Next, start the BYFN network - additional flags (to the `byfn.sh` script below) must be specified, as we're using CouchDB as the world state database (different to that specified on the Fabric BYFN page) - we also want to start a Certificate Authority (CA) for **each** organization.
7680

77-
5. Execute the following commands in sequence from the `first-network` directory:
81+
6. Execute the following commands in sequence from the `first-network` directory:
7882

7983
./byfn.sh -m generate
8084

0 commit comments

Comments
 (0)