Condition Participant Plugin

Introduction

The Condition Participant Plugin enables you to assign process participants dynamically using JavaScript conditions. It supports complex use cases by including hash variables and other custom conditions.

Plugin information

Get started

Where to get the plugin

You can download the plugin from the Joget Marketplace.

How to install

  1. Go to the Joget Marketplace and download the plugin (.jar file).
  2. Log in to your Joget Workflow server as an admin.
  3. Navigate to Admin Bar > System Settings > Manage Plugins.
  4. Click on Upload Plugins, select the downloaded .jar file, and click Upload.
  5. The plugin will be visible under the Installed Plugins tab once uploaded.
  6. Uninstall any older versions before uploading a new one.

The Joget Workflow Knowledge Base has more information on managing and developing plugins.

How to use it

  1. Start the Joget server and log in to the App Center.
  2. Login as admin and click Design New App or select an existing application.
  3. For a new app, fill in the App Details and save the form.
  4. Create a new form, fill in the Form Details, and save it.
  5. Generate an approval process app using the form builder's Generate App button.
  6. Go to the Processes section and locate the Map Participants to Users tab.
  7. Click Add/Edit Mapping.
  8. Select the Map to Plugin tab and search for the Condition Participant plugin.
  9. For example, fill in the script element with 1==1 because we want the script to always return true and the username element with cat because you want Cat Grant to approve every form submitted.
  10. Hash variables can also be used in the script element in order to satisfy more complex use cases. For example, we can use "#currentUser.id#" == "admin" in the script element and Clark so that when the admin submits a form, Clark Kent will be assigned as the approver.
  11. Run a new process by clicking the Run Process button on the Processes page.
  12. In this case, the approval process will be assigned to Cat Grant, and you can confirm this by checking the monitor. 

Configure condition participant properties

  • Participant: 
    • JavaScript Condition:  This is a mandatory field. The script element uses the Javascript condition to determine who will participate in the process. Hash variables are usable here. For example, you may key in values such as "#currentUser.id#" == "admin" so that when you run this process as the Admin, it will return as true, and the Username Field will determine the participant.

       
    • Username: The username of the participant. This is a mandatory field.

  • Debug Mode: Turn on debug mode to show the plugin details in the system log and find bugs in the script.

Download Plugin

Created by Julieth Last modified by Aadrian on Nov 19, 2024