Start New Process Instance Based on Existing Form Record

Introduction

In Joget, a common task is starting a new process instance, typically by filling out a fresh form. However, there are scenarios where you may want to start a new process based on an existing form record. This tutorial will guide you through two methods: starting a new process instance by referencing an existing form record and starting a new process instance by selecting a record from a list.

How does it work?

Starting a new process instance based on an existing form record

Normally, when you access a Run Process Menu in Joget, it will bring up an empty form to initiate the process.
However, you can start a new process instance by referencing it to an existing record. To do so, you will need to modify this behavior to reference an existing form record by adjusting the URL to include the recordId parameter with the primary key of the existing record.

Example:

  • Original URL: http://localhost:8080/jw/web/userview/demo/v/_/request_submit
  • Modified URL: http://localhost:8080/jw/web/userview/demo/v/_/request_submit?recordId=0df70dca-d51f-4c8d-9de1-2e3e9c0dc0c2

This method will start a new process instance with data pre-populated from the existing form record.

Starting a new process instance by selecting from a list

In real-world scenarios, you may want to allow users to choose which record they wish to use to start a process. This can be achieved by integrating a record list with a hyperlink pointing to the Run Process Menu.

  1. Create a CRUD interface that lists the existing records.
  2. Add a Hyperlink Action to each record in the list, directing the link to the Run Process Menu with the specific recordId parameter.
  3. When a user clicks the hyperlink, the system will start a new process instance using the selected record.
Created by Julieth Last modified by Aadrian on Dec 13, 2024