If you don’t have a modify operation for your person entry, you’ll have to add one.
Simply change the Operation Level to “Entity Type” and the Entity Type to “Person” and
Entity to whatever your person entity is. Then do Add and in the box, enter “modify”
(must be in lower case, so that it copies in the default “modify” person operation).
Add an extension box between ENFORCEPOLICYFORPERSON and END. Add the
transition lines from ENFORCEPOLICYFORPERSON to the new extension box and
then one from the new extension box to the END.
Add two new relevant items: 1) “action” as a type of String with no default value, 2)
“CONST_TRUE” as a type of String and a default value of “true”.
In the START box, add the following java script:
var person = Entity.get();
action.set("none");
var changes = person.getChanges();
if (changes != null && changes.length > 0)
{
for (i=0; i<changes.length; i++)
{
var op = changes[i].op;
if (op == 1 || op == 2)
{
var name = changes[i].attr;
if (name == "erpersonstatus")
{
var values = changes[i].values;
if (values[0] == "0")
{
action.set("restore");
}
}
}
}
}
For the transition line from ENFORCEPOLICYFORPERSON to the new extension box,
add the following java script:
action.get()=="restore";
For the transition line from ENFORCEPOLICYFORPERSON to END, add the following
java script:
action.get()=="none";
For the new extension box, add the “Activity ID” of PersonRestore, set the extension
name as show below and also set the person and accountRestore input parameters as
show below:
Save the Operation and you are ready to test!
© Copyright 2026 Paperzz