Skip to Content
avatar image
Former Member

block with parforeach, howto exit ?

Hi All,

For an approval Workflow , i tried to use the block step with parforeach in order to allow parallel processing. I want to come out of the block as soon as one of the approvers has Rejected the decision.

Following problems i am facing.

->Condition within the parallelprocessing tab to come out of the block: no effect

->Since i am using this approval workflow as a subworkflow so i thought to complete the workflow using process control and setting a flag variable but process control with complete workflow as the processing is setting the WF status to Logically deleted and hence the Main Workflow is also logically deleted.

Any solution Please ?

Thanks

LS

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    Aug 14, 2014 at 12:53 PM

    Hi Linda

    Normally this is how it works (they way you want) and not logically deletes itself.

    I created an example and here is the result

    How the WF was setup:

    Workflow Design:

    The above sets container element APPROVED to NO in the rejection branch

    Parallel Processing Tab in the Block header:

    Binding between main WF and the Block structure... take note of what is being bound:

    Setting of the Agents in the Decision Step which is inside the block for parallel processing

    Are we doing the same or are we assigning AGENTS table here in the above decision step? That's where it tends to get Logically Deleted in case of end condition.

    Regards,

    Modak


    Add comment
    10|10000 characters needed characters exceeded

  • Aug 13, 2014 at 02:53 PM

    Hi Linda

    What condition are you using in "End Condition". Normally it works.

    I hope we are on the same page if we say:

    We are setting a variable (container element) , say LV_REJECTED in the Sub-workflow to true (say 'X') in the rejection branch and passing it back to LV_REJECTED_MAIN container element in the main workflow (binding "from" sub WF "to" main WF) ..... end condition in block is setup as LV_REJECTED_MAIN = 'X'???

    It would be good to see the screen shot of the condition and the binding from the sub WF to main WF and also where you are setting the value for end condition variable.

    Regards,

    Modak

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 14, 2014 at 05:46 AM

    HI,

    Please share your workflow desin

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 14, 2014 at 08:22 AM

    Hi Anjan and Modak,

    Anjan, your article about block is great, thanks.

    The main workflow is not important so i am explaining the Subworkflow problem where i am using parallel block.

    Following is the design of subworkflow, This subworkflow is receiving a table containing the usernames.

    The Subworkflow should return the main workflow a value as yes(if all have approved) or No(if even one has rejected). Within the parallel block there is a user decision and a container operation to set this variable as No if one has rejected.

    Ideally the Block should exit when this variable is set and should not wait for all the other parallel approvers to make the decision. But it does not come out of the block.

    Am i missing something within the block ?

    does this exit condition has no effect when all the work items have already been created and distributed ?



    subworkflow.jpg (23.6 kB)
    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Modak Gupta

      Yes, the Job is running every thirty minutes.

      Latest Update (problem)

      As one approver within the parallel block rejects the decision, the complete subworkflow is setting itself in logically deleted state and hence the main workflow.

      isn't it possible if one approver rejects, the control come out of the parallel block and i can do whatever i want ?

      Please help.

      Thanks