Class SubProcessCall
Find a sub process start, map parameters, call it and get the result.
This API can also be used in Unit Tests if you annotate your test with the @IvyProcessTest annotation.
However, for testing consider to use the bpmClient
.start()
.subProcess(...)
API.
Call the CallSubStart in the 'Functional Processes/Customer' sub process
with one parameter 'id' and get the 'name' field from the result tuple:
(Only possible if there is only one start with a parameter named 'id')
String result = SubProcessCall.withPath("Functional Processes/Customer") .withParam("id", 27) .call() .get("name", String.class);
Same as above but without named parameters and result:
(Only possible if there is only one start with a single parameter)
String result = SubProcessCall.withPath("Functional Processes/Customer") .call(27) .first(String.class);
Specify more exact which start to call by name:
withStartName(String)
String result = SubProcessCall.withPath("Functional Processes/Customer") .withStartName("getName") .withParam("id", 27) .call() .get("name", String.class);
Specify more exact which start to call by name and parameter types:
withStart(String, Class...)
String result = SubProcessCall.withPath("Functional Processes/Customer") .withStart("getName", Number.class) .call(27) .get("name", String.class);
Specify more exact which start to call by signature:
withStartSignature(String)
String result = SubProcessCall.withPath("Functional Processes/Customer") .withStartSignature("getName(Number)") .call(27) .get("name", String.class);
- API:
- This is a public API.
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<SubProcessCallStart>
find
(SubProcessSearchFilter filter) Findssub process starts
on the basis of afilter
.static SubProcess
Find sub process by path.static SubProcess
withPathOverrides
(String processPath, boolean considerOverrides) Find sub process by path with overrides.static SubProcess
Find sub process by process id.
-
Method Details
-
withPath
Find sub process by path.- Parameters:
processPath
- the path (process groups) and name of a process. E.g. "Functional Processes/ProcessName"- Returns:
- the selected
SubProcess
where to select the CallSubStart to call. - See Also:
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
withPathOverrides
Find sub process by path with overrides.- Parameters:
processPath
- the path (process groups) and name of a process. E.g. "Functional Processes/ProcessName"considerOverrides
- controls the usage of overriden sub processes.- Returns:
- the selected
SubProcess
where to select the CallSubStart to call. - API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
withPid
Find sub process by process id.SubProcessCall.withPid("1549FEEB682EF158")
- Parameters:
processId
- the identifier of a process e.g.- Returns:
- the selected
SubProcess
where to select the CallSubStart to call. - API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
find
Findssub process starts
on the basis of afilter
.Example finds sub process starts:
SubProcessSearchFilter filter = SubProcessSearchFilter.create() .setProcessPath("testSub") .setSignature("call(String)") .toFilter(); List<SubProcessCallStart> foundSubProcessStarts = SubProcessCall.find(filter);
- Parameters:
filter
- search filter- Returns:
- a list with the found sub process starts
- API:
- This public API is available in Java.
-