# BPM scripts table

## Table

The table below lists the scripts that can be used at each step of the workflow

<table border="1" id="bkmrk-script-validation-vi" style="border-collapse: collapse; width: 100%; height: 704.875px;"><colgroup><col style="width: 52.5626%;"></col><col style="width: 5.84029%;"></col><col style="width: 5.84029%;"></col><col style="width: 6.19785%;"></col><col style="width: 6.55542%;"></col><col style="width: 7.50894%;"></col><col style="width: 8.46246%;"></col><col style="width: 6.91299%;"></col><col style="width: 0.11919%;"></col></colgroup><tbody><tr style="height: 80.1875px;"><td style="height: 80.1875px;">**Script**</td><td style="height: 80.1875px;">**Validation**</td><td style="height: 80.1875px;">**Visibility**</td><td style="height: 80.1875px;">**SCIM filter**</td><td style="height: 80.1875px;">**on**

**Load**

</td><td style="height: 80.1875px;">**on**

**Change**

</td><td style="height: 80.1875px;">**on Prepare Transition**</td><td style="height: 80.1875px;">**Outgoing transitions**</td><td style="height: 80.1875px;">tra</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">userType = **task.getVariables().get**("userType");</td><td class="align-center" style="height: 46.5938px;"><span style="color: rgb(45, 194, 107);">**Yes**</span></td><td style="height: 46.5938px;"><span style="color: rgb(45, 194, 107);">**Yes**</span></td><td style="height: 46.5938px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 46.5938px;">**<span style="color: rgb(45, 194, 107);"><span style="color: rgb(22, 145, 121);"><span style="color: rgb(45, 194, 107);">Yes</span></span></span>**</td><td style="height: 46.5938px;">**<span style="color: rgb(45, 194, 107);"><span style="color: rgb(22, 145, 121);"><span style="color: rgb(45, 194, 107);">Yes</span></span></span>**</td><td style="height: 46.5938px;">**<span style="color: rgb(45, 194, 107);"><span style="color: rgb(22, 145, 121);"><span style="color: rgb(45, 194, 107);">Yes</span></span></span>**</td><td style="height: 46.5938px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 46.5938px;">  
</td></tr><tr style="height: 44.7969px;"><td style="height: 44.7969px;">**task.getVariables().put**("action", "M");

</td><td style="height: 44.7969px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 44.7969px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 44.7969px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 44.7969px;">**<span style="color: rgb(45, 194, 107);"><span style="color: rgb(22, 145, 121);"><span style="color: rgb(45, 194, 107);">Yes</span></span></span>**</td><td style="height: 44.7969px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 44.7969px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 44.7969px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 44.7969px;">  
</td></tr><tr style="height: 80.1875px;"><td style="height: 80.1875px;">if (**value** == null || value.equals(""))  
 return ("The userName is mandatory");  
else   
 return true;  
</td><td style="height: 80.1875px;"><span style="color: rgb(45, 194, 107);">**Yes**</span></td><td style="height: 80.1875px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 80.1875px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 80.1875px;">**<span style="color: rgb(45, 194, 107);"><span style="color: rgb(22, 145, 121);"><span style="color: rgb(45, 194, 107);">Yes</span></span></span>**</td><td style="height: 80.1875px;">**<span style="color: rgb(45, 194, 107);"><span style="color: rgb(22, 145, 121);"><span style="color: rgb(45, 194, 107);">Yes</span></span></span>**</td><td style="height: 80.1875px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 80.1875px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 80.1875px;">  
</td></tr><tr style="height: 63.375px;"><td style="height: 63.375px;">user = serviceLocator.getUserService().**getCurrentUser**();

</td><td style="height: 63.375px;"><span style="color: rgb(45, 194, 107);">**Yes**</span></td><td style="height: 63.375px;"><span style="color: rgb(45, 194, 107);">**Yes**</span></td><td style="height: 63.375px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 63.375px;">**<span style="color: rgb(45, 194, 107);"><span style="color: rgb(22, 145, 121);"><span style="color: rgb(45, 194, 107);">Yes</span></span></span>**</td><td style="height: 63.375px;">**<span style="color: rgb(45, 194, 107);"><span style="color: rgb(22, 145, 121);"><span style="color: rgb(45, 194, 107);">Yes</span></span></span>**</td><td style="height: 63.375px;">**<span style="color: rgb(45, 194, 107);"><span style="color: rgb(22, 145, 121);"><span style="color: rgb(45, 194, 107);">Yes</span></span></span>**</td><td style="height: 63.375px;">**<span style="color: rgb(45, 194, 107);"><span style="color: rgb(22, 145, 121);"><span style="color: rgb(45, 194, 107);">Yes</span></span></span>**</td><td style="height: 63.375px;">  
</td></tr><tr style="height: 63.3906px;"><td style="height: 63.3906px;">lu = **serviceLocator**.getUserService().findUserByJsonQuery("userName eq \\""+un+"\\" ");</td><td style="height: 63.3906px;"><span style="color: rgb(45, 194, 107);">**Yes**</span></td><td style="height: 63.3906px;"><span style="color: rgb(45, 194, 107);">**Yes**</span></td><td style="height: 63.3906px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 63.3906px;"><span style="color: rgb(45, 194, 107);">**Yes**</span></td><td style="height: 63.3906px;">**<span style="color: rgb(45, 194, 107);"><span style="color: rgb(22, 145, 121);"><span style="color: rgb(45, 194, 107);">Yes</span></span></span>**</td><td style="height: 63.3906px;">**<span style="color: rgb(45, 194, 107);"><span style="color: rgb(22, 145, 121);"><span style="color: rgb(45, 194, 107);">Yes</span></span></span>**</td><td style="height: 63.3906px;">**<span style="color: rgb(45, 194, 107);"><span style="color: rgb(22, 145, 121);"><span style="color: rgb(45, 194, 107);">Yes</span></span></span>**</td><td style="height: 63.3906px;">  
</td></tr><tr style="height: 63.375px;"><td style="height: 63.375px;">firstName = (**inputFields.get**("firstName")!=null) ? **inputFields.get**("firstName").value : null;</td><td style="height: 63.375px;"><span style="color: rgb(45, 194, 107);">**Yes**</span></td><td style="height: 63.375px;"><span style="color: rgb(45, 194, 107);">**Yes**</span></td><td style="height: 63.375px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 63.375px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 63.375px;">**<span style="color: rgb(45, 194, 107);"><span style="color: rgb(22, 145, 121);"><span style="color: rgb(45, 194, 107);">Yes</span></span></span>**</td><td style="height: 63.375px;">**<span style="color: rgb(45, 194, 107);"><span style="color: rgb(22, 145, 121);"><span style="color: rgb(45, 194, 107);">Yes</span></span></span>**</td><td style="height: 63.375px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 63.375px;">  
</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">**inputFields**.get("firstName").value = firstName;

</td><td style="height: 46.5938px;"><span style="color: rgb(45, 194, 107);">**Yes**</span></td><td style="height: 46.5938px;"><span style="color: rgb(45, 194, 107);">**Yes**</span></td><td style="height: 46.5938px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 46.5938px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 46.5938px;">**<span style="color: rgb(45, 194, 107);"><span style="color: rgb(22, 145, 121);"><span style="color: rgb(45, 194, 107);">Yes</span></span></span>**</td><td style="height: 46.5938px;">**<span style="color: rgb(45, 194, 107);"><span style="color: rgb(22, 145, 121);"><span style="color: rgb(45, 194, 107);">Yes</span></span></span>**</td><td style="height: 46.5938px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 46.5938px;">  
</td></tr><tr style="height: 44.7969px;"><td style="height: 44.7969px;">a = **executionContext.getVariable**("firstName");

</td><td style="height: 44.7969px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 44.7969px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 44.7969px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 44.7969px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 44.7969px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 44.7969px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 44.7969px;">**<span style="color: rgb(45, 194, 107);"><span style="color: rgb(22, 145, 121);"><span style="color: rgb(45, 194, 107);">Yes</span></span></span>**</td><td style="height: 44.7969px;">  
</td></tr><tr style="height: 44.7969px;"><td style="height: 44.7969px;">**executionContext.setVariable**("firstName", a)

</td><td style="height: 44.7969px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 44.7969px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 44.7969px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 44.7969px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 44.7969px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 44.7969px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 44.7969px;">**<span style="color: rgb(45, 194, 107);"><span style="color: rgb(22, 145, 121);"><span style="color: rgb(45, 194, 107);">Yes</span></span></span>**</td><td style="height: 44.7969px;">  
</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">**executionContext.getToken().addComment**("Automatic comments.......");</td><td style="height: 46.5938px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 46.5938px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 46.5938px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 46.5938px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 46.5938px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 46.5938px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 46.5938px;">**<span style="color: rgb(45, 194, 107);"><span style="color: rgb(22, 145, 121);"><span style="color: rgb(45, 194, 107);">Yes</span></span></span>**</td><td style="height: 46.5938px;">  
</td></tr><tr style="height: 80.1875px;"><td style="height: 80.1875px;">user = serviceLocator.getUserService().getCurrentUser();  
task.getVariables().put("action", "M");  
task.getVariables().put("userSelector", user.userName);  
**workflowWindow.fetchUserAttributes()**  
</td><td style="height: 80.1875px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 80.1875px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 80.1875px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 80.1875px;"><span style="color: rgb(45, 194, 107);">**Yes**</span></td><td style="height: 80.1875px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 80.1875px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 80.1875px;"><span style="color: rgb(224, 62, 45);">No</span></td><td style="height: 80.1875px;">  
</td></tr><tr><td>firstName co "soffid" AND primaryGroup eq "world"</td><td><span style="color: rgb(224, 62, 45);">No</span></td><td><span style="color: rgb(224, 62, 45);">No</span></td><td><span style="color: rgb(224, 62, 45);"><span style="color: rgb(45, 194, 107);">**Yes**</span></span></td><td><span style="color: rgb(45, 194, 107);"><span style="color: rgb(224, 62, 45);">No</span></span></td><td><span style="color: rgb(224, 62, 45);">No</span></td><td><span style="color: rgb(224, 62, 45);">No</span></td><td><span style="color: rgb(224, 62, 45);">No</span></td><td>  
</td></tr></tbody></table>

## Location

Here you can find all kinds of scripts.

[![image.png](https://bookstack.soffid.com/uploads/images/gallery/2026-11/scaled-1680-/igjFPZZ1nm1jy1gF-image.png)](https://bookstack.soffid.com/uploads/images/gallery/2026-11/igjFPZZ1nm1jy1gF-image.png)

[![image.png](https://bookstack.soffid.com/uploads/images/gallery/2026-11/scaled-1680-/3EvbPlrWqC0kHvyJ-image.png)](https://bookstack.soffid.com/uploads/images/gallery/2026-11/3EvbPlrWqC0kHvyJ-image.png)

[![image.png](https://bookstack.soffid.com/uploads/images/gallery/2026-11/scaled-1680-/8Yeic9nrdAgq0Jdy-image.png)](https://bookstack.soffid.com/uploads/images/gallery/2026-11/8Yeic9nrdAgq0Jdy-image.png)