Functions You Can Use in Business Rules

Use a function in your business rule to get details or to do a calculation.

Here are the functions that you can use in a product transformation, orchestration process assignment, or routing rule. You can't use them on an orchestration process.

Attribute

Description

ModifyEntity

Modify an entity.

Use this function with a pretransformation rule, transformation rule, or posttransformation rule.

Use these arguments.

  • attrName(String)

  • attrValue(Object)

  • viewRowImpl(oracle.jbo.server.ViewRowImpl)

Note

  • If you don't use the list of values to set attrName(), then you must enclose the attribute that you provide with quotation marks.

  • The name of the attribute is the required data type, not the value of the attribute at run time.

  • Make sure your rule populates the ModifyEntity arguments when your rule uses them to do an action.

  • ModifyEntity behavior is different from the Modify action you use on menus on the Manage Product Transformation Rules page.

AddNewOrderLine

Add an order line to a sales order.

Use this function only with a transformation rule.

Use these arguments.

  • newItemId(Long)

  • viewRowImpl(oracle.jbo.server.ViewRowImpl)

DeleteOrderLine

Delete an order line from a sales order.

Use this function only with a transformation rule.

Arguments.

  • fulfillmentLineId(Long)

  • viewRowImpl(oracle.jbo.server.ViewRowImpl)

For example:

  • Delete fulfillment line 1 and fulfillment line 2

Note that viewRowImpl(oracle.jbo.server.ViewRowImpl) represents the current object instance. For example, a fulfillment line record.

Functions You Can Use with Rules On an Orchestration Process

Use these functions in a rule that you create on an orchestration process. You can't use them with a product transformation, orchestration process assignment, or routing rule.

These functions work at the attribute level. You can find them on the Functions tab of the Expression Builder dialog as the first entries under each object.

You can also use predefined date functions on each date attribute.

Date Functions You Can Use On an Orchestration Process

Function

Description

getAdjustedDate(Timestamp, Double)

Add or subtract the value of argument Double (in days) from the Timestamp argument, depending on the sign, and then return the result in the Timestamp argument.

subtractFromDate(Timestamp, Timestamp)

Subtract the value of the second Timestamp argument from the first Timestamp argument.

If the second Timestamp argument is empty, then subtractFromDate subtracts the current date from the first Timestamp argument.

subtractFromDate returns the number of days as a BigDecimal() value.

getConvertedDate(Object)

Convert a type of date object in the datetime data type.

current_date

Get the system date as a datetime data type.

Change Management Functions You Can Use On an Orchestration Process

Function

Description

hasChanges()

Determine whether extensible flexfield values in the change order are different from values that the previous version of the sales order contains.

getAttribute(String)

Get the name of an attribute.

Use getAttribute on the order header, fulfillment line, orchestration process, or task.

getTransactionalAttribute(String)

Get the name of a transactional attribute.

You can use getTransactionalAttribute only on a fulfillment line.

getFlexContext(String)

Gets the name of the extensible flexfield context.

Use getFlexContext only on a fulfillment line.

You can also use these functions. You must prefix the attribute name with an underscore (_), and you must enclose the attribute name in quotation marks.

Function

Description

attributeChanged(String)

Determine whether the value of an attribute in the change order is different from the value that the previous version of the sales order contains.

Use it on the order header, fulfillment line, or extensible flexfield context.

getFlexAttributeValue(String)

Get the value of an extensible flexfield attribute of data type String.

Use it only on an extensible flexfield context.

getFlexAttributeDateValue(String)

Gets the value of an extensible flexfield attribute of data type Date in time stamp format.

Use it only on an extensible flexfield context.

getFlexAttributeNumValue(String)

Get the value of an extensible flexfield attribute of data type Number.

Use it only on an extensible flexfield context.

For details, see Use Extensible Flexfields to Integrate Order Management with Other Oracle Applications.

Example of Choosing a Function

Use the Functions tab in the Expression Builder dialog to get a list of arguments you can use. For example, with method getFlexAttributeDateValue.

tab Functions in dialog Expression Builder