Sunday, February 6, 2022

How to schedule the workflow?

Request request = new Request(); 

RequestDefinition requestdefinition = context.getObject(RequestDefinition.class, "Workflow Request"); 

request.setDefinition(requestdefinition); 

request.setEventDate( new Date( launchTime ) ); 

request.setOwner(id); 

request.setName(caseName); 

request.setAttributes(requestdefinition , reqArgs); 

//Request args is map to pass the values to workflow.

RequestManager.addRequest(context, request);

// Schedule the workflow via the request manager. 


# What is Request API?

A model to represent a request for a single target object. A list of these is found within a Plan object. 

Usually the target is a user account, but it could be a group or some other object managed by this connector.

Note: 

Model - Model represents an object or JAVA POJO carrying data.


# What is RequestDefinition API?

An object describing a background request.


# what is RequestManager API?

A class providing an API for managing the request processor and submitting asynchronous requests.

Note:  

The asynchronous process defines a process that is operated independently with other processes.

No comments:

Post a Comment

Fetch Members from Workgroup

  import java.util.ArrayList;   import java.util.Iterator;   import java.util.List;   import sailpoint.api.ObjectUtil;   import sailpoint.ob...