Source Object Bind

The Source Object bind gives access to the STEP object (Source object) that the business rule is being evaluated (via condition) or executed (via action) against. The bind can be found within the 'Binds to' dropdown, as shown below.

This bind is intended for use with the PMDM for Automotive solution.

Note: When using the business action created using this bind in a Business Action Mapping plugin, care must be taken to configure the business action in the 'Select Business Action' parameter and not in the 'Business Condition' parameter. For more information, refer to the Business Action Mapping Plugin topic within the Data Onboarding section of Automotive Reference Guide here

Configuration

To use any bind:

  1. Create a business rule as defined in the Creating a Business Rule, Function, or Library topic here.
  2. Edit the business rule as defined in the Editing a Business Rule or Function topic here.
  3. In the Edit Operation dialog, add the bind to a business rule, as defined in the Adding a Bind topic in the Reference Materials documentation here.
  4. In the Edit Operation dialog, optionally add Messages, as defined in the Adding a Localized Business Rule Message topic here.
  5. In the Edit Operation dialog, add JavaScript to call the bind.

Example

The following is an example JavaScript that uses this bind.

Important: The example scripts should not be used as-is without thorough testing, including updating the script to match object and link types that exist on your system. JavaScript variable names are case-sensitive.

This sample code above expects a bind to the 'source' variable, gets the value of the 'TD_ATTR_WKZ' attribute on the source object, and stores it in the variable 'ccVal'.

Business Action Example

The following business action sample contains a bind to Source Object with the variable 'source', a bind to Current Object with the variable 'target', a bind of Logger to the variable 'log', and a bind of Attribute to the variable 'CurrencyCode' (for attribute 'TD_ATTR_WKZ'). The output could be achieved as:

This action retrieves the value of the attribute 'TD_ATTR_WKZ' from the source object and sets the attribute value in the attribute 'TD_ATTR_WKZ' of the target object.