i need to add logic to handle when ther is request from delimited . like do i check it from apptype and disbale it.
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Workflow PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<Workflow created="1721231388293" explicitTransitions="true" id="0a641a1f90b618c28190c162ae764b7b" libraries="Identity" modified="1722956365868" name="AIZ-Workflow-Partner-TerminatedManager" type="IdentityLifecycle">
<Variable input="true" name="trigger">
<Description>The IdentityTrigger</Description>
</Variable>
<Variable input="true" name="event" transient="true">
<Description>
The IdentityChangeEvent. It can be used to build
the provisioning plan, but does not need to be
persisted with the case, so marked as transient.
</Description>
</Variable>
<Variable input="true" name="identityName">
<Description>The name of the identity.</Description>
</Variable>
<Description>Process a new employee.</Description>
<Step icon="Start" name="Start" posX="28" posY="10">
<Transition to="Process user"/>
</Step>
<Step icon="Message" name="Process user" posX="148" posY="10">
<Description>Process the user that joined.</Description>
<Script>
<Source>
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.log4j.Logger;
import sailpoint.object.EmailOptions;
import sailpoint.object.EmailTemplate;
import sailpoint.object.Filter;
import sailpoint.object.Identity;
import sailpoint.object.QueryOptions;
import sailpoint.tools.Util;
import sailpoint.object.AuditEvent;
import sailpoint.server.Auditor;
System.out.println("New user was entered the system: " + event.getObject().getDisplayableName());
Identity identityObject = context.getObjectByName(Identity.class, identityName);
Identity manager = identityObject.getManager();
if(manager !=null){
Identity managerManager=manager.getManager();
if(managerManager !=null){
identityObject.setManager(managerManager);
context.saveObject(identityObject);
context.commitTransaction();
context.decache(identityObject);
// LOG Audit
AuditEvent auditEvent = new AuditEvent();
auditEvent.setAction("Manager Update");
auditEvent.setSource("AIZ-Workflow-Partner-TerminatedManager");
auditEvent.setTarget(identityName);
auditEvent.setString1("Old Manager:::"+manager.getName());
auditEvent.setString2("New Manager:::"+managerManager.getName());
Auditor.log(auditEvent);
context.commitTransaction();
//Send Email
EmailTemplate emailTemplate=context.getObjectByName(EmailTemplate.class,"AIZ Partner Manager Notification");
EmailOptions options=new EmailOptions();
String emailAddressRequestee=identityObject.getAttribute("email");
options.setTo(managerManager.getEmail());
Map map=new HashMap();
map.put("oldManager", manager.getAttribute("displayName"));
map.put("newManager", managerManager.getAttribute("displayName"));
map.put("newManagerFirstName", managerManager.getFirstname());
map.put("identityName",identityName);
map.put("subject","New manager Assgeind for "+identityName);
map.put("identityDisplayName",identityObject.getAttribute("displayName"));
options.setVariables(map);
context.sendEmailNotification(emailTemplate, options);
}
}
</Source>
</Script>
<Transition to="Stop"/>
</Step>
<Step icon="Stop" name="Stop" posX="268" posY="10"/>
</Workflow>