Package ch.ivyteam.ivy.process.call
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.
See simple examples:
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
withPathOverrides(String processPath, boolean considerOverrides)
Find sub process by path with overrides.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.- 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:
withPathOverrides(String,boolean)
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
withPathOverrides
public static SubProcess withPathOverrides(String processPath, boolean considerOverrides)
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
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.
-
-