This chapter includes the following sections:
BPM 12c supports standard Groovy scripts. For more information, see chapter "Writing BPM Scripts" in Developing Business Processes with Oracle Business Process Management Studio.
The following elements have migration limitations:
Scripts using the Plumtree component
Project using enumerations introspected from JAR files
Project Dependency
For more information on these limitations, please see Limitations.
Table 6-1 shows how different BPM 10gR3 Business Process Language components are migrated to BPM 12c scripting.
Table 6-1 Business Process Language Code Migration
Functionality | 12c Migration |
---|---|
Business Process Language |
BPM Scripting support in 12c is based on Groovy |
Business Objects |
Partially migrated. Attributes of type RegExp, Attributes : valid values, and Attributes : check expression are not migrated and require scripting to be implemented. |
Skins (PBL, Java, VBasic) |
Migrated to Groovy script functionality |
Scripting Language Exception Handling |
Migrated on a best efforts basis. See Business Process Language Control Flow Statements Migration |
Simple Types |
Migrated. See Business Process Language Basic Types Migration |
Complex Types |
Java types, business objects and XML schemas are migrated. You must migrate dependent Java libraries manually. Schemas / XSDs are inferred to the extent used in the project and migrated. |
Activities (Automatic and Method) |
Migrated as scripting tasks. |
Multiple Gateways with scripting code |
Migrated as scripting tasks. |
Language Structure |
See Business Process Language Control Flow Statements Migration |
Embedded SQL |
Not available |
Web Services Invocations |
Not available |
Predefined Variables |
BPM 12c supports a new set of predefined variables. For more information, see "Handling Information in Your Process Design" in Developing Business Processes with Oracle Business Process Management Studio. |
BPM Scripting is based on standard Groovy and uses its control flow statements.
The BPM migration utility uses the control flow statement mappings shown in Table 6-2 to migrate Business Process Language scripts from BPM 10gR3 to Groovy scripts in BPM 12c.
Table 6-2 Control Flow Statements Migration
Business Process Language | Groovy |
---|---|
case/when/else |
switch/case/default |
name do end |
name: {} |
for/in/do |
for(){} |
for each/in |
for(){} |
for each in where |
for(){if(){}} |
if/then/elseif/else |
if(){}elseif{}else{} |
while |
while(){} |
is |
instanceof |
label:statement |
label:statement |
(mapped ref example) intervals[].hours |
intervals.collect() {XmlDuration it -> it.hours} |
do/on excep/on exit |
try{}catch(){}finally{} |
Business Process Language basic types in the BPM 10gR3 scripts are migrated to standard Java types.
Table 6-3 shows the mapping used to migrate Business Process Language basic types.
Table 6-3 Business Language Basic Types Migration
Business Process Language | BPM Scripting |
---|---|
Bool |
java.lang.Boolean |
Fuego.Internal.Bool |
java.lang.Boolean |
Fuego.Internal.Int |
java.lang.Integer |
Fuego.Internal.Real(32) |
Float |
Fuego.Internal.Real(64) |
java.lang.Double |
Fuego.Internal.Real |
java.lang.Double |
Fuego.Internal.RegExp |
java.util.regex.Pattern |
Fuego.Internal.Str |
java.lang.String |
Fuego.Internal.Interval |
com.oracle.scripting.lib.xml.datatype.XmlDuration |
Fuego.Internal.Time |
com.oracle.scripting.lib.xml.datatype.XmlCalendar |
Interval |
com.oracle.scripting.lib.xml.datatype.XmlDuration |
Int |
java.lang.Integer |
Fuego.Internal.Logger |
com.oracle.scripting.logger.ScriptLogger |
Real(32) |
java.lang.Float |
Real(64) |
java.lang.Double |
Real |
java.lang.Double |
String |
java.lang.String |
Time |
com.oracle.scripting.lib.xml.datatype.XmlCalendar |
Type[] (indexed array) |
java.util.List<Type> |
TypeA[TypeB] (associative array) |
java.util.Map<TypeB, TypeA> |
TypeA[ordered TypeB] (sorted associative array) |
java.util.SortedMap<TypeB, TypeA> |
Any (only for scripting) |
java.lang.Object |
After migrating Business Process Languages elements, there are additional activities to perform.
Actions to take after migrating Business Process Language elements include:
If there are Web service invocations in your scripts, use the Web Services adapter
As an alternative to XSLT transformations, use scripting where complex transformations are needed
Map complex data types as plain Java objects (POJOs)