Class SubRequestBuilder
- Since:
- 9.2
- API:
- This is a public API.
-
Method Summary
Modifier and TypeMethodDescriptionas()
Defines the session that is used to execute the requestExecutes the chosen callable sub process.executeAndIgnoreBpmError
(Object... params) Executes the chosen callable sub process and ignores all bpm errors.http()
Controls the request method.Add input parameters for the chosen callable sub process.
-
Method Details
-
as
Defines the session that is used to execute the requestExample:
bpmClient.start().subProcess(startElement).as().user("test").execute("Reto", 49);
- Returns:
- session chooser access
- API:
- This public API is available in Java.
-
http
Controls the request method. Per default a sub process will be executed with HTTP context. You can disable this or start a POST request instead of GET.Example:
bpmClient.start().subProcess(startElement).http().disable().execute(); bpmClient.start().subProcess(startElement).http().post().execute();
- Returns:
- http control access
- API:
- This public API is available in Java.
-
withParam
Add input parameters for the chosen callable sub process.
The input parameters of a callable sub process can either be provided with this method or as parameters of the
execute(Object...)
method. The provided value must match the parameter type. Not all input parameters have to be set.Example:
bpmClient.start().subProcess(startElement).withParam("name", "value").execute();
- Parameters:
name
- name of the parametervalue
- value of the parameter. Must match input parameter type defined on signature of the sub start- Returns:
- request builder for further request construction
- Since:
- 9.2
- API:
- This public API is available in Java.
-
execute
Executes the chosen callable sub process.
The input parameters of a callable sub process can either be provided as parameters of this method or with the
withParam(String, Object)
method. If input parameters are provided by parameters of the method they must match the number of input parameters and their types.The result parameters of the callable sub process can be get with the
ExecutionResult.subResult()
method.Example:
String name = bpmClient.start().subProcess(startElement).execute("Reto", 49).subResult().firstParam();
Number age = bpmClient.start().subProcess(startElement).withParam("name", "Reto").withParam("age", 49).execute().subResult().param("age");
- Parameters:
params
- input parameters of the callable sub process or empty ifwithParam(String, Object)
is used- Returns:
- execution result
- Since:
- 9.2
- See Also:
- API:
- This public API is available in Java.
-
executeAndIgnoreBpmError
Executes the chosen callable sub process and ignores all bpm errors. Use
ExecutionResult.bpmError()
to assert a bpm error that was thrown by the process. Useexecute(Object...)
if you don't want to ignore bpm errors.The input parameters of a callable sub process can either be provided as parameters of this method or with the
withParam(String, Object)
method. If input parameters are provided by parameters of the method they must match the number of input parameters and their types.The result parameters of the callable sub process can be get with the
ExecutionResult.subResult()
method.Example:
String name = bpmClient.start().subProcess(startElement).executeAndIgnoreBpmError("Reto", 49).subResult().firstParam();
Number age = bpmClient.start().subProcess(startElement).withParam("name", "Reto").withParam("age", 49).executeAndIgnoreBpmError().subResult().param("age");
- Parameters:
params
- input parameters of the callable sub process or empty ifwithParam(String, Object)
is used- Returns:
- execution result
- Since:
- 9.2
- See Also:
- API:
- This public API is available in Java.
-