This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Temporal Membership Approval - ARS 7

In our old instance of ARS, we had a workflow that executed when someone requested temporary membership of a group. This would add them no matter what if the hours they wanted didn't exceed the maximum amount of hours and if it was more, it would prompt approval.

In our new ARS 7 setup, I have done the exact same, except it now prompts for approval even if the hours entered is less than the max amount. When they enter a reason, it informs them "The operation has been submitted for approval" except it instantly adds them to the group after they submit a reason and not informing them they've been added to the group.

I've noticed it's not running my workflow until after they submit a reason in the approval dialog. In ARS 6.9, it would run the workflow immediately. Is this a bug?

  • How are you triggering your workflow in the first place? - i.e. what is your start condition - just a group membership change?

    Are the internals of your workflow the same?

    I would assume that you must have an If-Then activity in your workflow that looks at the time period of temporal membership and decides whether or not the approval is required?
  • The workflow is triggered by a virtual attribute change. This virtual attribute is on the form they fill out and is also a required field. The workflow if-then activity checks for max automatic hours, which is a stored virtual attribute on the group class that is the most hours they can request for elevation. The If-Then activity checks the max automatic hours against the requested change for the virtual attribute in the form to decide if they'll automatically be placed in the group or if more than the max automatic hours, it'll trigger the approval.

    From what I'm seeing, they get the approval prompt right after saving. It isn't running the workflow to see if the activity needs approval but after they enter a reason for approval, if the hours is less than the max, it automatically places them in the group but the page displays that the operation has been submitted for approval even though it was successful.
  • Screenshots of your Workflow configuration would be useful.

    Was this Workflow exported form ActiveRoles Server 6.9 or recreated manually in Active Roles 7.0?

    There should only be two scenarios when a Workflow Approval step is bypassed by default: when the Initiator is an Active Roles Administrator, or when the Initiator is an Approver.

    If you want to always enforce an Approval in a Workflow , click the "Configure" button at the top, then select '"Run as" options' and check off "Enforce Approval"
  • Here is the workflow, but like I said, it isn't executing the workflow until after I get the approval prompt.

     

  • I can't tell much from just the structure, I would also need to see the triggers and If/Else branch conditions. However, I will note that since If/Else branches are processed from left to right, best-practice would be to have your approval rule in the left-most branch.
  • GT Max Automatic Hours - There are no parameters
    LE Max Automatic Hours - Checks Requested Changes of "TemporalHours" virtual attribute is less than Max Automatic Hours for the group (Checked by Script Function)

    Workflow is triggered by a change in the TemporalHours virtual attribute.

    This is exactly the same way we have it set up in our ARS 6.9 instance... Like I said before, it isn't running the workflow until after the approval prompt. After specifying a reason and hitting ok, does it only run the workflow and it runs correctly.

     

  • In order to display the Approval Prompt, the Workflow must be getting triggered properly.

    From your description and the Workflow layout, the issue lies with the script being executed in the first If/Else branch, or the condition on the value that it returns. The Approval Step is being executed as your default condition, when the first If/Else branch does not apply.
  • The script being executed passes the correct value. I've tested this by doing an Out-File on the return value. As I've explained, this isn't executed until after the approval prompt.

    I've even entered in false triggers into the approval if-else branch (Description of target object equals 1 for instance) and it still prompts the approval window.

    All other workflows are disabled.

    If I leave the workflow but disable the If-Then branch, it works properly....

  • Please post the script and a screenshot of the conditional test in the If/Else branch.
  • Michael,

    You said:

    "The script being executed passes the correct value. I've tested this by doing an Out-File on the return value. As I've explained, this isn't executed until after the approval prompt."

    Where's the script? I don't see it as an activity in your workflow?

    Is it a policy script that is part of an provisioning policy and if yes, what type of handler is it using - i.e. on post create? on post modify?