Skip to content

Workflow Integration

One of the strongest features of Advanced Forms is its deep integration with Rock's Workflow engine. This allows you to automate complex business logic—like approvals, notifications, and data updates—triggered by form activity.

Workflow Activities

The plugin provides four custom workflow activities found under the Rock Forms category in the workflow builder.

1. Advanced Form (Action)

Purpose: Pauses a workflow and waits for a user to complete a specific single form. * Use Case: An approval workflow needs to ask the applicant for "Additional Information" before proceeding. * Key Configuration: * Form Type: The form the user must complete. * Require New Entry: If True, forces a fresh submission. If False, it will look for an existing valid entry first. * Notification Email: Sends an email to the assigned person with a link to the form. * Max Wait Time: How many days to wait before the activity times out. * Entry Qualifiers: Key/Value pairs to match specific entries (advanced).

2. Advanced Form Pack (Action)

Purpose: Pauses a workflow and waits for a user to complete an entire Form Pack. * Use Case: "Please complete your Volunteer Application Packet." * Configuration: Similar to Advanced Form, but selects a Form Pack. Supports Person Action Tokens for unauthenticated users.

3. Set Attributes from Form Entry

Purpose: Extracts data from a submitted form and saves it into Workflow Attributes. * Use Case: A user fills out a "Contact Update" form. This action reads the "New Phone Number" field and puts it into a PhoneNumber workflow attribute so a subsequent action can update the Person record. * Configuration: * Form Entry: The workflow attribute holding the Form Entry object. * Answer Mapping: Map Form Element -> Workflow Attribute. * Lookup Defined Values: If checked, returns the GUID of selected defined values instead of the text.

4. Set Attributes from Form Pack Entry

Purpose: Same as above, but for Form Packs. * Configuration: Allows mapping fields from any form within the pack to workflow attributes.

Workflow Triggers

Instead of a workflow waiting for a form, you can have a form launch a workflow when it's saved or submitted.

Configuration

Triggers are configured directly on the Form Type or Form Pack definition page.

Trigger Events

  1. Draft Created: Launches a workflow as soon as a user starts a form.
    • Use Case: Create a "Lead" tracking record or send a "Thanks for starting!" email.
  2. Submitted: Launches a workflow when the user completes the form.
    • Use Case: Start an approval process, send a confirmation email, or update person attributes.

Context

When a workflow is launched by a trigger, the Entity context is set to the FormEntry or FormPackEntry. You can use this context to access all data submitted in the form.

Scheduled Tasks

The system uses two background tasks to process these triggers reliably:

  1. LaunchFormTypeChangeWorkflows: Monitors Form Entries.
  2. LaunchFormPackChangeWorkflows: Monitors Form Pack Entries.

These tasks ensure that even if a form submission happens quickly or during high load, the workflow trigger is queued and processed asynchronously, preventing data loss.