Beans

Beans are information containers that are always present in every workflow. They can provide you with all important information about the context in which the workflow is running. You can access them in expressions where needed. For information about the API of the beans, see the Workflow beans section of the API documentation of your Collibra Data Intelligence Cloud environment.

API v2 in workflows

Collibra Data Intelligence Cloud has two API versions, v1 and v2. Use API v2 methods as v1 is deprecated.

To validate your code against API v2 in workflows, you have to enter the following value as Namespace in the Process section of the workflow properties: http://www.collibra.com/apiv2.

The value for the API v2 namespace has to be exactly as mentioned above. It is not a reachable URL.

If you use the API v2 namespace:

  • You can no longer use API v1 calls in expressions and Groovy. These will be blocked and will result in failed workflows.
  • All form types are API v2 compatible.
  • The Java beans expose and use only UUIDs and API v2 objects.

You can find the API v2 delegates, listeners adn JavaBeans documentation in the API documentation of your environment. Go to
https://<your_dgc_environment_url>/docs/index.html and click Workflow beans.

The direct link to this documentation is
https://<your_dgc_environment_url>/docs/java-workflow-api/index.html.

You can use the Collibra Command Line Interface to test your workflows for deprecated API v1 content and get a report with v2 alternatives.

BusinessItem bean

  • Available through item variable.
  • This beans contains all the information about the current business item. For example, ${item.id}, ${item.type}
  • The following methods are available:

    TypeMethod and description
    UUID

    getCommunityId()

    Retrieve the community ID of the business item, if present.

    UUID

    getDomainId()

    Retrieve the domain ID of the business item, if present.

    UUIDgetId()
    StringgetName()
    ResourcegetResource()
    ResourceTypegetType()
    StringgetTypeName()
    String

    getUrl()

    Retrieve the url to be able to consult the business item directly in the application, if possible.

Users bean

  • Available through the users variable
  • Contains important functions for everything that is user related. For example:
    • ${users.current} retrieves the current user name.
    • ${users.getUserNamesWithError(stakeholderUserExpression)} evaluates the given user expression and lists the usernames.

Event bean

  • Available through the event variable
  • Contains important event information in case the workflow was started on a event. Will be empty otherwise. For example.:
    • ${event.taskId} the original workflow task that triggered the event.
    • ${event.workflowDefinition.signifier} the original workflow where the event was triggered.

Utility bean

  • Available through the utility variable
  • Contains utility functions like list conversion to CSV and vice versa. For example:
    • ${utility.toList("Admin, user1")} converts the given CSV string to a list.

Mail bean

  • Available through the mail variable
  • Contains some mail related functions. For example:
    • ${mail.getEmailAddresses(candidateUserExpression)} retrieve the emails for the users matching the given user expression.

Translation bean

  • Available through the translation variable
  • Contains functions relating to the usage of i18n translation mechanism. For example:
    • ${translation.getMessage("client.defined.translation")} returns the message for the "client.defined.message" key using the current locale.
    • ${translation.getDefaultLocale()} returns the default locale.