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
  • 0
    Certified Lead Developer

    The functionality you're describing above is not the expected behavior of a "Cancel" button.  If I as a user launch an action or a related action, the first form would usually have a "Cancel" button which, when clicked, I would expect to end the process with no changes made.

    In your process, if one user clicks "Cancel" and ends the process, why wouldn't the expectation be that a different user can launch that action?  If it's something else, why do you have a "Cancel" button at all?

  • Hi Mike/Stewart,

    May be I could not tell my issue in a proper way. 

    I am here describing full issues with the screen shots with comments and doubts. Could you help me?

    I have attached the same.Issue with Form Cancel button.docx

  • To add, there is no reason to Cancel a start form since no process has been created yet.  Remove that button and the user can navigate away if they do not wish to proceed.  "Cancel" is just a label for your buttonWidget which is submitting the form.

    For your XOR, if you do not want the path to change (always save data), why does the XOR exist?

  • 0
    Certified Lead Developer
    in reply to faisalf0003

    FYI you can just post screenshots (preferably small ones, like the ones in your doc) directly into comments here.  That makes parsing issues a little easier when a screenshot is required.

    For your first screenshot: if a Start Form has a Cancel button, then the expectation is that the process instance will be started when the user clicks the Cancel button.  This is just how Start Forms work.  To enable "Cancel" functionality, you simply need to place an XOR node before your first User Input Task, which will check whether the user input was "Cancel", and if so, exit the process prior to doing any other processing.  Instead, you have the start form lead directly to a subsequent task, which I believe is causing behavior that goes against your expectations.

    In cases like this, it might actually be easier to not use a Start Form, and instead have all activity contained in the first User Input Task (of course this depends on details of the use case that you may not have included).

    For your second screenshot: the behavior for the XOR node pictured in your process flow seems to be 100% dependent on the value of "pv!approvalDecision".  If this PV has a value of TRUE, the process will flow on to the "Save Employee Details" node.  With any other value, it will flow straight to the End node.  What is the value of this PV in your pictured process instance?  Is your User Input Task configured to save a value into this PV depending on user input?

Reply
  • 0
    Certified Lead Developer
    in reply to faisalf0003

    FYI you can just post screenshots (preferably small ones, like the ones in your doc) directly into comments here.  That makes parsing issues a little easier when a screenshot is required.

    For your first screenshot: if a Start Form has a Cancel button, then the expectation is that the process instance will be started when the user clicks the Cancel button.  This is just how Start Forms work.  To enable "Cancel" functionality, you simply need to place an XOR node before your first User Input Task, which will check whether the user input was "Cancel", and if so, exit the process prior to doing any other processing.  Instead, you have the start form lead directly to a subsequent task, which I believe is causing behavior that goes against your expectations.

    In cases like this, it might actually be easier to not use a Start Form, and instead have all activity contained in the first User Input Task (of course this depends on details of the use case that you may not have included).

    For your second screenshot: the behavior for the XOR node pictured in your process flow seems to be 100% dependent on the value of "pv!approvalDecision".  If this PV has a value of TRUE, the process will flow on to the "Save Employee Details" node.  With any other value, it will flow straight to the End node.  What is the value of this PV in your pictured process instance?  Is your User Input Task configured to save a value into this PV depending on user input?

Children