Please enable JavaScript to view this site.

Process Designer

Navigation: PHP API > Other functions

URL for accessing a step (getStepUrl)

Scroll Prev Top Next More

This function allows you to generate the URL for accessing a specific step by a specific user.

Parameter

Type

Description

$workflowId

string

Workflow ID of the step

$userName

string

Username (optional); The name of the current user is set as default value

The function returns the URL for accessing the stated step by the user.

The purpose of the URL created with the API method getStepUrl is to grant the user encoded in the key at least read access for the step (e.g. for display in a JobSelect overview for users who do not have access to have the process in general). If the logged-in user already has write access to the step, it takes precedence. This means that the step is also opened for this user. If the logged-in user does not have write access, it is verified that the logged-in user corresponds to the user in the key. If this is not the case, a corresponding error message is displayed.

Example:

$workflowId = $this->getWorkflowId();

$userName = 'admin';

$stepUrl = $this->getStepUrl($workflowId, $userName);