Toggle menu

Self Service and User Requests - Interacting with Workflow Processes

Updating Process and Task Descriptions

At the moment the process doesn't look great, especially in User Requests where the same text "A Simple Process" is repeated in both the title and description.

User Requests - In Progress
 

You can update the information displayed in Self Service and User Requests during the lifetime of your process.

The text in bold at the top of the card is the name of our process model (written to the "subject" data of the history of this process instance). The text beneath it is the description of the process model (written to the "historyDescription" of the instance's history).

Updating the Process Description

Open the workflow modeller and edit the "A Simple Process" model. Without selecting any elements the panel at the bottom of the modeller displays the model properties.

Leave the name as "A Simple Process" so it doesn't get confused with any of your real processes. Change the description to #PROCESSDESCRIPTION# - #STATUS#.

Model Properties
 

The ## marks are used to flag that a value will be fetched from a process variable. In this case one called PROCESSDESCRIPTION and one called STATUS. We'll set these variables in a script task.

Add a script task between the start event and user task.

Add Script Task
 

Add the following to the script, then save and deploy your model. For more information about creating process variables see Process Variables.

execution.setVariable('PROCESSDESCRIPTION', "Website Enquiry");
execution.setVariable('STATUS', "Reviewing your request");

Now when a request is raised and viewed in User Requests, it looks like this.

In Progress - Updated Description
 

Note that normally a process description overrides the process name wherever the name would normally be output. If a fixed value were added to the description above, you'd see the description used twice (once in bold and once beneath). However, because the ## substitution takes place after the process starts, the name is set as "A Simple Process" and the description is updated later.

Further Updates

A processes description can be updated any number of times during a workflow. Add another script task after the user task to change the status variable to "Request Complete".

Tasks

The user tasks in your workflow process have names and descriptions that behave in exactly the same way as the process name and description.

Try adding a new description to the user task that includes a process variable.

Last modified on January 22, 2024

Share this page

Facebook icon Twitter icon email icon

Print

print icon