subtraction year DateTime and Interval Functions

22-20 Modeling and Implementation Guide for Oracle Business Process Management

22.12.2 Using Time Literals

You can assign a value to a data object of type Time using literals. You can also use time literals to provide a parameter of type time to a method. Time literals enable you to define a date using different levels of precision. The following list uses an example date to show the different time literals that you can use to specify a variable of type Time: ■ 13:30 ■ 13:30:23 ■ 13:30:23.001023 ■ 13:30:23.001023Z ■ 13:30:23.001023-05 ■ 13:30:23.001023-3:30 ■ 1979-02-19 ■ 1979-02-19 13:30 ■ 1979-02-19 13:30:23 ■ 1979-02-19 13:30:23.001023 ■ 1979-02-19 13:30:23.001023Z ■ 1979-02-19 13:30:23.001023-05 ■ 1979-02-19 13:30:23.001023-3:30 ■ 1979-02-19T13:30 ■ 1979-02-19T13:30:23 ■ 1979-02-19T13:30:23.001023 ■ 1979-02-19T13:30:23.001023Z ■ 1979-02-19T13:30:23.001023-05 ■ 1979-02-19T13:30:23.001023-3:30 ■ 19790219T ■ 19790219T133023.001023-330

22.12.3 Using Interval Literals

You can assign a value to a data object of type Interval using literals. You can also use interval literals to provide a parameter of type interval to a method. Interval literals enable you to define a date using different levels of precision. To define a time literal you must use a combination of values and followed by their time unit enclosed by single quotes. Table 22–6 shows the available time unit fields. Table 22–6 Time Unit Suffixes Time Unit Suffix Description Y Year Writing Expressions 22-21 Table 22–7 shows examples of interval literals:

22.12.4 Using Array Literals

You can assign a value to a data object of type Interval using literals. You can also use interval literals to provide a parameter of type interval to a method. To define an array literal you must provide a list of values separated by comas and enclosed by brackets. You can also specify the values using literals or attributes from data objects. The following list shows examples of array literals: ■ [ One, Two, Three ] ■ [ 1, 2, 3 ] ■ [ customer.firstName, customr.lastName ]

22.13 XPath BPM Extension Functions

The BPM Extension Functions enable you to access the following elements using XPath: ■ Process and Project Data Objects ■ Arguments ■ Activity Instance Attributes In XPath this is the only way of accessing the value of the described elements in your BPMN process.

22.13.1 getActivityInstanceAttribute

Returns the value of a specific activity instance attribute. See Section 8.4, Introduction to Activity Instance Attributes for more information about the supported activity instance attributes. M Month d or D Day h or H Hour m Minutes s or S Seconds x Microseconds Table 22–7 Examples of interval literals Example Description 1Y1M3h2m1.500s 1 year, 1 month, 3 hours, 2 minutes and 1.500 milliseconds