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 command line type: bwdesign -data <TIBCO_BusinessStudio_workspace_absolutePath>. For example, bwdesign -data C:\myWorkspace.
  3. To view arguments and options for a command, open a terminal, navigate to the BW_HOME\bin folder, and type bwdesign helpcommand 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.
diagram:gen_diagrams

SYNTAX:

diagram:gen_diagrams [project]

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

Arguments:

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

SYNTAX:

edition

Prints out the edition of this BW Studio
execute

SYNTAX:

execute file

Executes a batch script file containing a set of commands to execute in sequence.

Arguments:

  • file - Script file, which contains a set of commands to be executed 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

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
pwd

SYNTAX:

pwd

Prints the location of the current working directory.
quit

SYNTAX:

quit

Exits the command-line console.
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 resource(s) 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 module(s).

    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.
system:export

SYNTAX:

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

Alternatively, you can use the export command.

EXAMPLE:

export -ear test2.application -removeunused -path 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 project(s) to export, separated by commas, for example, project[,project]*., Must specify at least one project. BW Applications can be exported as EAR files.
  • -path -This flag is used to give an output or destination folder, where the content is exported. Defaults to local folder.

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 the -zip option. Cannot be used with -ear option.
  • -cxf <CXF_Project_Name> - This command must be executed in the workspace where the CXF project exists. It installs the custom XPath function project into the TIBCO_HOME.
  • -e, -ear - Export 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 model as zip file. Cannot be used with -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 located 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.

Imports 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]

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 module(s) 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, the validate command displays the number of errors and warnings for a project.

system:clean

SYNTAX:

system:clean project1, project2, project3

Cleans specific projects (all the projects if none are specified in the command) in the workspace.

 

Cleans project1, project2, and project3 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.

Deletes project1, project2, and project3 from the workspace.

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 Password type.