a!startProcessLink() redirecting back to last clicked PM

I am using a!startProcessLink() to create four different actions from a main page. Main page is part of a process model which contains start node >> main Page (where all four start process links are configured) >> end node (configured to terminate). 

When i launch main process model it shows me page with four link e.g "A", "B", "C" & "D". I also have one "exit" button as buttonWidgetSubmit in main page. If i click on any of the link it will it will launch related PM and clicking on "Back" button will redirect to the main page. Problem is that when i click on "exit" button afterwards, process redirect me to last clicked link instead of completely exit process.

e.g.

main page  >> link "A" >> back button >> main page >> link "B" >> back button >> main page >> clicked exit will redirect me as if i clicked on link "B" and open "B"'s UI.

Any advise would be great help. 

Note: "All in tempo under Action tab"

Thanks,

Ajay Pandey

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer
    That definitely does sound weird - have you done any debugging steps yet to verify that there isn't something accidental happening? Also would you be willing/able to upload a small screenshot of your process model?
  • Thanks for reply , Yes i have debut the process which looks completely normal flow. It shows me main process as active instance until i click on the exit button. As soon as i click on exit button the older instance of main process mark as complete and new instance of PM "B" created. Once i click on back button from "B" another new instance of main PMcreated and "B" completes.
  • Sorry, its restricted environment so i cant upload anything but i can provide all the details required to understand issue.
  • 0
    Certified Lead Developer
    in reply to ajayp
    Are you able to reproduce this behavior either in a secondary environment or at least a secondary unconnected app which you could then either share an export or at least screenshot(s) demonstrating the issue occurring?
    If this continues and you are able to confirm it isn't a bug in your code etc, you might look into opening a support case for the issue and finding a way to demonstrate it to the support personnel.
  • 0
    Certified Lead Developer
    in reply to Mike Schmitt
    I've encountered this behavior when using process task links on a form started via a related action. It is annoying, but the basic idea is that Appian retains the context stack for a user and returns the user to the previous context. I've copied the exact phrasing below. It isn't documented that well and can be confusing in situations like these. The product use case they gave me was #934.

    When a task is completed, the user is redirected to the URL where the user initiated the task from. In most cases, this is a report on a record view or site page. If they complete the task from the task tab, it returns to the task tab URL. In this defined customer use case, they are being redirected back to the the related action. The reason you are seeing this invoke a new related action is that currently both related actions and actions are invoked or kicked off when navigated to directly via the URL.
  • 0
    Certified Lead Developer

    I've been able to build a small app where I can easily reproduce this behavior.  I think the problem errs a bit further into "unexpected behavior" territory than what you described,  - in the case of this behavior, I can see no justification (accidental or otherwise) that the "exit" button click from the main parent "action" form should invoke the related action again instead of dumping the user back to the Actions tab as expected.

    One note - I believe I've confirmed that the behavior only happens when viewing the task from the Actions tab; if, for example, I leave the task open and click over to Tasks and open it from there, the Exit button behaves as normal, regardless of whether I click into and out of either of the start process links first.

    Please see the attached app (contains all precedents and nothing overly burdensome).

    Test Activity Chaining Demo.zip

  • 0
    Certified Lead Developer
    in reply to Mike Schmitt
    I agree with you fully, Mike. The behavior is weird and has caused me to rework certain designs to avoid the issue alltogether.
  • Thats correct mike. If you use task tab it will behave like an individual task however when you go back and forth on main interface it will show you "The task has already been submitted." message since the previous task already been submitted.

    I am thinking to avoid using startProcessLink function in using old fashion radio buttons to call desire subprocess. Will give a last try to open a support case.

    Thanks,
    Ajay
  • 0
    Certified Lead Developer
    in reply to ajayp

    So far my main use case for Start Process Links has been in Task Reports, since it allows me to essentially create purely database-backed "tasks" that aren't actually tasks and don't rely on running processes / clunky task reports / group assignments to pull back. Luckily there's no such issue when using them from task reports, and I assume there is similarly no issue when using them in regular reports or on Record Dashboard forms. I don't think I've used any inside an actual running process yet, though I understand that there are probably valid use cases for this.

    By any chance have you tried using Submit Links in your parent process task? Using submit links will not only cause your form to submit and step forward to a chained subprocess / etc, but also you can use the link itself to store a specific value into a rule input (essentially mimicing how a regular button works), which could be used to select the desired subprocess (since you mentioned maybe needing to use radio buttons for this).

  • Thanks Mike Schmitt (mschmitt) & Josh for your suggestions. At this moment i am proceeding with large button layout ( so that look and feel would be same for end user). This way i can achieve my goal to go back and forth from main page to all different pages. I'll also look for Appian support response on mentioned behavior.