vania-janet/multiturn-rag-retrieval-data huggingface dataset:
Writing expressions 

You can write expressions to specify values that are independent of, or derived from, values that are collected in steps or stored in session variables. You can use an expression to define a step condition or to define the value of a session variable.



 Using an expression in a step condition 

You can use an expression in a step condition if you want to condition a step on the result of a calculation based on information you have gathered during the conversation.

For example, suppose a customer has $200 in a savings account and wants to transfer $150 from it to a new checking account. The funds transfer fee is $3, and the bank charges a fee when a savings account contains less than $50. You could create a step with a step condition that checks for this situation. The step condition would use an expression like this:

${savings} - (${Step_232} + ${transfer_fee}) < 50

where:



* ${savings} represents a session variable that stores the customer's savings account total.
* ${Step_232} represents the step that asks for the amount the customer wants to transfer.
* ${transfer_fee} represents a session variable that specifies the fee for a funds transfer.



If the step condition is met, the step warns the user that the requested transfer will bring the savings account balance below the $50 minimum and incur a fee, and ask to confirm before proceeding.

To use an expression in a step condition, follow these steps:



1. From the step, click Add condition.

A condition is generated automatically with the most likely choice, which is typically any variables that were set in the previous step.
2. Click the first segment of the generated condition, and then scroll down and click Expression.
3. Optional: Click the ![Expand icon](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/expression-editor-icon.png)Expand icon to open the expression editor window.
nz_get_sysmgmt_view_name
nz_get_sysmgmt_view_names
nz_get_sysmgmt_view_objid
nz_get_sys_table_name
nz_get_sys_table_names
nz_get_sys_view_name
nz_get_sys_view_names
nz_get_table_distribution_key
nz_get_table_fks
nz_get_table_name
nz_get_table_names
nz_get_table_objid
nz_get_table_organization_key
nz_get_table_owner
nz_get_table_pk
nz_get_table_rowcount
nz_get_table_rowcount_statistic
nz_get_user_groups
nz_get_user_name
nz_get_user_names
nz_get_user_objid
nz_get_user_owner
nz_get_view_definition
nz_get_view_name
nz_get_view_names
nz_get_view_objid
nz_get_view_owner
nz_get_view_rowcount
nz_grep_views
nz_groom
nz_host_memory
nz_inconsistent_data_types
nz_index
nz_invisible
nz_lock
nz_maintenance_mode
nz_migrate
nz_my_access
nz_my_grants
nz_online_vacuum
nz_permissions_audit
nz_physical_table_layout
nz_plan
nz_query_history
nz_query_stats
nz_record_skew
nz_rerandomize
nz_rev
nz_set
nz_show_locks
nz_skew
nz_sort_order
nz_spu_memory
nz_spu_swap_space
nz_spu_top
nz_state
nz_stats
nz_storage_stats
The other organizations have the choice of whether to participate in this channel (for example, whether to join peers to it), but it is assumed that the collaborative process of deciding on the channel configuration will happen out of band, before an organization creates the channel.

Updating a channel is different. Rather than an organization acting alone, channel updates follow the collaborative governance procedures that are fundamental to the way the IBM Blockchain Platform functions. This collaborative process involves sending the channel configuration update requests to operator organizations that have an administrative role in the channel.

Because selecting [Anchor peers](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-governibp-console-govern-channels-anchor-peers) and [Joining a peer to a channel](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-governibp-console-govern-channels-join-peer) are actions that only require the signature of the organization performing the action, they are updated through the Channel details panel inside a channel. To update other parameters, you must click on the Settings button next to the channel name at the top of the page and initiate a channel configuration update transaction. A panel will appear that looks very similar to the panel you use to create a channel.



 Signature collection flow 

For signatures to be verified, all of the organizations on a channel (including the ordering service organizations) should export the MSPs representing their organizations to the other organizations on the channel. To export an MSP, click the download button on your MSP (on the Organizations tab), then send it to other organizations out of band. When you receive an MSP JSON file, import it using the Organizations panel. For more information about exporting and importing, including information about to export and import in bulk, see [Importing nodes](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-import-nodes).
[Running operator actions through a bastion host](https://cloud.ibm.com/docs/framework-financial-services?topic=framework-financial-services-vpc-architecture-connectivity-bastionvpc-architecture-connectivity-bastion)



* [Set up a bastion host](https://cloud.ibm.com/docs/framework-financial-services?topic=framework-financial-services-vpc-architecture-connectivity-bastionsetup)
* [Related controls in IBM Cloud Framework for Financial Services](https://cloud.ibm.com/docs/framework-financial-services?topic=framework-financial-services-vpc-architecture-connectivity-bastionnext-steps)
* [Next steps](https://cloud.ibm.com/docs/framework-financial-services?topic=framework-financial-services-vpc-architecture-connectivity-bastionnext-steps)



[Consumer connectivity to workload VPC](https://cloud.ibm.com/docs/framework-financial-services?topic=framework-financial-services-vpc-architecture-connectivity-workloadvpc-architecture-connectivity-workload)



* [Consumer in same organization as application provider](https://cloud.ibm.com/docs/framework-financial-services?topic=framework-financial-services-vpc-architecture-connectivity-workloadconsumer-provider-same-org)



* [Direct Link](https://cloud.ibm.com/docs/framework-financial-services?topic=framework-financial-services-vpc-architecture-connectivity-workloadvpc-architecture-connectivity-management-direct-link)
* [VPN for VPC](https://cloud.ibm.com/docs/framework-financial-services?topic=framework-financial-services-vpc-architecture-connectivity-workloadvpc-architecture-connectivity-management-vpn)



* [Consumer in different organization than application provider](https://cloud.ibm.com/docs/framework-financial-services?topic=framework-financial-services-vpc-architecture-connectivity-workloadconsumer-provider-different-org)
Editor, Administrator Create, view, update, modify the plan for, and delete instances of the Continuous Delivery service. Provision an instance of Continuous Delivery in a resource group. /n /n Delete an instance of Continuous Delivery from a resource group. /n /n Change a Continuous Delivery instance plan from Lite to Professional. 
 Administrator Update the Authorized Users list. Add a user to the Authorized Users list. /n /n Remove a user from the Authorized Users list. 



The following table details actions that are mapped to service access roles. Service access roles enable users access to Continuous Delivery as well as the ability to call the Continuous Delivery API.



Table 2. IAM service access roles and actions

 Service Access Role Description of Actions Example Actions 

 Writer, Manager Add and remove users from the Authorized Users list on the Manage tab within a Continuous Delivery service instance. Add authorized user. /n /n >Remove authorized user. 



For information about assigning user roles in the UI, see [Managing IAM access](https://cloud.ibm.com/docs/account?topic=account-assign-access-resources).

For Continuous Delivery, the following actions exist:



Table 3. Service actions and operations

 Action Operation on Service Role 

 resource-controller.instance.create Provision a Continuous Delivery service instance in a resource group. Administrator, Editor 
 resource-controller.instance.update Update a Continuous Delivery service instance in a resource group. For example, rename the service instance. Administrator, Editor 
 resource-controller.instance.update_plan Change the plan for the Continuous Delivery service instance in a resource group. Administrator, Editor 
 resource-controller.instance.delete Delete a Continuous Delivery service instance from a resource group. Administrator, Editor 
 resource-controller.instance.retrieve View a Continuous Delivery service instance in a resource group. Administrator, Editor, Operator, Viewer 
 continuous-delivery.instance.add-auth-users Add entries to the Authorized Users list on the Manage tab within the Continuous Delivery service instance. Administrator, Writer, Manager 
 continuous-delivery.instance.remove-auth-users Remove entries from the Authorized Users list on the Manage tab within the Continuous Delivery service instance.
Writing powerful smart contracts 

As Hyperledger Fabric and the IBM Blockchain platform have evolved, their processes have been made more decentralized and collaborative. This is why, for example, the old “Kafka” ordering service, in which a single organization owned and managed the ordering service, was replaced with a “Raft” ordering service in which multiple organizations can administer the ordering service and contribute nodes.

This same spirit of decentralization and collaboration also drove the development of a new series of processes around installing, managing, and using smart contracts (these processes are known as the “lifecycle” of a smart contract).

While these new processes are somewhat more elaborate and require more planning and forethought than the "old" lifecycle (in which a single organization proposed a smart contract instantiation on a channel), the new lifecycle provides many new powerful and elegant opportunities to satisfy a wider set of business use cases.

This topic will show how these opportunities can be exploited both during development of a smart contract and during its lifecycle servicing a channel.



 What's new in the new lifecycle 

In the lifecycle used for Fabric versions before 2.0:



* Smart contracts were proposed for instantiation by a single channel member. Organizations could not formally propose endorsement policies or other smart contract parameters within the context of official Fabric processes.
* A “fingerprint” match was required for every smart contract installed on every peer, requiring the smart contract on every peer on a channel to be exactly the same. This fingerprinting was error prone --- the exact same smart contract could under certain circumstances produce a slightly different fingerprint, leading to mismatch errors that were difficult to resolve.
* Any change to the smart contract, no matter how minor, required a new package (which must be installed on every peer and re-fingerprinted) and re-instantiation on the channel.



In the "new" lifecycle used for Fabric versions after 2.0:



* Organizations collaborate in the channel-level decision making process regarding smart contracts.
* Fingerprint matches are no longer required.
* Smart contracts can be updated in some ways without the need for re-instantiation at a channel level.
[SI-11 - Error Handling](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-si-11si-11)



* [Control requirements](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-si-11control-requirements)
* [Implementation guidance](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-si-11implementation-guidance)
* [NIST supplemental guidance](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-si-11nist-supplemental-guidance)



[SI-12 - Information Handling and Retention](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-si-12si-12)



* [Control requirements](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-si-12control-requirements)
* [Additional IBM Cloud for Financial Services specifications](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-si-12additional-ibm-cloud-for-financial-services-specifications)
* [IBM Cloud for Financial Services profile](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-si-12scc-fs-cloud-profile)
* [NIST supplemental guidance](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-si-12nist-supplemental-guidance)







 Program Management (PM)
This lifecycle is necessarily ongoing, as it encompasses changes to the smart contract itself as well as updates to a channel, as for example when a new member starts using the smart contract, and is managed through a combination of processes inside and outside the console.

Lifecycle process overview

Attention! The IBM Blockchain Platform Extension for VS Code (VS Code extension) referenced throughout the documentation is an open-source project which is no longer active, and therefore not officially supported by IBM. Refer to the [alternatives to the VS Code extension](https://github.com/IBM-Blockchain/blockchain-vscode-extension/issues/3159).

Zoom

![Smart contract lifecycle](https://cloud.ibm.com/docs-content/v1/content/c5288bed34c3820e3a5251d820ee91adcd2591a3/blockchain/images/smart-contract-lc-illustrationv3.png)

Figure 1. Smart contract lifecycle

The diagram illustrates the smart contract lifecycle process. Org1 begins the process by packaging the smart contract using the blockchain [VS Code extension](https://marketplace.visualstudio.com/items?itemName=IBMBlockchain.ibm-blockchain-platform) or the Fabric [peer CLI](https://hyperledger-fabric.readthedocs.io/en/v2.2.0/commands/peerlifecycle.html). After packaging, all smart contract lifecycle management is performed from the Channels tab in the console. Org1 proposes the smart contract definition to the channel and installs it on one or more Org1 peers. The smart contract definition includes the definition name, version, endorsement policy, and optionally, private data collections. As a proposer of the definition, Org1 attaches the smart contract package, which contains the agreed to business logic that updates the ledger. The package can be shared with the channel members out of band, who can review the source code. However, it's important to understand that channel members approve the smart contract definition, not the package.
* [Control requirements](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-ma-1control-requirements)
* [NIST supplemental guidance](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-ma-1nist-supplemental-guidance)



[MA-2 - Controlled Maintenance](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-ma-2ma-2)



* [Control requirements](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-ma-2control-requirements)
* [Implementation guidance](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-ma-2implementation-guidance)
* [NIST supplemental guidance](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-ma-2nist-supplemental-guidance)



[MA-3 - Maintenance Tools](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-ma-3ma-3)



* [Control requirements](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-ma-3control-requirements)
* [NIST supplemental guidance](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-ma-3nist-supplemental-guidance)



[MA-3 (1) - Inspect Tools](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-ma-3.1ma-3.1)
[SA-1 - System and Services Acquisition Policy and Procedures](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-sa-1sa-1)



* [Control requirements](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-sa-1control-requirements)
* [NIST supplemental guidance](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-sa-1nist-supplemental-guidance)



[SA-2 - Allocation of Resources](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-sa-2sa-2)



* [Control requirements](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-sa-2control-requirements)
* [NIST supplemental guidance](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-sa-2nist-supplemental-guidance)



[SA-3 - System Development Life Cycle](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-sa-3sa-3)



* [Control requirements](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-sa-3control-requirements)
* [Additional IBM Cloud for Financial Services specifications](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-sa-3additional-ibm-cloud-for-financial-services-specifications)
* [Implementation guidance](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-sa-3implementation-guidance)
On the Review channel information panel, you can see that there are now two organization members on the channel, org1msp and org2msp. In addition the channel update policy has been changed to 2 out of 2. When you are ready, click Update channel to submit your changes.

Org1 must also export its own MSP, Org1 MSP, and send it to Org2 in an out of band operation. All members of a channel should have the MSPs of the other channel members.

At this point, Org2 is listed in the channel configuration and therefore technically part of the channel. However, more steps must still be completed.



 Export the ordering service and its MSP 

This step can be performed either by Org1 or the ordering service admin.

If the ordering service and its MSP are not yet present on the file system of either Org1 or the ordering service, complete the following steps to Export the ordering service before it can be imported by the peer organization:



1. Navigate to the ordering service inside the Nodes tab. Click the Export button beneath the ordering service name to download a JSON configuration file.
2. Send this file to Org2 in an out of band operation. The peer organization administrator can then use the configuration file to add the ordering service to the console.



The rest of the actions in this section and Step three need to be performed from the console where the Org2 MSP was created.





 Import the ordering service 

If the Org2 MSP was created in the same console as the ordering service, this step can be skipped.

Complete the following steps to import the ordering service into your console:



1. Navigate to the Nodes page and click Add ordering service.
2. Click the option to Import an existing ordering service.
3. Then click the Add file button to select the JSON that represents the ordering service.
4. Click Add ordering service.









 Step three: Join your peer to the channel 

Your peer can now be joined to channel1.



1. If you are not already there, navigate to the Channels tab in the left navigation. There will not be any channel tiles visible yet.
2. Click the Join channel button to launch the side panels.
* [NIST supplemental guidance](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-ma-3nist-supplemental-guidance)



[MA-3 (1) - Inspect Tools](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-ma-3.1ma-3.1)



* [Control requirements](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-ma-3.1control-requirements)
* [NIST supplemental guidance](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-ma-3.1nist-supplemental-guidance)



[MA-3 (2) - Inspect Media](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-ma-3.2ma-3.2)



* [Control requirements](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-ma-3.2control-requirements)
* [NIST supplemental guidance](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-ma-3.2nist-supplemental-guidance)



[MA-4 - Nonlocal Maintenance](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-ma-4ma-4)



* [Control requirements](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-ma-4control-requirements)
* [Control requirements](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-cm-8.3control-requirements)
* [NIST supplemental guidance](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-cm-8.3nist-supplemental-guidance)



[CM-8 (4) - Accountability Information](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-cm-8.4cm-8.4)



* [Control requirements](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-cm-8.4control-requirements)
* [Implementation guidance](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-cm-8.4implementation-guidance)
* [NIST supplemental guidance](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-cm-8.4nist-supplemental-guidance)



[CM-9 - Configuration Management Plan](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-cm-9cm-9)



* [Control requirements](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-cm-9control-requirements)
* [Additional IBM Cloud for Financial Services specifications](https://cloud.ibm.com/docs/framework-financial-services-controls?topic=framework-financial-services-controls-cm-9additional-ibm-cloud-for-financial-services-specifications)