Subprocesses help to encapsulate functionality to deal with complexity, enable r

Subprocesses help to encapsulate functionality to deal with complexity, enable reuse and better maintenance/testing of pieces of functionality.

Which are the best practives for a subprocess to communicate to the calling parent process the results of its processing (passing variables by reference, exception handling, etc. ?)...

OriginalPostID-121526

OriginalPostID-121526

  Discussion posts and replies are publicly visible

Parents
  • Hi,
    It depends on your following use cases-

    1. In case you want your variable value to be passed to the parent process only when it's completed , then you can pass your variable as an output in the subprocess node in parent process model.

    2. If your use case says the value of the process variable should be there in the parent process as soon as variable is updated in the sub process , then pass it as by reference.
    NEVER PASS A CDT AS PASS BY REFERENCE.

    3. If you want to set the value of the variable in the parent process which is not available in the sub process, you can use Set External Activity smart service.
Reply
  • Hi,
    It depends on your following use cases-

    1. In case you want your variable value to be passed to the parent process only when it's completed , then you can pass your variable as an output in the subprocess node in parent process model.

    2. If your use case says the value of the process variable should be there in the parent process as soon as variable is updated in the sub process , then pass it as by reference.
    NEVER PASS A CDT AS PASS BY REFERENCE.

    3. If you want to set the value of the variable in the parent process which is not available in the sub process, you can use Set External Activity smart service.
Children
No Data