18 Oracle Business Process Management Custom WLST Commands

This chapter provides detailed descriptions of custom WLST commands for Business Process Management (BPM), including command syntax, arguments and command examples.

This chapter lists and describes the custom WLST commands for Oracle Business Process Management.

18.1 BPMLifecycleAdmin Command Group

Table 18-1 lists and describes the BPMLifecycleAdmin commands for project lifecycle administration.

Table 18-1 BPMLifecycleAdmin Commands for Project Lifecycle Administration

Use this command... To... Use with WLST...

create_public_share

Create a public share.

Offline

unlock_public_share

Unlock a public share.

Offline

export_public_share

Export a public share to the file system.

Offline

delete_public_share

Delete a public share.

Offline

publish_template

Publish a template to MDS.

Offline

export_template

Export a template to the file system.

Offline

delete_template

Delete a template from MDS.

Offline

connectProjectRepository

Establish the connection to the MDS project repository.

Offline

disconnectProjectRepository

Close the connection from MDS project repository.

Offline

importProject

Import a project from disk into the project repository.

Offline

createProject

Create a public share project based on a Template project.

Offline

deleteProject

Delete a project from the project repository.

Offline

exportProject

Export a project stored in the repository to disk.

Offline

unlockProject

Unlock a project.

Offline


18.1.1 create_public_share

Command Category: BPMLifecycleAdmin Commands

Use with WLST: Offline

18.1.1.1 Description

Use this command to create a public share from a template. The template must exist in MDS.

18.1.1.2 Syntax

create_public_share(composerUser, composerPassword, connectionURL, templateName, publicshareId, mdsconfigLocation, [Override], [oracleHome] )
Argument Definition
composerUser The Business Process Composer user who performs the current operation.
composerPassword
BPM Composer user's password
connectionURL
JNDI connection URL to the security server service in format host:port
templateName
Name of the template in MDS
publicshareId
Name of the public share to be created
mdsconfigLocation
Location of the mds-config.xml to be used to connect to MDS
projectLocation The path where the public share will be created. If the path does not exists it will be created. The root is '/'.
Override
Enables you to override the public share if a public share exists in MDS with the same name. The template is not overwritten when you execute this command.
oracleHome
Optional. The Oracle home to be used.

18.1.1.3 Examples

The following example creates a public share named Sample_PublicShare. It is based on the template with name Sample_Template. The name of the public share is Sample_PublicShare, and the location of the mds-config.xml file is /tmp/mds-config.xml.

create_public_share('user_name', 'password', 'host:port','Sample_Template', 'Sample_PublicShare','/tmp/mds-config.xml')

The following example creates a public share named Sample_PublicShare. It is based on the template named Sample_Template that exists in MDS. The public share, not the template, is overridden. The location of the mds-config.xml file is /tmp/mds-config.xml.

create_public_share('user_name', 'password', 'host:port','Sample_Template', 'Sample_PublicShare','/tmp/mds-config.xml','true')"

18.1.2 unlock_public_share

Command Category: BPMLifecycleAdmin Commands

Use with WLST: Offline

18.1.2.1 Description

Use this command to unlock a public share. For example, when you create a project by using the Ant task create_public_share command, the project is created as locked. You can then unlock it by using the unlock_public_share command.

A lock is also set by enabling or disabling the check box enable sharing in the project creation page in Oracle Business Process Composer.

It is also released when the user publishes a project from Business Process Composer.

The public share must exist in MDS.

18.1.2.2 Syntax

unlock_public_share(composerUser, composerPassword, connectionURL, publicshareId, mdsconfigLocation, [oracleHome] )
Argument Definition
composerUser The Business Process Composer user who performs the current operation.
composerPassword
BPM Composer user's password
connectionURL
JNDI connection URL to the security server service in format host:port
publicshareId
Name of the public share to be unlocked
mdsconfigLocation
Location of the mds-config.xml to be used to connect to MDS
oracleHome 
Optional. The Oracle home to be used

18.1.2.3 Example

The following example unlocks a public share named Sample_PublicShare. The location of the mds-config.xml file is /tmp/mds-config.xml.

unlock_public_share('user_name', 'password', 'host:port','Sample_PublicShare', '/tmp/mds-config.xml')

18.1.3 export_public_share

Command Category: BPMLifecycleAdmin Commands

Use with WLST: Offline

18.1.3.1 Description

Use this command to export the public share from MDS to the file system.

18.1.3.2 Syntax

export_public_share(composerUser, composerPassword, connectionURL, publicshareId,fsLocation, mdsconfigLocation, [oracleHome] )
Argument Definition
composerUser The Business Process Composer user who performs the current operation.
composerPassword
BPM Composer user's password
connectionURL
JNDI connection URL to the security server service in format host:port
publicshareId 
Name of the public share to be exported
fsLocation
File system location where the project is to be downloaded
mdsconfigLocation 
Location of the mds-config.xml to be used to connect to MDS
oracleHome
Optional. The Oracle home to be used

18.1.3.3 Example

The following example specifies the public share name as Sample_PublicShare, the file system location as /tmp, and the location of the mds-config.xml file as /tmp/mds-config.xml.

export_public_share('user_name', 'password', 'host:port','Sample_PublicShare','/tmp', '/tmp/mds-config.xml')

18.1.4 delete_public_share

Command Category: BPMLifecycleAdmin Commands

Use with WLST: Offline

18.1.4.1 Description

Use this command to delete a public share from MDS. Executing this command requires that the public share is not locked.

18.1.4.2 Syntax

delete_public_share(composerUser, composerPassword, connectionURL, publicshareId, mdsconfigLocation, [releaseLock], [oracleHome] )
Argument Definition
composerUser The Business Process Composer user who performs the current operation.
composerPassword
BPM Composer user's password
connectionURL
JNDI connection URL to the security server service in format host:port
publicshareId
Name of the public share to be deleted
mdsconfigLocation
Location of the mds-config.xml to be used to connect to MDS
releaseLock
Optional. If the public share is locked, this lock can be released and the delete operation completed. You can set this attribute to either true or false. If not specified, default value is false.
oracleHome
Optional. The Oracle home to be used

18.1.4.3 Examples

The following example specifies the name and location of a public share to be deleted.

delete_public_share('Sample_PublicShare','/tmp/mds-config.xml')

The following example specifies the name and location of a public share to be deleted, and that the public share should be deleted even if locked.

delete_public_share('user_name', 'password', 'host:port','Sample_PublicShare','/tmp/mds-config.xml','true')

18.1.5 publish_template

Command Category: BPMLifecycleAdmin Commands

Use with WLST: Offline

18.1.5.1 Description

Use this command to publish the template from the file system to MDS.

18.1.5.2 Syntax

publish_template(composerUser, composerPassword, connectionURL, templateName,fsLocation, mdsconfigLocation, [Override], [oracleHome] )
Argument Definition
composerUser The Business Process Composer user who performs the current operation.
composerPassword
BPM Composer user's password
connectionURL
JNDI connection URL to the security server service in format host:port
templateName
Name of the template to be published
fsLocation
File system location of the template project
mdsconfigLocation
Location of the mds-config.xml to be used to connect to MDS
projectLocation The path where the public share will be created. If the path does not exists it will be created. The root is '/'.
Override
When you publish a template in MDS, this attribute enables you to override an existing template with the same name. Can either be 'true' or 'false'. If not specified, default value is 'false'.
oracleHome
Optional. The Oracle home to be used

18.1.5.3 Example

The following example publishes a template named Sample_Template_Name_MDS. to the root folder.

f('user_name', 'password', 'host:port','Sample_Template','/tmp/MyTemplate','/', '/tmp/mds-config.xml')

The following example publishes a template named Sample_Template_Name_MDS.to the '/WorkingOn/' folder.

publish_template('user_name', 'password', 'host:port','Sample_Template','/tmp/MyTemplate','/WorkingOn', '/tmp/mds-config.xml')

18.1.6 export_template

Command Category: BPMLifecycleAdmin Commands

Use with WLST: Offline

18.1.6.1 Description

Use this command to export the template from MDS to the file system.

18.1.6.2 Syntax

export_template(composerUser, composerPassword, connectionURL, templateName, fsLocation, mdsconfigLocation, [oracleHome] )
Argument Definition
composerUser The Business Process Composer user who performs the current operation.
composerPassword
BPM Composer user's password
connectionURL
JNDI connection URL to the security server service in format host:port
templateName
Name of the template to be exported
fsLocation 
File system location where the project is to be downloaded
mdsconfigLocation
Location of the mds-config.xml to be used to connect to MDS
oracleHome
Optional. The Oracle home to be used

18.1.6.3 Example

The following example specifies the template name as Sample_Template, the file system location as /tmp, and the location of the mds-config.xml file as /tmp/mds-config.xml.

export_template('user_name', 'password', 'host:port','Sample_Template','/tmp','/tmp/mds-config.xml')

18.1.7 delete_template

Command Category: BPMLifecycleAdmin Commands

Use with WLST: Offline

18.1.7.1 Description

Use this command to delete the template from MDS.

18.1.7.2 Syntax

delete_template(composerUser, composerPassword, connectionURL, templateName,mdsconfigLocation, [oracleHome] )
Argument Definition
composerUser The Business Process Composer user who performs the current operation.
composerPassword
BPM Composer user's password
connectionURL
JNDI connection URL to the security server service in format host:port
templateName
Name of the template to be deleted
fsLocation
File system location of the template project
mdsconfigLocation
Location of the mds-config.xml to be used to connect to MDS
projectLocation The path where the public share will be created. If the path does not exists it will be created. The root is '/'.
oracleHome
Optional. The Oracle home to be used

18.1.7.3 Example

The following example deletes the template named Sample_template from MDS.

delete_template('weblogic', 'welcome1', 'host:port','/Sample_template','/tmp/mds-config.xml')

18.1.8 connectProjectRepository

Command Category: BPMLifecycleAdmin Commands

Use with WLST: Offline

18.1.8.1 Description

Use this command to establish the connection to the MDS project repository.

18.1.8.2 Syntax

connectProjectRepository(connectionURL, mdsConfigLocation, composerUser, composerPassword, [mdsDbUser], [mdsDbPassword])
Argument Definition
connectionURL JNDI connection URL to the security server service in format: host:port
mdsConfigLocation The location of the mds-config.xml to be used to connect to MDS
composerUser BPM Composer user. This user will perform the current operation.
composerPassword BPM Composer user's password.
mdsDbUser Optional. Overrides the mds database username stored in the mds-config.xml file.
mdsDbPassword Optional. Overrides the MDS database password stored in the mds-config.xml file.

18.1.8.3 Examples

connectProjectRepository(connectionURL='localhost:7001', mdsConfigLocation='/home/user/mds-config.xml', composerUser='weblogic', composerPassword='welcome1')

connectProjectRepository(connectionURL='localhost:7001', mdsConfigLocation='/home/user/mds-config.xml', composerUser='weblogic', composerPassword='welcome1', mdsDbUser='DEV_MDS', mdsDbPassword='dbPassword')

18.1.9 disconnectProjectRepository

Command Category: BPMLifecycleAdmin Commands

Use with WLST: Offline

18.1.9.1 Description

Use this command to close the connection from MDS project repository.

18.1.9.2 Syntax

disconnectProjectRepository()

18.1.9.3 Example

disconnectProjectRepository()

18.1.10 importProject

Command Category: BPMLifecycleAdmin Commands

Use with WLST: Offline

18.1.10.1 Description

Use this command to import a project from disk into the project repository. All projects will be imported as a template—that is, it does not matter if the imported project is a template or public shared.

18.1.10.2 Syntax

importProject(srcDir, toName, [toPath], [override])
Argument Definition
srcDir The file system location of the template project.
toName The file system location of the template project.
toPath [Optional] The path where the template will be imported. If the path does not exists it will be created. If not specified, the root '/' will be used.
override [Optional] Specifies whether the import should override an existing template with the same name. If not specified, 'false' will be used.

18.1.10.3 Examples

importProject(srcDir='/home/user/myFolder/myTemplate', toName='NewTemplateName')

importProject(srcDir='/home/user/myFolder/myTemplate', toName='NewTemplateName', toPath='/NewFolder', override='true')

18.1.10.4 Security Constraints

None. All users are allowed to import a project template. These templates are imported by default with public permissions granted to all users.

18.1.11 createProject

Command Category: BPMLifecycleAdmin Commands

Use with WLST: Offline

18.1.11.1 Description

Use this command to create a public share project based on a template project.

18.1.11.2 Syntax

createProject(fromId, toName, [toPath])
Argument Definition
fromId The identifier of the template in MDS.
toName The name of the public share to be created.
toPath [Optional] The path where the public share will be created. If the path does not exists it will be created. If not specified, the root '/' will be used.

18.1.11.3 Example

createProject(fromId='/SampleTemplate', toName='SamplePublicShare')

createProject(fromId='/folder/SampleTemplate', toName='SamplePublicShare', toPath='/newFolder')

18.1.11.4 Security Constraints

None. All the users are allowed to create public shared based on the templates. All the templates in MDS are public by default.

18.1.12 deleteProject

Command Category: BPMLifecycleAdmin Commands

Use with WLST: Offline

18.1.12.1 Description

Use this command to delete a project from the project repository.

18.1.12.2 Syntax

deleteProject(id, [type], [breakLinks])
Argument Definition
id The identifier of the project to be deleted.
type [Optional] Specified if the project is a template or a public share. Valid values: 'TEMPLATE', 'PUBLIC_SHARED'. If not specified, 'TEMPLATE' is assumed.
breakLinks [Optional] Only valid when deleting templates. If there are public shares linked to this template, specifies whether the links should be removed or not. Default: 'true'

18.1.12.3 Example

deleteProject(id='/SampleTemplate', type='TEMPLATE', breakLinks='true')

deleteProject(id='/folder/SamplePublicShare', type='PUBLIC_SHARED')

18.1.12.4 Security Constraints

ADMIN | OWNER

To perform a delete operation, the user must have the role of either ADMIN or OWNER of the project to delete.

18.1.13 exportProject

Command Category: BPMLifecycleAdmin Commands

Use with WLST: Offline

18.1.13.1 Description

Use this command to export a project stored in the repository to disk.

18.1.13.2 Syntax

exportProject(id, toDir, [type])
Argument Definition
id The identifier of the project to be exported.
toDir The file system location where the project has to be downloaded. If the path does not exists it will be created.
type [Optional] Specified if the project is a template or a public share. Valid values: 'TEMPLATE', 'PUBLIC_SHARED'. If not specified, 'TEMPLATE' is assumed.

18.1.13.3 Examples

exportProject(id='/SampleTemplate', toDir='/home/user/myFolder', type='TEMPLATE')

exportProject(id='/aFolder/SamplePublicShare', toDir='/home/user/myFolder', type='PUBLIC_SHARED')

18.1.13.4 Security Constraints

ADMIN | OWNER | EDITOR | VIEWER

The user needs at least VIEWER permission of the project to be exported.

18.1.14 unlockProject

Command Category: BPMLifecycleAdmin Commands

Use with WLST: Offline

18.1.14.1 Description

Unlock a project. Only public share projects can be unlocked.

18.1.14.2 Syntax

unlockProject(id)
Argument Definition
id The identifier of the project to be unlocked.

18.1.14.3 Example

unlockProject(id='SamplePublicShare')

18.1.14.4 Security Constraints

ADMIN | OWNER | EDITOR

A project can be unlocked only by the same user or application that locked it. The exception is the administrator user who can unlock a project regardless of the user or application that locked it.

An application can be Oracle Business Process Composer, Oracle Business Process Management Studio, or a generic application. WLST functions are considered generic applications.

Note:

Because there is no WLST lock operation for projects, an owner or editor user cannot release a project by using the WLST unlockProject command if the project was locked by a different application. In this case, only an administrator user can unlock the project.