Package com.identityworksllc.iiq.common
Class WorkflowUtilities
- java.lang.Object
-
- com.identityworksllc.iiq.common.AbstractBaseUtility
-
- com.identityworksllc.iiq.common.WorkflowUtilities
-
public class WorkflowUtilities extends AbstractBaseUtility
Workflow utilities
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWorkflowUtilities.LCMWorkflowTypeAn enumeration of available LCM workflow types and the system config property required to access themstatic classWorkflowUtilities.WorkflowTypeAn enumeration of available non-LCM workflow types and the system property required to access them
-
Field Summary
-
Fields inherited from class com.identityworksllc.iiq.common.AbstractBaseUtility
context, debug, log
-
-
Constructor Summary
Constructors Constructor Description WorkflowUtilities(sailpoint.api.SailPointContext c)Constructor for workflow utilities
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Map<String,Object>createFormModel()Creates a new form model map with the required parameters set.voidlaunchAsync(sailpoint.object.Workflow wf, String caseName, Map<String,Object> parameters, long launchTime)Launches the given workflow asynchronously, using a Request to launch the Workflow and associated TaskResult at a later time.voidlaunchAsync(sailpoint.object.Workflow wf, String caseName, Map<String,Object> parameters, LocalDate launchTime)Launches the given workflow asynchronously, using a Request to launch the Workflow and associated TaskResult at a later time.voidlaunchAsync(sailpoint.object.Workflow wf, String caseName, Map<String,Object> parameters, LocalDateTime launchTime)Launches the given workflow asynchronously, using a Request to launch the Workflow and associated TaskResult at a later time.voidlaunchDelayed(sailpoint.object.Workflow wf, String caseName, Map<String,Object> parameters, long howMuch, ChronoUnit timeUnit)Launches the given workflow with the given delayvoidlaunchDelayed(sailpoint.object.Workflow wf, String caseName, Map<String,Object> parameters, long howMuch, TimeUnit timeUnit)Launches the given workflow with the given delayprotected voidlaunchInternal(sailpoint.api.SailPointContext context, sailpoint.object.Request request)Internal method to launch a workflow using the RequestManager.voidlaunchQuietly(sailpoint.object.Workflow wf, String caseName, Map<String,Object> parameters)Launches the given workflow quietly (i.e.voidsetStepTargetWorkflow(sailpoint.workflow.WorkflowContext wfcontext, String stepName, String targetWorkflow)Sets the target workflow reference of a step to another workflow at runtime.voidwfError(sailpoint.workflow.WorkflowContext wfcontext, String message)Appends an error message to the given workflow context / task result with a timestampvoidwfMessage(sailpoint.workflow.WorkflowContext wfcontext, String message)Appends a message to the given workflow context / task result with a timestampvoidwfWarn(sailpoint.workflow.WorkflowContext wfcontext, String message)Appends a warning message to the given workflow context / task result with a timestamp-
Methods inherited from class com.identityworksllc.iiq.common.AbstractBaseUtility
inject, isDebug, setDebug
-
-
-
-
Constructor Detail
-
WorkflowUtilities
public WorkflowUtilities(sailpoint.api.SailPointContext c)
Constructor for workflow utilities- Parameters:
c- The current SailPointContext
-
-
Method Detail
-
createFormModel
public static Map<String,Object> createFormModel()
Creates a new form model map with the required parameters set.If you need to add complex values to the Map, using
MapUtil.put(Map, String, Object)is a great option.- Returns:
- A new form model with the required parameters
-
launchAsync
public void launchAsync(sailpoint.object.Workflow wf, String caseName, Map<String,Object> parameters, long launchTime) throws sailpoint.tools.GeneralException
Launches the given workflow asynchronously, using a Request to launch the Workflow and associated TaskResult at a later time.If the launch time is not in the future, it will be set to the current System timestamp.
- Parameters:
wf- The workflow to launchcaseName- The case name ot useparameters- The parameters to the workflowlaunchTime- The time at which the workflow will be launched (in milliseconds since epoch)- Throws:
sailpoint.tools.GeneralException- if any IIQ error occurs
-
launchAsync
public void launchAsync(sailpoint.object.Workflow wf, String caseName, Map<String,Object> parameters, LocalDate launchTime) throws sailpoint.tools.GeneralException
Launches the given workflow asynchronously, using a Request to launch the Workflow and associated TaskResult at a later time.If the launch time is not in the future, it will be set to the current System timestamp.
- Parameters:
wf- The workflow to launchcaseName- The case name ot useparameters- The parameters to the workflowlaunchTime- The time at which the workflow will be launched- Throws:
sailpoint.tools.GeneralException- if any IIQ error occurs
-
launchAsync
public void launchAsync(sailpoint.object.Workflow wf, String caseName, Map<String,Object> parameters, LocalDateTime launchTime) throws sailpoint.tools.GeneralException
Launches the given workflow asynchronously, using a Request to launch the Workflow and associated TaskResult at a later time.If the launch time is not in the future, it will be set to the current System timestamp.
- Parameters:
wf- The workflow to launchcaseName- The case name ot useparameters- The parameters to the workflowlaunchTime- The time at which the workflow will be launched- Throws:
sailpoint.tools.GeneralException- if any IIQ error occurs
-
launchDelayed
public void launchDelayed(sailpoint.object.Workflow wf, String caseName, Map<String,Object> parameters, long howMuch, TimeUnit timeUnit) throws sailpoint.tools.GeneralException
Launches the given workflow with the given delay- Parameters:
wf- The workflow to launchcaseName- The case name ot useparameters- The parameters to the workflowhowMuch- How much to delay the launch of the workflowtimeUnit- The time unit represented by the howMuch parameter- Throws:
sailpoint.tools.GeneralException- if any IIQ error occurs
-
launchDelayed
public void launchDelayed(sailpoint.object.Workflow wf, String caseName, Map<String,Object> parameters, long howMuch, ChronoUnit timeUnit) throws sailpoint.tools.GeneralException
Launches the given workflow with the given delay- Parameters:
wf- The workflow to launchcaseName- The case name ot useparameters- The parameters to the workflowhowMuch- How much to delay the launch of the workflowtimeUnit- The time unit represented by the howMuch parameter- Throws:
sailpoint.tools.GeneralException- if any IIQ error occurs
-
launchInternal
protected void launchInternal(sailpoint.api.SailPointContext context, sailpoint.object.Request request) throws sailpoint.tools.GeneralException
Internal method to launch a workflow using the RequestManager.Used for testing by overriding this method to do something different.
- Parameters:
context- The SailPointContext to use for launching the workflowrequest- The Request to launch- Throws:
sailpoint.tools.GeneralException- if any IIQ error occurs
-
launchQuietly
public void launchQuietly(sailpoint.object.Workflow wf, String caseName, Map<String,Object> parameters)
Launches the given workflow quietly (i.e.absorbs errors if there are any)
- Parameters:
wf- The workflow to launchcaseName- The case name ot useparameters- The parameters to the workflow
-
setStepTargetWorkflow
public void setStepTargetWorkflow(sailpoint.workflow.WorkflowContext wfcontext, String stepName, String targetWorkflow) throws sailpoint.tools.GeneralException
Sets the target workflow reference of a step to another workflow at runtime.This can be used for polymorphic behavior.
- Parameters:
wfcontext- The workflow to modifystepName- The step name to modifytargetWorkflow- The new target workflow for that step- Throws:
sailpoint.tools.GeneralException- if any IIQ error occurs
-
wfError
public void wfError(sailpoint.workflow.WorkflowContext wfcontext, String message)
Appends an error message to the given workflow context / task result with a timestamp- Parameters:
wfcontext- The Workflow Context (wfcontext from any workflow step)message- The message to append
-
wfMessage
public void wfMessage(sailpoint.workflow.WorkflowContext wfcontext, String message)
Appends a message to the given workflow context / task result with a timestamp- Parameters:
wfcontext- The Workflow Context (wfcontext from any workflow step)message- The message to append
-
-