This section describes how to specify late binding when a parent process calls a subprocess. To focus just on the essential steps, you can simply import a predefined project that contains several prerequisite steps (create interfaces, business processes, and assembly modules), which are explained in more detail in the "Getting Started" samples.
This section covers how to:
To import the module that provides the required artifacts into your workspace, follow these steps:


In this section, you provide the parent process with the process template name of the subprocess,
which will then be used for a dynamic lookup of the currently valid template at runtime.
Note that intentionally the reference partner used in the ApprovalStep is not wired to any target in the assembly editor, as the target will be dynamically selected during runtime. This causes warning CWSCA8015W to appear after the workspace has finished the build operation:

To enable the parent process for late binding, follow these steps:
ApprovalProcess.
to save this change
and close the business process editor.Note: You might still see warning CWSCA8015W which indicates that no wiring (static binding) exists for this reference partner.
You can safely ignore this warning because late binding is specified instead.
In this section, you add an SCA export to the version 1 of the subprocess that is required to call the subprocess across module boundaries.
Follow these steps:

to save this change
and close the assembly editor.Now, you can either run the version 1 of the business process as described in the Run the Sample chapter, or you can continue creating version 2 of the business process, and then try the different versions later.
In this section, you create version 2 of the subprocess: First you copy version 1 and then you modify the copy to reflect the evolution of the business process.
To copy version 1, follow these steps:
ApprovalProcessV1_1 to the value ApprovalProcessV2.Next, we change the Valid From settings that are still identical to the version 1 values. Without this change, this would create a conflict when trying to install both process versions on the server. Follow these steps:

Note: You can set the Valid From settings explicitly to define the point in time when the runtime system should start using this process template. Keep in mind that the process template may be invisible before that point in time is reached.
.Now, we modify the business process to reflect the evolution of the process. Follow these steps:

Approved = new Boolean(Math.random() > 0.6);
V1 to V2. The Java code now looks like this:System.out.println("ApprovalProcess V2: result is "+Approved);
and close the business process editor.Now, you can run versions 1 and 2 of the business process as described in the Run the Sample chapter. Alternatively, you can continue creating version 3 of the business process, and then try all three versions.
In this section, you create version 3 of the subprocess. This new version is required to use the same interface, the same process component name, and the same namespace as version 1. However, we are allowed to vary the execution mode: While versions 1 and 2 were defined as long-running processes, version 3 is defined as microflow.
First, we find out the process component name of the version 1 process. As the version 1 exists in the workspace, follow these steps:

ApprovalProcess,
record it as you will need it later on.Note: By default, the process component name is identical to the process name. However, for the case that these two names differ, it is important to do this lookup in the assembly editor as described here.
Next, we find out the namespace of the version 1 process. Follow these steps:

http://ApprovalProcess,
record it as you will need it later on.Next, we create a new project and create access to the library. Follow these steps:
ApprovalProcessV3 and click Finish.
and close the dependency editor.Next, we create the new version of the business process. Follow these steps:

ApprovalProcess as name. By default, this will imply the appropriate process component name in the assembly editor later.http://ApprovalProcess.
Note: Process component name and namespace must be identical to the values used for the version 1 definition, which is why we looked up these values earlier.
ApprovalProcessIF interface and the approve operation.
Next, we implement two Java snippet activities in the business process. For more details on how to implement Java snippets, refer to the Getting Started > Hello World sample.
Follow these steps:
ApprovalDecision.approved = new Boolean(Math.random() > 0.3);
ReportStatus.System.out.println("ApprovalProcess V3: result is "+approved);
and close the business process editor.Now we are ready to finalize the module in the assembly editor. Follow these steps:
ApprovalProcess.
and close the assembly editor.Now proceed to the Run the Sample chapter to see how the different versions of the subprocess can coexist on the server.
Refer to the Getting Started > Hello World sample for more details how to deploy the business process to Business Process Server or how to deploy the business process to the server in your integrated test environment.