Skip to main content
April 4, 2023
Question

Starting a Process Model through email and user being directed to Start Form or User Input Task

  • April 4, 2023
  • 8 replies
  • 0 views

Hi All,

Recently got an inquiry for use case where users would like the ability to click a link provided in an email which will navigate them to either a Start Form or User Input so they can reach the necessary screen faster. Users recently want to streamline their emails and provide a link to the necessary page where users will perform the necessary action that is being notified in the email. 

Issue with this inquiry I believe is there is not possibility to do this outside of the start page URLs on the sites. Given there are about two dozen different forms they could be wanting to access through the email I can't think of a solution to provide a unique link for each one of these process models.

Does anyone have a use case where they made this work or a useful plugin that may make this possible?

8 replies

April 5, 2023

You can do that by creating a Process report of Task type in which you will add two extra columns for processInstanceID and TaskID. Then you need to create a rule which takes processInstanceID as input and filters the process report data on the basis of a processInstanceId and then property the taskID from result and use it in processTaskLink to generate opaqueTaskId. And at last concat the site task page url and opaqueTaskId to create the task link and send this in email.

Example code: 

a!localVariables(
  local!pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 1),
  local!taskLink: index(
    index(
      a!queryProcessAnalytics(
        report: cons!PA_TEST_REPORT,
        query: a!query(
          filter: a!queryFilter(
            field: "c4",
            operator: "=",
            value: ri!processInstanceId
          ),
          pagingInfo: local!pagingInfo
        )
      ),
      "data",
      ""
    ),
    1,
    null
  ),
  local!processTask: a!processTaskLink(
    label: "Process Task Link",
    task: index(local!taskLink, "c5", null),
    openLinkIn: "SAME_TAB"
  ),
  concat(
    "https://qaem.appian.community/suite/sites/acme-solution-site/page/home/task/",
    index(local!processTask, "opaqueTaskId", "")
  )
)

In the process model, create two paths, one for sending email and other for UIT and other nodes.

April 5, 2023

Thanks Sanchit, this looks promising. I'll explore this!

stefanhelzle0001
Brainy
April 5, 2023

When I design an Appian application and need to assign a task to a user, he/she gets an email that includes a link which directly navigates to that task. Do you build your apps in a different way? How does a user know what to do and when?

April 5, 2023

I think he do not wants to use the OOTB send notification to task assignees feature and instead wants to send a custom email with the task link.

April 5, 2023

Correct, they want a custom formatted email providing a link that would navigate to the appropriate task.