Trying to Generate a StartProcessLink in Process Model

Certified Lead Developer

Hi,

I have a use case where I need to redirect a user to a StartForm  when user clicks on the link in the email. I'm able to generate this StartProcessLink (Pm has specific process parameters that needs to be sent as  well) successfully when I try to execute in an expression rule but when I try to call this expression rule in ProcessModel's Script Task to get the output, it is returning a null value, any suggestions on how to approach it?

Note: We cannot Trigger a Pm and keep it active as we do not know the time frame of when user would be working in it. It can range from a day to a month

Any suggestions appreciated. 

Thanks in Advance. 

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    If you're after a Start Form, it seems like it would be far simpler to simply have the email contain a link directly to a Site tab that's configured to use a start form for that express purpose.

  • 0
    Certified Lead Developer
    in reply to Mike Schmitt

    Thanks for the Response Mike. But no, that is not the case. If it is just a start from I would understand the approach, but we are providing / passing context parameters based on the Unique ID for generating this form.

  • 0
    Certified Lead Developer
    in reply to adithyay811

    If you take the back-end outputs of a!startProcessLink(), i'm guessing you could assemble it (manually) into a URL a user could click on.  I haven't tried this exactly, so your mileage may vary - and i'd caution you that it's pretty far from a supported use case.

  • 0
    Certified Lead Developer
    in reply to Mike Schmitt

    Correct, I'm able to do this, It executes perfectly fine and I'm able to build the URL from an Expression Editor but, When I try to execute the rule in PM or by calling the rule in PM its not working(Returns a null output). So, I'm looking for any other alternate suggestions, so that it can work.

  • 0
    Certified Lead Developer
    in reply to adithyay811

    How exactly are you trying to call it from your PM?  I assume you mean a PM that tries to assemble the URL then send the email?  Can you share some of the code you're trying?

    Edit to add: I can see that the output of the rule changes significantly (for reasons i'm not clear on) when called in the context of a process instance rather than in an expression rule.  I'm guessing this is because it's not really intended to be used in this manner.

  • 0
    Certified Lead Developer
    in reply to adithyay811

    Given the above I'd reconsider the "process start form on a site tab" approach.  Most things that I can think of that you'd pass into a form like this via some Unique ID, could be queried upon the user loading the start form, and persisted to the process variables upon Start Form submission.

    That or just have the calling process launch a subprocess and assign the user a task, instead of sending them a Start Process Link in an email.  I'm still a little unclear why that wouldn't work.  But among the various alternative solutions, it seems to me as if you're probably unnecessarily dismissing at least one or two things that would work just fine for your use case, at least given any deatils you've posted here so far(?).

  • 0
    Certified Lead Developer
    in reply to Mike Schmitt

    Our use case is to display the task on click of a link from the email. We do not want to keep a process running by not knowing when a user wants to complete the task.

    If we need to keep it as a process start form for a site tab, We shouldn't have any context and everyone sees the same start form screen. But our use case is user has already worked on a task completed his set of actions. Now the task need to be worked on a different set of users who can access the task by going to the site tab as we already provided them the option to view their tasks by pulling the necessary information and creating the start process links on the UI for their requests. But user wants to receive a link saying a task has been assigned with the link to navigate him to screen where he can directly work on. 

  • 0
    Certified Lead Developer
    in reply to adithyay811

    All of that could be done in the interface on a process start form kept on a site tab.

    1. email the user (at whatever timing you need) that they've been assigned a new / subsequent work task
    2. the email will contain a link to the site tab containing the start form
    3. upon loading the start form:
      1. the interface will establish which user is looking at it, and look up (query from the DB, etc) the fact that they have a "task" waiting.
      2. other users who navigate to that tab will see a generic / inert interface with no way to start an instance of that process.
  • 0
    Certified Lead Developer
    in reply to Mike Schmitt

    Thanks for the approach. I like it. But a single user can have multiple tasks assigned to him at any given point. So, we cannot automatically load those tasks from the DB information as we will not have a context of which one he wants to work on. 

  • 0
    Certified Lead Developer
    in reply to adithyay811

    In that case it would be relatively easy to show them different options to pick from and then launch the appropritate one upon form submission (perhaps along with a sensible reminder that they "owe" all the items listed).  This seems superior to not being able to do anything, or to having to engineer a brand new solution that defies being actually supported by Appian OOB functionality.

  • 0
    Certified Lead Developer
    in reply to Mike Schmitt

    Yes, currently we are doing that. We are showing a dashboard to the user listing all the tasks that he needs to work on. But was curious if we have the ability to directly show the task page / start form by clicking the link.

    Appreciate your response and trying to figure out an alternate solution Slight smile

Reply Children
No Data