Most people start workflows from the pages Rock provides, covered in Launch a Workflow. Sometimes you’ll want your own link that opens a workflow directly, such as a button in an email or a row in a report. For example, the Dynamic Data Block runs a database query and shows the results in a grid. Its Selection URL setting turns each row into a link, so staff can start a workflow for any person on the list with one click. The URL parameters in the following sections tell the Workflow Entry block which workflow to open. Workflow Entry The Workflow Entry block checks for a WorkflowId or WorkflowGuid parameter in the URL. If found, it will load the existing workflow. If parameters are not included, or a workflow is not found, a new workflow is created. Either way, the block needs to know the workflow type, either from its block settings or from a WorkflowTypeId in the URL, and an existing workflow only loads if it’s that type. The workflow is then processed, and the block will look for the first active form action on the first active activity. If a command query string parameter is included, the block will immediately process the form, assuming the person selected the included action. The Workflow Entry page that ships with Rock uses the route WorkflowEntry/{WorkflowTypeId} to start a workflow and WorkflowEntry/{WorkflowTypeId}/{WorkflowId} to open an existing one. In the following examples, 17 is the WorkflowTypeId. Example links https://yourservername/WorkflowEntry/17 starts a new workflow of the workflow type with Id 17.https://yourservername/WorkflowEntry/17/250 opens the existing workflow with Id 250 and shows the form it’s waiting on.https://yourservername/WorkflowEntry/17?PersonId=45 starts a new workflow and hands it the person with Id 45. Add an Attribute Set from Entity action to the workflow to save that person to an attribute.https://yourservername/WorkflowEntry/17?Source=Email starts a new workflow and sets its attribute with the key Source to Email. Any parameter that matches a workflow attribute key works this way.~/WorkflowEntry/17?PersonId={Id} in the Selection URL of a Dynamic Data block starts the workflow for the person on the row you select, as long as the query returns each person’s Id in a column named Id.