July 30, 2023

tBonitaInstantiateProcess – Docs for ESB 7.x

tBonitaInstantiateProcess

Starts an instance for a specific process deployed in a Bonita Runtime
engine.

This component instantiates a process already deployed in a Bonita
Runtime engine.

tBonitaInstantiateProcess Standard properties

These properties are used to configure tBonitaInstantiateProcess running in the Standard Job framework.

The Standard
tBonitaInstantiateProcess component belongs to the Business family.

The component in this framework is available in all Talend
products
.

Basic settings

Schema and Edit
Schema

A schema is a row description. It defines the number of fields
(columns) to be processed and passed on to the next component. When you create a Spark
Job, avoid the reserved word line when naming the
fields.

The schema of this component is read-only. You can click
Edit schema to view the schema.

In this component the schema is related to the Module
selected.

Note:

The ProcessInstanceUUID
column is pre-defined in the schema of this component, reserved
for the identifier number of the process instance being
created.

Bonita Client Mode

Select the client mode you want to use to instantiate a Bonita process.

For more information about all the Bonita client modes, see
Bonita’s manuals.

URL

Enter the URL of the Bonita Web application server you need to
access for the process instantiation.

This field is available only in the HTTP client mode.

Auth Username and Auth Password

Enter the authentication details used to connect to the Bonita Web
application server as technical user.

To enter the password, click the […] button next to the
password field, and then in the pop-up dialog box enter the password between double quotes
and click OK to save the settings.

The default authentication information is provided in these
fields. For further information about them, see Bonita’s
manuals.

These fields are available only in the HTTP client mode.

Bonita version

Select the version number of the Bonita Runtime engine to be
used.

This field is available only in the Java client mode.

Bonita Runtime Environment File

Browse to, or enter the path to the Bonita Runtime environment
file.

This field is available only in the Java client mode.

Note:

This field is displayed only when you select Bonita
version 5.3.1 from the Bonita
version
list.

Bonita Runtime Home

Browse to, or enter the path to the Bonita Runtime environment
directory.

Note:

This field is displayed only when you select Bonita version
5.6.1 from the Bonita version
list.

Bonita Runtime Jaas File

Browse to, or enter the path to the Bonita Runtime jaas
file.

This field is available only in the Java client mode.

Bonita Runtime logging file

Browse to, or enter the path to the Bonita Runtime logging
file.

This field is available only in the Java client mode.

Use Process ID

Select this check box to instantiate an existing process.

Once checked, the Process definition
ID
field is activated in which you can enter the
Definition ID of this process

This field is available only in the Java client mode.

Note:

The process definition ID is
created when the process is deployed into the Bonita Runtime
engine.

Process Name and
Process Version

Enter the ID information of a specific process you want to
instantiate. This information is used to automatically generate the
ID of this process.

This field is available in both of the Java client mode and the
HTTP client mode.

User name

Type in your user name used to instantiate this process.

This filed is available in both of the Java client mode and the
HTTP client mode.

Password

Type in your password used to instantiate this process.

To enter the password, click the […] button next to the
password field, and then in the pop-up dialog box enter the password between double quotes
and click OK to save the settings.

This field is available only in the Java client mode.

Die on error

This check box is cleared by default, meaning to skip the row on
error and to complete the process for error-free rows.

Advanced settings

tStatCatcher Statistics

Select this check box to gather the Job processing metadata at a
Job level as well as at each component level.

Global Variables

Global Variables

ProcessInstanceUUID: the identifier number of the process
instance being created. This is a Flow variable and it returns a string. It can also be
retrieved over the Row> Main output link.

ERROR_MESSAGE: the error message generated by the
component when an error occurs. This is an After variable and it returns a string. This
variable functions only if the Die on error check box is
cleared, if the component has this check box.

A Flow variable functions during the execution of a component while an After variable
functions after the execution of the component.

To fill up a field or expression with a variable, press Ctrl +
Space
to access the variable list and choose the variable to use from it.

For further information about variables, see
Talend Studio

User Guide.

Usage

Usage rule

Usually used as a stand-alone component or as an output
component.

To use this component, you have to manually download the Bonita solution you need to
use.

Connections

Outgoing links (from this component to another):

Row: Main (providing the output
parameters from this process)

Trigger: Run if; On Component Ok;
On Component Error, On Subjob Ok, On Subjob Error.

Incoming links (from one component to this one):

Row: Main (providing the input
parameters to this process)

Trigger: Run if, On Component Ok,
On Component Error, On Subjob Ok, On Subjob Error

For further information regarding connections, see Connection types in
Talend Studio User
Guide
.

Limitation

The Bonita Runtime environment file, the Bonita Runtime jaas file
and the Bonita Runtime logging file must be all stored on the
execution server of the Job using this component.

Executing a Bonita process via a Talend Job

This scenario describes a Job that deploys a Bonita process into the Bonita Runtime
and executes this process, in which a personnel request is treated.

tBonitaInstantiateProcess_1.png

The Job in this scenario uses three components.

  • tBonitaDeploy: this component deploys a
    Bonita process into the Bonita Runtime.

  • tFixedFlowInput: this component generates
    the schema used as execution parameters of this deployed process.

  • tBonitaInstantiateProcess: this component
    executes this deployed process.

Before beginning to replicate this schema, prepare your Bonita.bar file. You need to
manually export this file from the Bonita system and then deploy it into the Bonita
Runtime engine, using, for example, tBonitaDeploy as
presented later in this scenario. In this scenario, this file is
TEST–4.0.bar. Once deployed, this process can be checked via the
Bonita interface.

tBonitaInstantiateProcess_2.png

Setting up the Job

  1. Drop tBonitaDeploy, tFixedFlowInput and tBonitaInstantiateProcess onto the design workspace.
  2. Right-click tBonitaDeploy and connect
    tBonitaDeploy to tFixedFlowInput using a Trigger> On
    Subjob Ok
    connection.
  3. Right-click tFixedFlowInput and connect
    this component to tBonitaInstantiateProcess
    using a Row > Main connection.

Configuring the deployment of the process

To replicate this scenario, proceed as follows:

  1. Double-click tBonitaDeploy to open its
    Basic settings view.

    tBonitaInstantiateProcess_3.png

  2. Select Bonita version 5.3.1 from the Bonita
    version
    list. The version you select should be in sync with
    the version number of the Bonita Runtime engine you are using.
  3. In the Bonita Runtime Configuration
    area, browse to the Bonita Runtime variable files. In the Bonita Runtime Environment file field, browse to
    the bonita-environnement.xml file; in the Bonita Runtime Jaas File field, browse to the
    jaas-standard.cfg file; in the Bonita Runtime Logging File field, browse to the
    logging.properties file.

    For users based on Bonita version 5.2.3, only the Bonita Runtime Jaas File field and the
    Bonita Runtime Logging File field
    need to be filled.

    tBonitaInstantiateProcess_4.png

    For users based on Bonita version 5.6.1, in the Bonita Runtime Home field, browse to the Bonita Runtime
    environment directory.

    tBonitaInstantiateProcess_5.png

  4. In the Business Archive field, browse to
    the Bonita .bar file that is the process exported from your Bonita system
    and will be deployed into the Bonita Runtime engine.
  5. In the Username and the Password fields, type in your authentication
    information to connect to your Bonita.

Configuring the input flow

  1. Double-click tFixedFlowInput to open its
    Basic settings view.

    tBonitaInstantiateProcess_6.png

  2. Click the three-dot button next to Edit
    schema
    to open the schema editor.

    tBonitaInstantiateProcess_7.png

  3. Click the plus button to add one row and rename it as
    Name.

    This name is identical with the parameter set in Bonita to execute the
    same process. This way, Bonita can recognize this column as valid parameter
    and read its value to instantiate this process.
  4. Click OK.
  5. In the Mode area of the Basic settings view, select the Use inline table option and click the plus button
    to add one row in the table.
  6. In the inline table, click the added row and type in the person’s name
    from your personnel between the quotation marks: ychen,
    whose request will be treated by this deployed process.

Configuring the Basic settings of tBonitaInstantiateProcess

  1. Double-click tBonitaInstantiateProcess
    to open its Basic settings view.

    tBonitaInstantiateProcess_8.png

  2. Select Bonita version 5.3.1 from the Bonita
    version
    list. The version you select should be in sync with
    the version number of the Bonita Runtime engine you are using.
  3. In the Bonita Runtime Configuration
    area, browse to the Bonita Runtime variable files. In the Bonita Runtime Environment file field, browse to
    the bonita-environnement.xml file; in the Bonita Runtime Jaas File field, browse to the
    jaas-standard.cfg file; in the Bonita Runtime Logging File field, browse to the
    logging.properties file.

    For users based on Bonita version 5.2.3, only the Bonita Runtime Jaas File field and the
    Bonita Runtime Logging File field
    need to be filled.

    tBonitaInstantiateProcess_9.png

    For users based on Bonita version 5.6.1, in the Bonita Runtime Home field, browse to the Bonita Runtime
    environment directory.

    tBonitaInstantiateProcess_10.png

  4. Select the Use Process ID check box to
    activate the Process Definition Id
    field.
  5. In the Process Definition Id field, click
    between the quotation marks and press Ctrl+space to open the auto-completion drop-down list
    containing the available global variables for this Job.
  6. Double-click the variable you need use to add it between the quotation
    marks. In this scenario, double-click
    tBonitaDeploy_1_ProcessDefinitionUUID, which
    retrieves the process definition ID of the process being deployed by
    tBonitaDeploy.

    Note:

    You can as well clear the Use Process
    ID
    check box to activate the Process name and the Process
    version
    fields and enter the corresponding information in
    the two fields. tBonitaInstantiateProcess concatenates the process name
    and the process version you type in to construct the process definition
    ID.

  7. In the Username and Password fields, enter the username and password to connect
    to your Bonita.

Executing the Job

Press F6 to run the
Job.
tBonitaInstantiateProcess_11.png

This process is deployed into the Bonita Runtime and an instance
is created for the personnel requests.

Outputting the process instance UUID over the Row > Main link

This scenario deploys a Bonita process into the Bonita Runtime, starts an instance and
outputs the process instance UUID via the Row >
Main link.

Linking the components

  1. Drop tBonitaDeploy, tBonitaInstantiateProcess and tLogRow onto the workspace.
  2. Rename tBonitaDeploy as deploy_process, tBonitaInstantiateProcess as start_instance and tLogRow
    as show_instance_uuid.
  3. Link tBonitaDeploy to tBonitaInstantiateProcess using the OnSubjobOk trigger.
  4. Link tBonitaInstantiateProcess to
    tLogRow using a Row > Main
    connection.

    tBonitaInstantiateProcess_12.png

Configuring the components

  1. Double-click tBonitaDeploy to open its
    Basic settings view.

    tBonitaInstantiateProcess_13.png

  2. In the Bonita Runtime Jaas File field,
    specify the path and name of the jaas file.

    In the Bonita Runtime Logging File field,
    specify the path and name of the logging file.
    In the Business Archive field, specify
    the path and name of the Bonita process.
  3. In the Username and Password fields, enter the user authentication
    credentials.
  4. Double-click tBonitaInstantiateProcess to
    open its Basic settings view.

    tBonitaInstantiateProcess_14.png

  5. In the Bonita Runtime Jaas File field,
    specify the path and name of the jaas file.

    In the Bonita Runtime Logging File field,
    specify the path and name of the logging file.
  6. In the Process Name and Process Version fields, enter the process
    information.
  7. In the Username and Password fields, enter the user authentication
    credentials.
  8. Double-click tLogRow to open its
    Basic settings view.
  9. In the Mode area, select Table (print values in cells of a table for
    better display.

Executing the Job

  1. Press Ctrl+S to save the Job.
  2. Press F6 to run the Job.

    tBonitaInstantiateProcess_15.png

    As shown above, the instance is created and the UUID is output.

Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x