5 Replies Latest reply on Jan 28, 2012 1:56 AM by aminmc

    completionCondition for <adHocSubProcess>

    huionn

      Refering to jbpm-examples in http://kverlaen.blogspot.com/2011/07/jbpm-examples-part-2.html, I tried the Ad Hoc process and it works accordingly.

       

      However I have a question regarding the adHocSubProcess - how can I control the completion of sub process?

      I checked the source code of AdHocSubProcessHandler.java. It seems adHocSubProcess support only either "autoComplete" (magic word "getActivityInstanceAttribute(\"numberOfActiveInstances\") == 0") or "not autoComplete".

       

      In case of "not autoComplete", how could I signal or programmatically end the ad hoc sub process?

       

      For example, the sub process should be complete after either reviewed or approved (in the jbpm-example).

       

      Thanks.

        • 1. Re: completionCondition for <adHocSubProcess>
          eaa

          Did you try putting an (non-terminating) End Node inside the subprocess?

          1 of 1 people found this helpful
          • 2. Re: completionCondition for <adHocSubProcess>
            huionn

            I tried to use non-terminating End Node inside the subprocess.

            For non-autoComplete ad-hoc subprocess, it has no effect (the sub process does not end as I wish).

            If ad-hoc subprocess is set to autoComplete=true, without End Node, the ad-hoc subprocess end if any of tasks (Review, Auto-Process, Investigate + Approve) is complete.

             

            However by adding the End Node, I can now control the flow with gateways and signal to achieve the similar effect of completionCondition.

            • 3. Re: completionCondition for <adHocSubProcess>
              mpiraccini

              I have the same problem. It seems that the "end" node is ignored, while I expeected to us that to signal the end of the subprocess.

              Maybe we can issue a Jira about that...

              • 4. Re: completionCondition for <adHocSubProcess>
                joshwa


                Hui Onn Tan wrote:

                 

                I tried to use non-terminating End Node inside the subprocess.

                For non-autoComplete ad-hoc subprocess, it has no effect (the sub process does not end as I wish).

                If ad-hoc subprocess is set to autoComplete=true, without End Node, the ad-hoc subprocess end if any of tasks (Review, Auto-Process, Investigate + Approve) is complete.

                 

                However by adding the End Node, I can now control the flow with gateways and signal to achieve the similar effect of completionCondition.

                Can you post an example of how you accomplished this? (and if either of you has a simple testcase handy, file a bug in Jira?)

                • 5. Re: completionCondition for <adHocSubProcess>
                  aminmc

                  Is there any documentation or code samples that show how to complete an ad-hoc sub process without using the auto-complete?  We are starting to use ad hoc sub processes but want to use the feature of defining our own custom completion condition.