Tutorial: Exposing Tasks To External Participants

Exposing Tasks To External Participants

SPARK External Participant Toolkit - Exposing Tasks Externally

Overview

The SPARK External Participant toolkit has two primary methods by which tasks can be exposed to non-bpm users. The first method is to implement one of the included integration services as a Team Filter Service, which will either assign the task to an external user, or assign the task and notify the user via email, depending on the service being used. The second method is to use the "Register Task EPS Request" General System Service, which will assign the task to an external user, returning a URL which can be used to access the task.

Team Filter Service

The first way to assign an external user to a task is through the Team Filter Service configuration option for the relevant task, under Assignments. To use this method, set either "Assign And Notify External Task Participant" or "Assign External Task Participant" as the Team Filter Service.

Once one of these services has been selected, all that is left to do is set the data mapping configuration options for the relevant service, and the toolkit will take care of assigning the task to the correct participant, as well as notifying said participant if the "Assign And Notify" service was chosen. The data mapping configuration options are explained below.

Assign And Notify External Task Participant

  • processInstanceId (String): The process instance id. Should always be set to tw.system.currentProcessInstance.id (and must be set here due to limitations in Process Designer)
  • stepId (Integer): The step id. Should always be set to tw.system.step.id (and must be set here due to limitations in Process Designer)
  • runAsUserId (String): (Optional) Set your own user id for external participant. Note that if this is left blank, the toolkit will automatically generate a unique id.
  • notificationRecipient (String): email address to send notification to
  • notificationSubject (String): Subject to send email with
  • notificationMessage (String): Message to send in notification email. The External Participant Toolkit allows for the custom tag <link> to be used here (e.g. <link>Link Text</link>). The service will automatically insert the correct URL as a link when this tag is used.

Assign External Task Participant

  • runAsUserId (String): (Optional) Set your own user id for external participant.
  • autoDefine (Boolean): If set to true, service will automatically generate a new temporary user to assign task to.

General System Service

Additionally, tasks can be assigned at a more granular level by using the "Register Task EPS Request" General System Service. This should be set as a system task, and connected to through an intermediate timer event on the task which you wish to expose externally.

The system service will require several data mapping configuration options, including a stepId, which must be set in the Pre Assignments configuration option of the task that is to be run, under the Pre & Post heading.

A list of all of the data mapping configuration options are as follows:
  • processInstanceId (String): The process instance id. Should always be set to tw.system.currentProcessInstance.id (and must be set here due to limitations in Process Designer)
  • stepId (Integer): The stepId, as set above.
  • runAsUser (String): The temporary user id to set. This should be set via a process variable, and can either be set to some custom value, or by setting the default value to bpmext.eps.generateAutoUserId(), which will automatically generate a unique user id. Note that Process Designer will flag this with a warning, which may be safely ignored.
  • autoUser (Boolean): If set to true, the service will automatically generate a userId. If false, a user id must be provided in runAsUserId
  • validUntil (Date): Date the task should be valid until
The service will return a URL that gives access to the task, which can then be sent to the external user, either through email, or through some other available implementation.