• Parallel approval

    By J Flidr 2 decades ago

    Is it possible to setup a workflow in which several approval can approve in parallel?

    (Next step would be accessible only after all of them have approved it)

    • parallel approval

      By Mark Demicoli 2 decades ago

      Parallel approval could be implemented as an example workflow;



      As follows:


      1. Create a Role "Approvers" which references a multi-name field "ApproverNames". This field contains the users required to approve the request (ie could be editable or computed).
      2. Create an Action "Approve" which updates a multi-names field "ApprovedNames" . Every time an approver clicks Approve that user's name is appended to the field.
      3. Create a Condition which compares ApproverNames with ApprovedNames. Return True only when all approvers are contained in ApprovedNames.
      4. Create another Action which progresses the request to the next stage. This Action is visible only on the Condition created in step 3.





        pretty simple? The risk is save conflicts as multiple users are responsible for actioning the document at the same time. This shouldn't be a problem on a single R7+ server (ie enable document locking). In a multi-replica setup you could make the Approve action create response documents. Each response document corresponds to a single user approval. The Condition compares the authors of the responses to the ApproverNames field.



        I suppose this scheme could be integrated into the framework…. will wait to see if we get any more similar requests.



        ~MD :-)
      • parallel approval

        By J Flidr 2 decades ago

        Thanks Mark,

        I've just tested and it works. However I slightly modified your design. I'm still using two multivalue fields Approver and Approved.



        There are Approve1 and Approve2 actions both removing @UserName from Approver and adding to Approved. Approve1 does not change state, e.g. it's still InApproval whereas Approve2 goes to Approved state.



        There are two conditions based on a fact if Approver field contains just a one(last) approver or not.



        Here's my second comment. It would be easier if the condition for an action could be in positive or negative form, e.g. "show this action if a praticular condition is NOT true" ;-)

        • Condition selector in Action docs

          By Mark Demicoli 2 decades ago

          You could NOT the condition in the condition formula and respect this in the condition title, could you, NOT? Sorry, just entertaining myself :-) But seriously, I've thought a little about how to improve conditions and the interface to actions… no genius yet. Your suggestion is a good start I think, but in itself difficult to implement in the UI. The twin anded condition selectors in the Action are multi. The difficulty is in showing a NOT tickbox against each on the form. Another way we could do this is to design a 'condition builder' embedded in the Action form itself. Similar to the FT query builder.