Default Workflow Variables (documentation?)

Which IIQ version are you inquiring about?

8.3sp2

Confusion Summary

I come from a C/C++ coding background, and I am getting into SailPoint. There are a lot of “magic variables” and hidden items in sailpoint that I can’t explicitly see in a given workflow or rule code. Is there documentation that states the default variables that are available when a workflow has been launched? (i.e. context, launcher, etc.).

It’s just all so confusing LOL.

Where do these things come from?!

:stuck_out_tongue:

Thanks,
Alex

@acrumley i think most of them u will get from here ( check Variable Definitions )

Workflows - Compass

Documenting all workflows and subprocesses - Compass

Hi @acrumley

Hope this helps

  • Input Variables: Passed into the workflow when it is launched.
  • Output Variables: Used to store results and make them visible in the Task Results.
  • Working Variables: Used internally during workflow execution.
  • Editable/Required Flags: Define whether a variable is user-editable or mandatory.

Lifecycle Manager Workflows - Compass

2 Likes

Thank you for the resources @pravin_ranjan !!!

The workflow documentation script looks super useful. However, I’m looking for what variables are “injected” by SailPoint when a Workflow is ran.

For example, I could do this without initializing the variable anywhere in my script

context.getObjectByIdentity(Identity.Class, identityName);

I know that context is the SailPointContext object, but I want to know how it got there. Not necessarily from a technical standpoint, but I would like some resources on what variables are automatically injected in a workflow context so that I can utilize them. I am sure I am missing out on a whole lot of useful runtime information to do what I need to do. Thanks!

Hi @acrumley,

Workflows get:

  • sailpoint.workflow.WorkflowContext wfcontext
  • sailpoint.object.WorkflowCase wfcase
  • sailpoint.object.Workflow workflow
  • sailpoint.object.Workflow.Step step
  • sailpoint.object.Workflow.Approval approval
  • sailpoint.object.WorkItem item

Rules/scripts also get:

  • sailpoint.api.SailPointContext context
  • org.apache.commons.logging.Log log

Rules/scripts also get some functions from rule “Workflow Library”:

  • otob
  • isTrue
  • isFalse
  • toString
  • csvToList

Workflows can get other things depending on the type of workflow.

Defining and Modifying IdentityIQ Workflows .pdf (1.8 MB)
This document will help for complete understanding.

Hi @acrumley
SailPoint automatically injects certain objects into the runtime context of workflows, rules, and script steps. These are not declared by anyone, but they’re made available behind the scenes based on the execution environment (i.e., rule type, workflow step, etc.).

Here are some of the default variables automatically injected by IdentityIQ when a workflow script or step is executed:

context (SailPointContext)
The core object that gives you access to IdentityIQ’s API — you can use this to perform queries, retrieve identities, objects, etc.

log (org.apache.commons.logging.Log)
Used for writing to the iiq.log file — very useful for debugging.

wfcontext (WorkflowContext)
Provides access to variables, workflow state, and context of the currently running workflow.

wfcase (WorkflowCase)
Represents the current instance of the workflow execution — useful for case tracking and metadata.

workflow (Workflow)
The actual workflow definition object. You can inspect properties like steps and transitions.

step (Workflow.Step)
The current step that is being executed — useful if your logic depends on step-specific behavior.

approval (Approval, only available in approval steps)
Contains approval-related data such as who the approver is, what they’re approving, etc.

item (WorkItem, only available during manual approvals)
Refers to the work item currently assigned to a user for approval.