Process model related issue

Hi,

I have a Process model for HR approval. In the form I am capturing cancel and submit button values in a text rule input (buttonValues).

But when HR is cancelling the button the flow gets completed which I do not want to happen as the task not completed.

I want the flow to stay at the same position so that approver can again complete his task.

could someone please help me here how to achieve my goal?

Thanks

Faisal

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to faisalf0003

    To add my 2 cents to this story, a task in a process should never have a cancel button. At least not in terms of that it stops the functional process. Each task must have some business value as outcome. If the business process includes a "non-happy" ending, then this must be implemented.

    But, a task in a process flow itself cannot be cancelled. This would be the same as a refusal to work!

    Regarding start forms, I always include a cancel button (and the xor in process). In my experience this "just navigate away" pattern is not understood by many people.

Children
  • Yes Stefan,

    I have implemented the logic for Start form as you have suggested.

    Thank you and Mike and everyone here. I had a nice experience for this issue.

  • 0
    Certified Lead Developer
    in reply to Stefan Helzle
    But, a task in a process flow itself cannot be cancelled.

    You should be more specific when you say this, because I immediately think of all the use cases where this is very untrue.  I know you're thinking of cases where a process is started by user A and eventually assigned to user B for approval / data input / etc, and therefore we shouldn't allow user B to cancel.  But the way you've written it, implies that we also shouldn't include "cancel" buttons in instances where user A starts a process, gets a few steps in, and then they realize the process is not needed.  Any such step could (and should) include "Cancel" functionality, or else there will be abandoned instances to the moon and back.

  • The clarification seems to be, the submitting user can always Cancel on any of their submit steps (which ends the process and does not submit for approval/processing).  In any situation I have where the approvers or anyone downstream needs the ability to end the process negatively, this is Denied.  On a user input task where the user is saving for later, not yet submitting but leaving the task available for themselves, I typically use Save for Later.

    In the end-negatively situations, I do most often suggest using Reject to the submitting user instead (or at least have this available along with Denied), where they can resubmit with any changes, or at this point the submitter can also use their Cancel functionality if they are not resubmitting.  I only include a Deny option when explicitly required, and it is not often.

  • 0
    Certified Lead Developer
    in reply to Chris

    Interesting philosophical rabbit hole ...

    Let's see. What does "Cancel" mean? At start form level it means "Sorry, clicked wrong button". At task level, inside process flow, it means refusal to work. At business process level it means "we do not accept your request for loan".

    This is how I think about it in general with only some rare exceptions.

    I do almost never implement a "Save&Close" as this is too similar to "Save Draft".

    When my task is "Approve Request", then I have some controls allowing the user to select the outcome and a single submit button to complete the approval.

  • 0
    Certified Lead Developer
    in reply to Stefan Helzle
    I do almost never implement a "Save&Close" as this is too similar to "Save Draft".

    I've run into a lot of instances in the past where "Save Draft" is insufficient.  Mainly because when Appian created it, they didn't seem to think we needed any control over what the button does - it can't execute external saves, it can't kick off process instances (or do anything within the current process instance), and can't even force local variables to be saved into Rule Input values.

    At start form level it means "Sorry, clicked wrong button"

    I guess my main point here was just that (especially as the initial user) this concept can extend many steps into the process flow, so isn't exclusively relevant to "Start Form" level.  I rarely (intentionally) use actual start forms due to flexibility reasons, preferring instead to set up an initial task as the obligate "start form", and always at least configure "cancel button" functionality here, but also extend that to any initial steps the initiating user does prior to any point-of-no-return (assigned tasks being kicked off, important DB entries being created, etc).