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
    Could suggest me something better here please?

    When implementing a button with functionality like what yours is doing, I sometimes use the label "Save and Close", or something similar depending on the particular situation, which should imply to the user that clicking this button will cause the task to go away but that it will be accessible again in their task list after that (which is the case here).

    When doing this you should always assess whether this is actually needed, versus having the user simply navigate away from the task if they're not ready to complete it yet - for data entry, the button approach can help save user-entered data.  For an approval form, though, I'm not sure what the value is in having the button for this purpose; if the user doesn't want to approve the current work item, they can simply click back to their task list or their site tab, etc.  You never posted a screenshot of what your User Input Task is actually doing, so it's hard for me to tell what best approach to suggest here.

Children
  • You never posted a screenshot of what your User Input Task is actually doing

    The only difference between my Start form and Approval is that they differ by Approve and Reject Radio Buttons and values are saved in a boolean rule input.

    1. The button values are saved in a text rule input.

    Thanks

    Faisal

  • 0
    Certified Lead Developer
    in reply to faisalf0003

    I guess I was imagining you might post a screenshot of your actual interface (in the interface designer, and including an example of the user selection(s) being populated and including the rule inputs to confirm that the value is being correctly saved).  Though I'm not sure if this is still necessary after the prior shots you've provided.

    I'm still unclear though - is something still not working as you were hoping?

  • Only loop back option is working Mike. I was given such requirement to implement where we have a cancel button and flow in approval form should not end if user cancels it. I want to know if we any other option are there to implement or only the loop back is the only option? I am happy the functionality is working fine if in case only loop back is a solution for this.

    Here are the screen shots from UI

    a!formLayout(
    label: "HR Approval Form",
    contents: {
    a!columnsLayout(
    columns: {
    a!columnLayout(
    contents: {
    a!textField(
    label: "First Name",
    labelPosition: "ABOVE",
    value: ri!empCollectDetails.firstName,
    saveInto: ri!empCollectDetails.firstName,
    refreshAfter: "UNFOCUS",
    validations: {}
    ),
    a!textField(
    label: "Gender",
    labelPosition: "ABOVE",
    value: ri!empCollectDetails.gender,
    saveInto: ri!empCollectDetails.gender,
    refreshAfter: "UNFOCUS",
    validations: {}
    ),
    a!textField(
    label: "Employee Type",
    labelPosition: "ABOVE",
    value: ri!empCollectDetails.empType,
    saveInto: ri!empCollectDetails.empType,
    refreshAfter: "UNFOCUS",
    validations: {}
    )
    }
    ),
    a!columnLayout(
    contents: {
    a!textField(
    label: "Last Name",
    labelPosition: "ABOVE",
    value: ri!empCollectDetails.lastName,
    saveInto: ri!empCollectDetails.lastName,
    refreshAfter: "UNFOCUS",
    validations: {}
    ),
    a!textField(
    label: "Phone Number",
    labelPosition: "ABOVE",
    value: ri!empCollectDetails.phoneNumber,
    saveInto: ri!empCollectDetails.phoneNumber,
    refreshAfter: "UNFOCUS",
    validations: {}
    ),
    a!textField(
    label: "Sub Employee Types",
    labelPosition: "ABOVE",
    value: ri!empCollectDetails.empSubType,
    saveInto: ri!empCollectDetails.empSubType,
    refreshAfter: "UNFOCUS",
    validations: {}
    )
    }
    )
    }
    ),
    a!boxLayout(
    label: "Box",
    contents: {
    a!radioButtonField(
    label: "",
    labelPosition: "ABOVE",
    choiceLabels: { "Approve", "Deny" },
    choiceValues: { true(), false() },
    value: ri!approvalDecision,
    saveInto: ri!approvalDecision,
    choiceLayout: "STACKED",
    validations: {}
    )
    },
    style: "STANDARD",
    marginBelow: "STANDARD"
    )
    },
    buttons: a!buttonLayout(
    primaryButtons: {
    a!buttonWidget(
    label: "Submit",
    value: "Submitted",
    saveInto: ri!buttonValue,
    submit: if(isnull(ri!approvalDecision), {}, true()),
    style: "PRIMARY"/*loadingIndicator: true*/

    )
    },
    secondaryButtons: {
    a!buttonWidget(
    label: "Cancel",
    submit: true(),
    value: "Cancelled",
    saveInto: ri!buttonValue,
    style: "NORMAL",
    validate: false
    )
    }
    )
    )

  • 0
    Certified Lead Developer
    in reply to faisalf0003
    I want to know if we any other option are there to implement or only the loop back is the only option?

    Sorry but I'm having a really hard time understanding what you mean.  Can you simplify a bit for me?

    • Current Behavior, versus
    • Behavior you were expecting / hoping to achieve

    Also: for your code, please look into posting your code in the Code Box ("Insert" --> "Insert Code") as this preserves formatting like indentation and keeps a long stretch of code from blowing out a single comment like has happened here.

    example code box