Using the BWDesign Utility

The bwdesign utility provides a command-line interface for creating, validating, importing, or exporting resources stored in a workspace.

Before you begin
  1. To use the bwdesign utility, open a terminal and navigate to the BW_HOME\bin.
  2. In the command-line type: bwdesign -data <TIBCO_BusinessStudio_workspace_absolutePath>. For example, bwdesign -data C:\myWorkspace.
  3. To view the arguments and options for a command, open a terminal, navigate to the BW_HOME\bin folder, and type the bwdesign help command at the command line.
Command name and Syntax Description
cd

SYNTAX:

cd path

Changes the current working directory to the specified folder.

Arguments:

  • path - The path of the new current working directory
clear

SYNTAX:

clear

Clears the command-line console.
connectResource

SYNTAX:

 connectResource [process path] [process property] [resource path]

Assigns the Shared resource to the process property.

Arguments:

  • process path - Process path to which the Process property belongs
  • process property - Name of the process property to assign the Shared Resource
  • resource path - Shared Resource Path to be assigned to the process property

copyArtifacts

SYNTAX:

 copyArtifacts <option> <FROM_FILE> <TO_FOLDER> <ResourceName(Optional)>

Copy and Paste a BW file with updated references. If no option is provided a duplicate artifact will be created if the artifact being copied is already present at destination.

Arguments:

  • New Resource Name (optional) - A new name for the resource to be renamed, Name of file should be without extension.
  • FROM_FILE - The source location of the file to copy
  • TO_FOLDER - The target destination of the file.

Options:

  • -f - If the artifact is already present at destination, it will be overwritten. This is optional.
  • -s - This will skip dependency copy. This is optional.

copyModuleProp

SYNTAX:

 copyModuleProp [options] [source module] [target module]

Copies BW Module Properties and Groups from source module to target module. -o and -s are optional arguments, if not present it will copy module properties with modified unique name.

Arguments:

  • target module - The name of the module to which the module property or group is to be copied.
  • source module - The name of the module from where the module property or group is to be copied.

Options:

  • -m -Copies the specified module property from source module to target module. Written as <copyModuleProp -m [source module]/Group/moduleProperty [target module]>.
  • -o - Overrides the value of the target module property by source module property.
  • -a - Copies all the module properties and groups from source module to target module. Written as <copyModuleProp -a [source module] [target module]>.
  • -s - Does not copy module properties already present at destination.
  • -g - Copies the specified the groups from source module to target module. Written as <copyModuleProp -g [source module]/Group [target module].

createActivity

SYNTAX:

  system:createActivity [Module Name] [Process Name With Complete Namespace] [Activity Type]

Creates an Empty Activity in the specified Process.

Arguments:

  • Module Name - The name of the Module.
  • Activity Type -The Type of Activity to be created
  • Process Name - The process Name with complete namespace under which the Activity to be created.

copyModuleProp

SYNTAX:

 copyModuleProp [options] [source module] [target module]

Copies BW Module Properties and Groups from source module to target module. -o and -s are optional arguments, if not present it will copy module properties with modified unique name.

Arguments:

  • target module - The name of the module to which the module property or group is to be copied.
  • source module - The name of the module from where the module property or group is to be copied.

Options:

  • -m -Copies the specified module property from source module to target module. Written as <copyModuleProp -m [source module]/Group/moduleProperty [target module]>.
  • -o - Overrides the value of the target module property by source module property.
  • -a - Copies all the module properties and groups from source module to target module. Written as <copyModuleProp -a [source module] [target module]>.
  • -s - Does not copy module properties already present at destination.
  • -g - Copies the specified the groups from source module to target module. Written as <copyModuleProp -g [source module]/Group [target module].

createApplicationProfile

SYNTAX:

createApplicationProfile [applicationName] [profileName]

Create an Application Profile in the specified application module.

Arguments:

  • application name - The name of the application module where the Application Profile is to be created
  • profile name - The name of the new Profile to be created

createBWApplicationModule

SYNTAX:

createBWApplicationModule [BW application name] [main process name] [version]

Creates a BW Application Project in current workspace with specified application and main process name.

Arguments:

  • BW Application Name - Name of the BW Application to be created
  • Version - BW Application version
  • Main Process Name - Name of the main process

createCatch

SYNTAX:

  system:createCatch [Module Name] [Process Name with Complete Namespace] [Catch Type]

Create an Empty Catch area in the specified Process.

Arguments:

  • Catch Type -The Type of Catch can be Simply Catch or CatchAll.
  • Module Name - The name of the Module.
  • Process Name - The process name with complete Namespace, under which the Catch Area to be created.

createGroup

SYNTAX:

createGroup [Options] [project Name] [package Namespace] [ Process Name]]

Create Groups for Process.

Arguments:

  • Project Name -The name of the project.
  • Package namespace - The package namespace of the process.
  • Process Name - The name of the process under which the group need to be created

Options:

  • -re - Create RepeatOnError Group.
  • -r - Create Repeat Group.
  • -s - Create Scope Group.
  • -c - Create Critical Section Group.
  • -f - Create For Each Group.
  • -w - Create While Group.
  • -i -Create Iterate Group.
  • -l - Create Local Transaction Group.

createPackage

SYNTAX:

createPackage [project Name] [package Namespace]

Create an Empty Package in the specified project.

Arguments:

  • Project Name - The name of the project under which the package to be created.
  • Package namespace - The namespace of the package to be created.

createProcess

SYNTAX:

 system:createProcess [option] [moduleName] [processName] [packageName] [modifier]

Create an Empty Process or Sub process in your imported Project.

Arguments:

  • modifier - (optional), Default Value: public, The type of process you want to create, values can be "public" or "private".
  • process - The name of the newly created process.
  • package - The name of the package under which the empty process is to be created, can also be a new package name
  • module - The name of the module you want to create a new empty process in.

Options:

  • -p - will create a Main Process.
  • -s - will create a Subprocess.

createSwaggerOperation

SYNTAX:

createSwaggerOperation [Create Option] [Operation option] [Process Path] [Swagger File Path] [Resource Path]

Create a REST service or reference binding in the mentioned process using a Swagger file for a specific resource path.

Arguments:

  • Process Path - Path of the process where the Service or Reference is to be created.
  • Swagger File Path - Path of the swagger file from which the Service or Reference is to be created.
  • Resource Path - Path of the resource for which the Service or Reference is to be created.

Options:

  • -s - Use this as Create Option for creating REST Service Binding.
  • -r - Use this as Create Option for creating REST Reference Binding.
  • -all - Create a REST service with all operations present in the mentioned resource path. This is only applicable for creating REST service binding.
  • -get - Create GET Invoke operation with reference binding.
  • -put - Create PUT Invoke operation with reference binding.
  • -post - Create POST Invoke operation with reference binding.
  • -patch -Create PATCH Invoke operation with reference binding.
  • -delete - Create DELETE Invoke operation with reference binding.
  • -head - Create HEAD Invoke operation with reference binding.
  • -option - Create OPTION Invoke operation with reference binding.

createBinding

SYNTAX:

createBinding [option] [module name] [process name with complete Namespace] [Service Name]

Creates a SOAP or Rest Binding to the Service of the Process.

Arguments:

  • ModuleName - Project/Module Name.
  • package.processName - Process Name Along with package name eg package.process.
  • Service Name - The name of the Service of the Process.

Options:

  • -r - Create Rest Binding.
  • -s -Create SOAP Binding.
createWSDL

SYNTAX:

createWSDL [Module Name][ Process Name with Complete Namespace] [WSDL Name] [Operation Type]

Create WSDL Service for Process.

Arguments:

  • WSDL Name - The name of the WSDL.
  • Module Name - The name of the Module.
  • Process Name - The Process Name with Complete Namespace.

Options:

  • -ImplementConstructorOperation - Implement Constructor Operation for WSDL.
  • -InvokeOperation - Invoke Operation for WSDL.
  • -ImplementProxyOperation -Implement Proxy Operation for WSDL.
  • -ImplementOperation - Implement Operation for WSDL.

deleteApplicationProfile

SYNTAX:

deleteApplicationProfile [moduleName] [profileName]

Delete an Application Profile in the specified module.

Arguments:

  • module name - The name of the module from which the Application Profile is to be deleted.
  • profile name - The name of the new Profile to be deleted.

deletePackage

SYNTAX:

system:deletePackage [project Name] [package Namespace]

Deletes a Package in the specified project.

Arguments:

  • Project Name - The name of the project under which the package to be deleted.
  • Package namespace -The namespace of the package to be deleted.

diagram:gen_diagrams

SYNTAX:

diagram:gen_diagrams [project]

Save each process diagram of a project in a .bwd format.

Arguments:

  • outputfolder - Optional, it is used to save the diagrams in a given path.
edition

SYNTAX:

edition

Prints out the edition of this TIBCO Business Studio for BusinessWorks.
execute

SYNTAX:

execute file

Runs a batch script file containing a set of commands to run in sequence.

Arguments:

  • file - Script file, which contains a set of commands run in sequence.
exit

SYNTAX:

exit

Exits the command-line console.
generate_manifest_json

SYNTAX:

generate_manifest_json [options] [ear_location] [manifest_location]

Creates a manifest.json or ear from the ActiveMatrix BusinessWorks EAR file.

Arguments:

  • manifest_location or ear_location - The destination folder that contains the created manifest.json or ear file.
  • ear_location - The location of the ActiveMatrix BusinessWorks EAR file.

Options:

  • -project - Name of the project for which the manifest.json file is created.
  • -ear - Use this flag to generate a new EAR file from an EAR file created on earlier versions of TIBCO Business Studio for BusinessWorks.
linkActivity

SYNTAX:

linkActivity [Project Name] [Process Name with Complete Namespace] {[Src Activity] [Destination Activity]|[Link Name]} [Type] [Expression]

Create Link between activities selected.

Arguments:

  • Operation Type Name -The option indicates whether new link to be created/ Updated [-c|-u]..
  • Xpath Expression -The expression, if the option selected is -se.
  • Destination Activity -The name of the Dest Activity to which Link to be created.
  • Module Name -The name of the project..
  • Link Name -The name of the Link which needs to be updated
  • Process Name - The process name with complete namespace..
  • Source Activity - The name of the Src Activity from which Link to be created.

Options:

  • -o - Otherwise Condition.
  • -s -Success Type.
  • -e - Error Type.
  • -sc - Success with Condition Type.

ls

SYNTAX:

ls [-f|-p] [-a]

List the projects in the current workspace or the files in the current working directory.

Arguments:

  • a - List all the entities including hidden ones.
  • f - List the files in the file system.
  • p - List the projects in the current workspace.
moduleProperty

SYNTAX:

moduleProperty [operation option] [option] [module property path] [module property type] [no of module properties]

Create a Module Property in the specified module/group.

Arguments:

  • module property Path - The path where the module property is to be created. Can be written as : projectName OR projectName/GroupName.
  • module property type - The type of module property to be created. Type can be one of the listed : string, boolean, dateTime, long, int, password, proxy, rv, smtp, sslclient, sslserver, subject, tcpconnection, threadpool, trust, oauth, notify, ldap, keystore, jms, jdbc, javaglobal, useridentity, httpconnector, httpclient, ftpconnection, dataformat.
  • no of module properties - The number of module properties to be created.

Options:

  • -c - Creates n number of module properties in a specified module/Group. Written as <moduleProperty -c [modulePropertyPath] [module property type] [no of module properties]>.
  • -u - Updates the specified module property's value, name, type based on specified option. Written as <moduleProperty -u [option] [modulePropertyPath] [new name/value/type]>.
  • -d - Deletes the specified module property from the specified module/Group. Written as <moduleProperty -d [moduleProperty path]>.
  • -n - Option used with -u, which is used to update the name of specified module property. Written as <moduleProperty -u -n [modulePropertyPath] [new property name]>.
  • -v - Option used with -u, which is used to update the value of specified module property. Written as <moduleProperty -u -v [modulePropertyPath] [new property value]>.
  • -t - Option used with -u, which is used to update the type of specified module property. Written as <moduleProperty -u -t [modulePropertyPath] [new property type]> bwdesign>.

processProperty

SYNTAX:

processProperty [options][module name] [process name with complete Namespace] [PropertyName] [Process property type] [Value of Process properties]

Creates/updates/deletes process property.

Arguments:

  • ModuleName - Project/Module Name.
  • package.processName - Process Name Along with package name eg package.process.
  • ProcessPropertyName - Process Property Name.
  • dataType - Data Type Name.
  • Value - DefaultValue.

Options:

  • -c -Create new Process property..
  • -d - Delete Process Property.
  • -u -n - Update Process Property Name..
  • -u -t - Update Process Property Type.
  • -u -v - Update Process Property Value.
Note: For process property type, use the same name as shown in Studio.
processVariable

SYNTAX:

processVariable [options][module name] [process name with complete Namespace] [VariableName] [Value of Process variables...]

Creates/updates/deletes process variable.

Arguments:

  • ModuleName - Project/Module Name.
  • package.processName - Process Name Along with package name eg package.process
  • ProcessVariableName - Process Variable Name
  • dataType - Data Type Name, [Not required during deletion, update of name and default value]
  • Value - DefaultValue, [Not required during deletion, update of name and data Type]
  • ProcessVariableNewName - New Name, [Not required during deletion, update of value and data Type]

Options:

  • -c - Create new Process Variable.
  • -d -Delete Process Variable.
  • -u -n - Update Process Variable Name.
  • -u -t - Update Process Variable Type.
  • -u -v - Update Process Variable Value
pwd

SYNTAX:

pwd

Prints the location of the current working directory.
quit

SYNTAX:

quit

Exits the command-line console.
renameActivity

SYNTAX:

renameActivity [project Name] [Process Name With Complete Namespace] [Activity Name] [New Activity Name]

Rename an Existing Activity in the specified Process.

Arguments:

  • Project Name - The name of the project.
  • New Activity Name - The new Name of the Activity.
  • Process Name - The Process Name with Complete Namespace, under which the Activity to be renamed.
  • Activity Name - The Name of the Activity to be renamed.

renameApplicationProfile

SYNTAX:

renameApplicationProfile [moduleName] [oldprofileName] [newprofileName]

Rename an Application Profile in the specified module.

Arguments:

  • module name - The name of the module in which the Application Profile exists.
  • new profile name - The new name for the Profile.
  • old profile name - The old name of the Profile.

setCallProcessName

SYNTAX:

setCallProcessName [project Name] [Source Process Name with complete namespace] [Call process name] [Sub Process Name with Complete package namespace]

Sets a Call process name for the Call Process.

Arguments:

  • Project Name - The name of the project.
  • Call Process Name - The Name of the Call process.
  • Destination Sub Process Name - Destination Sub Process name with complete namespace of package.
  • Source Process Name - The name of the process with complete namespace, under which the Call process to be set.

setSOAPBindingTransportType

SYNTAX:

setSOAPBindingTransportType [module name] [process name with complete Namespace] [Service Name][Transport name] [Resource Connector File Name along with package name eg : package.connectorName]...]

Sets the Transport Type of the SOAP Binding of a Service and attaches the Connector Resource.

Arguments:

  • ModuleName - Project/Module Name.
  • package.processName - Process Name Along with package name eg package.process.
  • Service Name - The name of the Service of the Process.
  • Transport Name - http / jms.
  • Connector Resource File Name -Connector resource Name Along with package name eg package.HttpConnctorResource.

setServicePortType

SYNTAX:

setServicePortType [module name] [process name with complete Namespace] [Service Name] [WSDL File name]

Sets the Process Service Port Type to the Specified WSDL.

Arguments:

  • WSDL Name - The name of the WSDL File.
  • ModuleName - Project/Module Name.
  • package.processName - Process Name Along with package name eg package.process.
  • Service Name -The name of the Service of the Process.
setedition

SYNTAX:

setedition -name -t

EXAMPLE:

setedition -name test.application -t bwcf

Converts projects from their existing editions to this edition of TIBCO Business Studio for BusinessWorks. If the option -name is not selected, this command sets the edition of all the projects in the workspace to the current edition of TIBCO Business Studio for BusinessWorks.

Select the option -name, and provide the names of the projects to be converted.

Provide comma-separated values to convert multiple projects. The -t tag changes the edition to the specified edition. The values to be used for the editions are bwcf, bwe and bwcloud.

Optional. If the -f option is used, the following message is not prompted:

Are you sure you want to change the edition of the given project?

system:create

SYNTAX:

system:create [options]

Alternatively, you can use the create command.

EXAMPLE:

create application test2.application test
Note: This example generates test2.application for the test application module.

Creates resources in the workspace.

Options:

  • --help - Display this help message.
  • -verbose - This parameter prints information regarding the workspace that is used for the create command.

    The success or failure message is printed at all times, even if the verbose flag is not used.

  • application [name] [modules] -v [version]

    Create an application project with the given name, including the given modules.

    Optionally, specify the application version using the -v argument.

    Version format: major.minor.micro.qualifier For example: '1.0.0.qualifier'

  • -f - This parameter checks if an application with the same name exists, if it does, it deletes the application and creates a new application. If the application with the same name does not exist, it creates a new application.
sharedVariable

SYNTAX:

sharedVariable [variable option] [operation option] [project name] [variable type]

Create/Update/Delete a Job/Module Shared Variable in the specified project.

Arguments:

  • Project Name - The name of the project under which the package to be deleted.
  • Operation optionOperation option - Operation to perform on the variable ; -c : Create ; -u : update ; d : delete.
  • Variable Option - to perform operation on job shared variables ; -m : to perform operations on module shared variables.
  • Variable Type - The type of variable. can be string, integer, boolean, dateTime.

Options:

  • -n - Option used with -u, which is used to update the name of specified Job/Module shared variable. Written as <sharedVariable [variable option] -u -n [project name] [variable name] [new variable name]>.
  • -t - Option used with -u, which is used to update the type of specified Job/Module shared variable. Written as <sharedVariable [variable option] -u -t [project name] [variable name] [new variable type]>.
  • -v - Option used with -u, which is used to update the value of specified Job/Module shared variable. Written as <sharedVariable [variable option] -u -v [project name] [variable name] [new variable value]>.
system:export

SYNTAX:

system:export [options] [projects] [output folder] 

Alternatively, you can use the export command.

EXAMPLE:

export -ear test2.application -removeunused D:\Samples

 

Exports BW artifacts from the specified projects in the workspace to a folder. The artifacts can be ZIP or EAR files.

Arguments:

  • projects - The name of the projects to export, separated by commas, for example, project[,project]*., Must specify at least one project. ActivApplications can be exported as EAR files.

Options:

  • -alsomoduleproperty - This parameter adds the module property in a property file.
  • -bin, -binary - Export shared model as binary shared module. Can be used with -zip option. Cannot be used with -ear option.
  • -cxf <CXF_Project_Name> - This command must run in the workspace where the CXF project exists. It installs the custom XPath function in the project TIBCO_HOME.
  • -e, -ear - Export the application as a deployable ear file (default). Can be used with application projects. Cannot be used with module projects.
  • -force - Export the BW Application as an EAR file even though there are validation errors. By default, erroneous applications can be generated as ear files.
  • --help - Display this help message.
  • -includesystem - This parameter adds all the predefined properties in a property file. For example, BW.APPNODE.NAME .
  • -name [name] - Use the supplied name for the exported module.
  • -noprofile - This parameter removes all the profiles from the EAR file.
  • -pf {profile name} - Export the named profile of the given module. Multiple profiles can be exported by a comma-separated format.
  • -pr {profile name} - Export the profile in property files. Multiple profiles can be exported by a comma-separated format.
  • -removeunused - Exclude unused resources from the application when creating the EAR.
  • -removediagraminfo - Removes process diagram information when creating the .EAR file.
  • -substvar - Export the substvar file of a given profile to a given destination folder.

    For example, export -substvar {profile name} {application or module name} -path {path where substvar file should be exported}

    If no path is given, then the default path is taken.

  • -t - This parameter tokenizes the property file if a project is deployed in TIBCO BusinessWorks™ Container Edition.
  • -z, -zip - Export the model as a zip file. Cannot be used with the -ear option.
  • -dot - This parameter exports the profile using the dot separator.
system:import

SYNTAX:

system:import [options] files

Alternatively, you can use the import command.

Imports flat or ZIP projects into the current workspace.

Arguments:

  • files - The names of the folders, which contain the target flat projects to import. All the flat projects found in the specified folders are imported. The folders are separated by commas. By default, zip files are ignored. If the items to import are zip archives, use the -z, -zip, -fz, -fzip options.

Options:

  • -fz, -fzip - The specified items to import are zip archives in the folders specified by the arguments. All the zip projects in these folders are imported, while flat projects are ignored. Multiple folders are separated by commas.
  • -z, -zip - The specified items to import are zip archives specified by the arguments. Multiple zip files are separated by commas.

Output:

file, status

  • file - Name of the project
  • status - Result of the import, either "imported", "ignored", or "failed {message}"
system:importpreferences

SYNTAX:

system:importpreferences [options] file

Alternatively, you can use the importpreferences command.

This command imports the preferences set in the preferences file.

Arguments:

  • file - Absolute path of the preferences file to be imported.

Output:

file, status

  • file - Name of the project
  • status - Result of the import, either "imported", "ignored", or "failed {message}"
system:validate

SYNTAX:

system:validate [options] [modules]

This command validates BW modules in the current workspace. If you do not provide any module name, by default, it validates all modules.

Arguments:

  • modules -

    The name of the modules to validate, separated by commas, for example, module[,module]*. Defaults to all modules in the workspace.

Options:

  • -h,--help - Display help for this command.
  • -d <Directory path>,--directory <Directory path> - Path of the directory to store the validation result.

At the end of the validation report, this command displays the number of errors and warnings for a project.

system:clean

SYNTAX:

system:clean project1, project2, project3

This command cleans specific projects (all the projects if none is specified in the command) in the workspace.

 

system:delete

SYNTAX:

delete -f 
system:delete project1, project2, project3

Deletes projects from the workspace.

 

-f - This parameter deletes all the projects in the workspace without any message prompts.

system:generate_manifest_json -project

SYNTAX:

generate_manifest_json -project <application name present in workspace> <folder location where JSON is created>

 

 

This command generates a JSON file without creating an EAR file in the workspace.

 

export_to_consul

SYNTAX:

export_to_consul [options]

Export the properties from the specified profile to the Consul key-value store.

Options:

  • -profile - Name of the profile to export.

  • -project - Name of the ActiveMatrix BusinessWorks application project in which the profile exists.

  • -consul - The URL of the Consul. For example, http://127.0.0.1:8500.

  • -consultoken - Optional. The Consul token used for authentication.

  • -customkey - Optional. The custom encryption key used for encrypting the application properties of type Password.

updatePackage

SYNTAX:

updatePackage [project Name] [package Old Namespace] [package New Namespace]

Updates the old Package to New Package namespace in the specified project.

Arguments:

  • Project Name - The name of the project under which the package to be deleted.
  • New Package namespace - The new namespace of the package.
  • Old Package namespace - The old namespace of the package that exists and to be updated.