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
Important: This command is applicable only after you upgrade to TIBCO ActiveMatrix BusinessWorks™ (Container Deployment) 2.10.0 HF-004 and above.
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.
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, 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.
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 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.
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.