The easiest way to see how the Condition Participant plugin is to create a process first. Here are the steps:
|Steps||Screens (Click To View)|
Steps To Import This Plugin
- Go to the website https://marketplace.joget.com/jw/web/userview/mp/mpp/_/vad?id=condition-participant
- Click "Download" on this plugin screen (It will be a .jar file).
- Go to your Joget Workflow localhost or server and login as admin.
- In Joget Console navigate to "Admin Bar>Systems Settings>Manage Plugins" and click "Upload Plugins" button.
- In "Upload Plugin", select the plugin .jar file you just downloaded, then click "Upload".
- You should be able to view the newly installed plugin under the Installed Plugins tab.
- This plugin type will show up when you map participants to users.
- Remember to always uninstall the old plugin before uploading a new version.
- The Joget Workflow Knowledge Base has more information on managing and developing plugins.
Steps to use the Plugin
- Start the Joget server and open the App Centre.
- Login as admin and click on Design New App (See Figure 1) or click on existing application.
- For a new application, fill up the App Details and click on the Save button. (See Figure 2)
- Create New Form, fill up Form Details and click on the Save button. (See Figure 3)
- Generate an approval process app by clicking the generate app button in the form builder.
- Search for the Map Participants to Users tab in Processes.
- Click on the Add/Edit Mapping button. (See Figure 4)
- Select the Map to Plugin tab and search for the Condition Participant plugin. (See Figure 5)
- For example, fill up the script element with 1==1 because we want the script to always return true and the username element as cat because we want Cat Grant to be the approver for every form submitted. (See Figure 6)
- 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.
- Run a new process by clicking the Run Process button in the Processes page.
- In this case, the approval process will be assigned to Cat Grant and we can confirm this by checking the monitor. (See Figure 7)
Condition Participant Properties
|Name||Description||Screen ( Click to view)|
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 participant will be determined by the Username Field.
"#currentUser.id#" == "admin"
This is a mandatory field.
|Username*||The username of the participant. This is a mandatory field.|
|Debug Mode||Turn on the debug mode to show the plugin details in the system log to find bugs for the script.|