Can't import or export groovy classes that are not in default package

Description

This is an issue about exporting / importing scripts that are not in the default package.

  • Can't be imported from a workspace from a previous version (didn't work to import in Studio 7.8.3 from a 7.8.0 workspace);

  • Can't be exported as a bos archive (see "steps to reproduce").

The class works fine in groovy expressions within the process.

Environment

Windows 7

Steps to reproduce

Open the project tree; create a groovy class (specify a package name, for example com.example); export project as a bos archive (do not forget to tick "groovy scripts"); then try to import the bos archive. You can't find the script that you have exported.

Workaround

Leave the package name empty at the Groovy class creation. Despite the warning "The use of the default package is discouraged", it works well in groovy expression (even better : static methods appear in user defined functions), and no more problem about exporting these classes. Although it seems to be a bad practice.

External Link

None

Status

Assignee

Antoine Mottier

Reporter

Jovian HERSEMEULE

Reference

BS-19331

Components

Affects versions

7.8.3
7.8.0
Configure