Pipeline Building Blocks

There are pipeline building blocks that are available in the pipeline editor in Eclipse/Studio.

Icon Component Description Configuration Properties


Select Enables you to select a component in the pipeline editor None


Marquee Enables you to select a specific node or group of nodes None


Transition Creates a transition between two nodes

Description: description for other developers using the pipeline.

Transaction Control: determines whether the transition starts, ends, or saves a transaction.

  • Begin Transaction: marks the set of nodes that make up a transaction
  • Commit Transaction: commits the transaction to the database
  • Rollback Transaction: rolls back the previous transaction
  • Transaction Save Point: saves the transaction


Text Tool Enables you to add text inside pipeline that are visible in the pipeline editor

Description: this is the text shown in Studio.



Start Node A pipeline can have multiple start nodes. Each start node begins a different logic branch and must have a unique name.

Call Properties:

Call Mode: accessibility of the start node

  • Public: can be called via HTTP and via call or jump nodes
  • Private: can be called via call or jump nodes only

Parameters: Pipeline Dictionary parameters that this start node expects to be passed in.

Name: used in pipeline calls

Secure Connection required:
  • true: incoming request must be https.
  • false: incoming request can be http.

Properties:

Description: description for other developers using the pipeline.

Name: name used to execute the pipeline.



Call Node Makes a call to a pipeline workflow and returns to the current workflow.

Description: description for other developers using the pipeline.

Dynamic: select false to specify a pipeline directly or true to specify a dictionary item containing the pipeline.

Pipeline: pipeline name or Pipeline Dictionary item name



Jump Node Jumps to a specified pipeline and doesn't return to the current workflow.

Description: description for other developers using the pipeline.

Dynamic: select false to specify a pipeline directly or true to specify a dictionary item containing the pipeline.

Pipeline: pipeline name or Pipeline Dictionary item name



Script Node Calls a custom script

Configuration: specify how you want a script node to behave.

  • OnError: PIPELET_ERROR or exception
  • Script File: the Salesforce B2C Commerce script file to execute
  • Timeout: timeout in seconds. The default is 10 seconds
  • Transactional: true or false


Eval Node Evaluates an expression, resulting in an error, exception or Dictionary output

Configuration:

  • Expression: valid expression to evaluate.
  • Result: the output of the evaluation.
  • OnError: null or exception
  • Transactional: true or false. Set to true if you need to update B2C Commerce database.


Assign Node Used to assign values to new or existing Pipeline Dictionary entries, using up to 10 configured pairs of dictionary-input and dictionary-output values

Configuration: transactional (true or false)

Properties: custom label: label name

For example, to assign an existing dictionary entry "wishlist" to "productlist":



Decision Node Provides conditional branch in workflow

Comparison operator: comparison operator (for example, expression)

Decision Key: the Pipeline key to compare, typically to determine if its content is null.



Join Node Provides convergence point for multiple branches in workflow None


Loop Node Provides for an iterative process

Iterator Definition:

  • Element Key: name of the Pipeline Dictionary item that will hold the current element
  • Iterator Key: name of the Pipeline Dictionary item to be used as the iterator


Interaction Node

Specifies the page template used to show resulting information

Properties:

Description: description for other developers using the pipeline.

Template Properties:

Dynamic Template:

  • true - the template to use is determined by the template expression
    • Template expression: identifies a dynamic template to use. For example: Product.template, where Product is an object in the Pipeline Dictionary. This lets you assign different templates for different product types, for example.
  • false - template is determined by the template name
    • Template name: templates identifier. For example account/login/accountlogin


Interaction Continue Node

Processes a template based on user action via a browser

The template must reference a form definition that defines storefront entry fields and buttons.

Call Properties:

Secure Connection required:
  • true: incoming request must be https.
  • false: incoming request can be http.

Properties:

Description: description for other developers using the pipeline.

Start Name: name for the interaction continue node

Dynamic Template:.

  • true - the template to use is determined by the template expression
    • Template expression: identifies a dynamic template to use. For example: Product.template, where Product is an object in the Pipeline Dictionary. This lets you assign different templates for different product types, for example.
  • false - template is determined by the template name
    • Template name: templates identifier. For example account/login/accountlogin


Stop Node

Functions as an emergency break, comparable with an exception within pipelets.

If you want to stop all pipelines, use a stop node. This should rarely be used in production.

Name: external name


End Node

Finishes the execution of the current pipeline

If the current pipeline was called from another pipeline and you only want to stop the current pipeline, use an end node, not a stop node. The calling pipeline will be continued Only if called from a call node; not from a jump node.

Name: must be unique within the pipeline. Can be used by the calling pipeline to dispatch flow after a call.

The value of the name property is returned to the calling node. If there is a transition off the calling node of the same name, that transition is followed. End node names can be evaluated at the call node to implement error handling.

Example

The cart pipeline executes the CalculateCart script. If the basket is null, a new basket is created using GetBasket. This pipeline includes a private start node (Calculate), a call node (Cart-GetExistingBasket), two pipelets (Assign and Script) and two end nodes. The Script pipelet executes the CalculateCart.ds script file.

Transition Names and Flow Control

When using an Interaction Continue node, such as with the SiteGenesis application's cart pipeline, it is essential for flow control to name each transition. This is because the template that is called by the Interaction Continue node can reference this name as the next step in the process, as one of many possibilities.

The Interaction Continue node calls a template, which derives data entry validation from a form definition. The form definition includes information on both entry fields and action requests such as buttons.

For example, the cart template in the SiteGenesis application references the cart.coupon form definition, as follows, using the CurrentForms element to validate the Remove Coupon button:

<isloop items="${pdict.CurrentForms.cart.coupons}"
 var="FormCoupon" status="loopstateCoupons">

When the customer clicks the Remove Coupon button, the workflow branches to the deleteCoupon transition, as follows:

	<button class="textbutton" type="submit"
 value="${Resource.msg('global.remove','locale',null)}"
 name="${FormCoupon.deleteCoupon.htmlName}">
	${Resource.msg('global.remove','locale',null)}
	</button>

deleteCoupon is also the name of the transition.