Follow

Process Management Framework - Executing a process from a link

Article last updated on the 8th of August, 2022.

The contents of this article may be subject to change due to ongoing development of the Process Management Framework product.

1. Case description

It is possible to run WorkPoint processes in web browser windows using a link provided in e.g. an e-mail.

The link which executes the process can include parameters which can be used by the process, e.g. to define a business module or list item ID to use in the process.

In this article, we will provide an example of how a link can be used to execute a process, and how to use parameters from the link in a WorkPoint process.

For this demonstration, we will create a process which updates the meta data of a document found in a Documents library on some entity on some business module.

This process will include the following step types:

  • Get item
  • Item form
  • Update item

2. Implementation

First of all, let's find an example document which we would like to edit meta data for using our process.

In this example, the following case has the following document named "Report":

To access this document using the Get item process step, we need the following information:

  • The ID of the business module of the entity (in this case, the id of the "Cases" business module).
  • The ID of the entity where the document is located (in this case, the id of the "Financial statement 2022" entity)
  • The ID of the list item (in this case the ID of the "Report" document)

In this example, we have the following IDs to work with:

  • Business module ID: 1a0d3d68-e19d-4cf9-ba4f-0c65bbbb5cdc
  • Entity ID: 17
  • List item ID: 1

Now, let's create the process to update the document.

First, we create a new process from scratch, title it "Update document from link", select the User Process type and place it in a custom group we have made called "Item processes":

WorkPoint Process Builder - Google Chrome

We can then add the first step, the Get item step, to our process.

We are going to configure the options for the Get item step as follows:

The values for all the fields except the "Entity site list" field will eventually come from the parameters in the link we use to run the process. In this instance, we simply hard-code the name of the Entity site list to "Documents".

Next, we add an Item form step. This step will take the output from the Get item step as Step Input:

Additionally, the options of the Item form will be configured as follows:

Again, the values for all fields, this time except the Content type" field, will eventually come from the parameters of the link used to run the process.

For Content type, we can find the content type of the item we want to update, in this case the document content type, which for us has an ID of "0x01010068E16565ACF80A4DB7D87CD408FB80CF".

Next, we can add an "Update item" step, which takes the output from the Item form as Step Input:

Additionally, the options for the Update item step is configured as follows:

Here we have provided the same values in the fields as in the previous steps, but for the Item ID field, we have added the following adaptive expression to get the Item ID from the Get item step:

GetAListItem.ID

This ensures that the item we are updating is the same item as we accessed in the Get item step, using the parameters we provide in the link we use to run the process.

Speaking of the link to run the process, we need another piece of information to be able to run the process: the ID of the process we want to run.

Administrators can find this ID in the hidden list of your processes, located at /sites/[your WorkPoint site]/lists/workpointprocess.

In this instance, the ID of the process we have just created is "3daa5cdf-8628-43cc-8710-650328cc09fe".

We can now generate a link to run the process. For this purpose, we follow this url format:

https://embed.workpoint365.com/process?spHostUrl=[WORKPOINT ROOT SITE URL]&Locale=en-us&processId=[PROCESS ID]&BusinessModuleID=[BUSINESS MODULE ID]&EntityID=[ENTITY ID]&ListItemID=[LIST ITEM ID]

For the link to work, you need to replace all instances of [] with the values which should be passed to the process in the corresponding fields.

The WorkPoint solution we are using for this example and which we need to replace the [WORKPOINT ROOT SITE URL] parameter with is "https://workpoint365test.sharepoint.com/sites/anm0023".

As previously mentioned, our various IDs for this case was:

  • Business module ID: 1a0d3d68-e19d-4cf9-ba4f-0c65bbbb5cdc
  • Entity ID: 17
  • List item ID: 1
  • Process ID: 3daa5cdf-8628-43cc-8710-650328cc09fe

From this information, the link to run our process to update the Report document would then be:

https://embed.workpoint365.com/process?spHostUrl=https://workpoint365test.sharepoint.com/sites/anm0023&Locale=en-us&processId=3daa5cdf-8628-43cc-8710-650328cc09fe&BusinessModuleID=1a0d3d68-e19d-4cf9-ba4f-0c65bbbb5cdc&EntityID=17&ListItemID=1

In the next section, we will run the process in a web browser using the link.

3. Execution

Let's take the link we previously worked out and paste it into a web browser.

Once we navigate to the link, the process starts in the web browser:

Next, we click the "Run" button and continue to the Get item step, and eventually to the Item form:

Here, we have changed the name of the document and the document category.

Let's click continue and go to the Update item step:

Once the process has completed, we can click the "Close" button.

Now let's go to the document and see if the changes have gone through:

We can see that the changes have gone through and we have successfully changes document metadata in the browser using a link with custom parameters.

4. Notes

It is possible to pass custom parameters to processes executed from a link.

This is done by appending the URL with the parameter name and it's value.

Building on the previous example from this article, we have the following URL to run the "Update document from link" process:

https://embed.workpoint365.com/process?spHostUrl=https://workpoint365test.sharepoint.com/sites/anm0023&Locale=en-us&processId=3daa5cdf-8628-43cc-8710-650328cc09fe&BusinessModuleID=1a0d3d68-e19d-4cf9-ba4f-0c65bbbb5cdc&EntityID=17&ListItemID=1

Let's say we want to add a custom parameter called "someValue" which has the value "f6a5c0eb-149b-4d24-ac9e-fb94649d0aa1".

Bear in mind that "f6a5c0eb-149b-4d24-ac9e-fb94649d0aa1" is a completely arbitrary value and only used as an example.

We can append the following string the the end of the URL above:

&someValue=f6a5c0eb-149b-4d24-ac9e-fb94649d0aa1

The new URL then becomes:

https://embed-test.workpoint365.com/process?spHostUrl=https://workpoint365test.sharepoint.com/sites/anm0023&Locale=en-us&processId=3daa5cdf-8628-43cc-8710-650328cc09fe&BusinessModuleID=1a0d3d68-e19d-4cf9-ba4f-0c65bbbb5cdc&EntityID=17&ListItemID=1&someValue=123

To demonstrate that we can use this parameter and it's value in the process, we can add a custom form to the process:

WorkPoint Process Builder - Google Chrome

On the Custom Form, we add a Note field which we title "Some value":

For the "Value" field, we add the following adaptive expression to display the value from the someValue" parameter which we pass in the URL we use to run the process:

WorkPoint Process Builder - Google Chrome

"someValue" is the name of the parameter we pass to the process through the link.

After saving and publishing the process, we can run it using the URL we just constructed:

We can see that the value from our parameter in the link (f6a5c0eb-149b-4d24-ac9e-fb94649d0aa1) is displayed inside the note field in our custom form.

This functionality can e.g. be used to pass GUIDs or IDs of various items to a process.

Have more questions? Submit a request