Class SubProcessCall
- java.lang.Object
-
- ch.ivyteam.ivy.process.call.SubProcessCall
-
public class SubProcessCall extends Object
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
See simple examples: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
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SubProcess
withPath(String processPath)
Find sub process by path.static SubProcess
withPid(String processId)
Find sub process by process id.
-
-
-
Method Detail
-
withPath
public static SubProcess withPath(String processPath)
Find sub process by path.SubProcessCall.withPath("Functional Processes/ProcessName")
- Parameters:
processPath
- the path (process groups) and name of a process- 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
public static SubProcess withPid(String processId)
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.
-
-