when u have identities with future requests such as remove entitlements (coming fromrapid setup example) and you want to terminate the request due to joiner you can create in your joiner WF a rule to find the requets and delete them


<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE Rule PUBLIC "sailpoint.dtd" "sailpoint.dtd">

<Rule created="1768327652919" language="beanshell" modified="1768329207162" name="Custom - Remove leaver request" significantModified="1768329207162" type="Workflow">

  <Description>A rule used by a Workflow to determine a step action or variable value.


Note that an Attributes map of all variables from the current WorkflowContext, merged with the arguments from the Step, is also passed into the workflow rule.</Description>

  <Signature returnType="Object">

    <Inputs>

      <Argument name="log" type="org.apache.commons.logging.Log">

        <Description>

          The log object associated with the SailPointContext.

        </Description>

      </Argument>

      <Argument name="context" type="sailpoint.api.SailPointContext">

        <Description>

          A sailpoint.api.SailPointContext object that can be used to query the database if necessary.

        </Description>

      </Argument>

      <Argument name="wfcontext">

        <Description>

          The current WorkflowContext.

        </Description>

      </Argument>

      <Argument name="handler">

        <Description>

          The workflow handler associated with the current WorkflowContext.

        </Description>

      </Argument>

      <Argument name="workflow">

        <Description>

          The current Workflow definition.

        </Description>

      </Argument>

      <Argument name="step">

        <Description>

          The current Step.

        </Description>

      </Argument>

      <Argument name="approval">

        <Description>

          The current Approval.

        </Description>

      </Argument>

      <Argument name="item">

        <Description>

          The WorkItem being processed.

        </Description>

      </Argument>

    </Inputs>

    <Returns>

      <Argument name="Object">

        <Description>

          The result of the workflow rule; dependent on the rule itself.

        </Description>

      </Argument>

    </Returns>

  </Signature>

  <Source>

 

import sailpoint.object.Request;

import sailpoint.object.Filter;

import java.util.List;

import sailpoint.object.QueryOptions;

import sailpoint.object.Identity;

import sailpoint.object.Application;

import sailpoint.object.Link;

import java.util.ArrayList;

import sailpoint.object.ProvisioningPlan;

import sailpoint.object.ProvisioningPlan.AccountRequest;

import sailpoint.object.ProvisioningPlan.AttributeRequest;

import sailpoint.object.Filter;

import sailpoint.object.QueryOptions;

import sailpoint.object.Identity;

import sailpoint.object.ProvisioningPlan;

import sailpoint.api.Provisioner;


    import sailpoint.object.ProvisioningPlan.AccountRequest;

    import sailpoint.object.ProvisioningPlan.AttributeRequest;

    import sailpoint.api.Workflower;

    import java.util.HashMap;

    import sailpoint.object.Workflow;

    import sailpoint.object.WorkflowLaunch;



Identity identity = context.getObjectByName(Identity.class, identityName);

Rule_name = "-- Custom - Remove leaver request -- ";

log.error("Starting " + Rule_name + "identityName: " + identityName);


String ReqName ="Deferred Leaver Request for " + identityName;

Filter RequestFilter = Filter.like("name", ReqName);

QueryOptions qo = new QueryOptions();

qo.addFilter(RequestFilter);

List&lt;Request> RequestList = context.getObjects(Request.class,qo);


if(RequestList !=null)

{

   ProvisioningPlan plan = new ProvisioningPlan();

   plan.setIdentity(identity);

   

   for(Request request : RequestList)

   {


      log.error("request :: " + request);

      context.removeObject(request);


   }


}


      context.commitTransaction();



</Source>

</Rule>