2.4.2. Process Deployment

The created process design must be compiled. In other words, it is necessary to create scheme-based executable code for the process. Select the line with the design in the Processes Design window and click Compile. If the compilation is successful, the Compilation date column will contain the current time.

The next step is the deployment of the process. Select the line with the compiled design and click Deploy. In the dialog window, leave the Create new process box checked and click Deploy. The following actions will be performed:

  • A new Proc object will be created in the application database along with the ProcRole objects that correspond to roles used in the design.

  • A directory with the name proc_<date_time> (where date_time is the time process deployment) will be created in the process subdirectory of the Middleware configuration directory. This directory contains the following files required for process execution: jPDL, the forms descriptor, and the localized message pack.

  • The jPDL file is sent to the jBPM execution engine, which creates the corresponding entries in the JBPM4_DEPLOYMENT and JBPM4_DEPLOYPROP tables. The jBPM process identifier is a string that is identical to the deployment directory name (proc_<date_time>). This identifier is also recorded in the jbpmProcessKey attribute of the Proc object.

The process is ready for running. However, for the purposes of our example, we need one extra preparation - assigning default holders for process roles.

Open the Workflow -> Processes screen, select the created process and open it for editing. In the list of process roles, select the Manager and Operator roles, and add role holders in the Default participants list. Role holders must be system users (manager and operator, respectively). The process editor will look as follows:

Apart from the roles explicitly specified in the design, the system has created the CARD_CREATOR role with the Assign to creator attribute. This role can be used to allow the user who created the card to become a process participant automatically. This role is not used in the described example.

It is recommended to set the process Code attribute to some meaningful unique value, since in the software code this attribute helps easily locate the process that should be run. In this case, set the value to book_scanning.

Typically, the process design is developed iteratively, so the system provides the ability to deploy the same changeable design repeatedly by updating the existing process. In fact, the following occurs when we deploy the design in the existing process:

  • The ability to migrate incomplete process instances (in other words, active cards) for the new process schema is verified.

  • A new proc_<date_time> directory is created, where date_time is the process deployment time.

  • A new process description with an identifier that is equivalent to the name of the deployment directory is created in the jBPM execution engine. This new identifier is set in the jbpmProcessKey attribute of the Proc object.

  • Active cards are migrated.

To update the process in accordance with the changed design, uncheck the Create new process checkbox during design deployment and choose the process to be updated from the Existing process drop-down list.