Package ch.ivyteam.ivy.bpm.engine.client
Class RequestBuilder
- java.lang.Object
-
- ch.ivyteam.ivy.bpm.engine.client.RequestBuilder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SessionChooseras()Defines the session that is used to execute the requestExecutionResultexecute()Executes a defined bpm process.ExecutionResultexecuteAndIgnoreBpmError()Executes a defined bpm process and ignores all bpm errors.HttpRequestBuilderhttp()Controls the request method.RequestBuilderwithParam(String name, String value)Add start parameters for the chosen process.
-
-
-
Method Detail
-
http
public HttpRequestBuilder http()
Controls the request method. Per default a process will be executed with HTTP context. You can disable this or start a POST request instead of GET.Example:
bpmClient.start().process(startElement).http().disable().execute(); bpmClient.start().process(startElement).http().post().execute();- Returns:
- http control access
- API:
- This public API is available in Java.
-
withParam
public RequestBuilder withParam(String name, String value)
Add start parameters for the chosen process.Example:
bpmClient.start().process(startElement).withParam("name", "value").execute();- Parameters:
name-value-- Returns:
- request builder for further request construction
- API:
- This public API is available in Java.
-
as
public SessionChooser as()
Defines the session that is used to execute the requestExample:
bpmClient.start().process(startElement).as().user("test").execute();- Returns:
- session chooser access
- API:
- This public API is available in Java.
-
execute
public ExecutionResult execute()
Executes a defined bpm process.Example:
bpmClient.start().process(startElement).execute();- Returns:
- execution result
- API:
- This public API is available in Java.
-
executeAndIgnoreBpmError
public ExecutionResult executeAndIgnoreBpmError()
Executes a defined bpm process and ignores all bpm errors. UseExecutionResult.bpmError()to assert a bpm error that was thrown by the process. Useexecute()if you don't want to ignore bpm errors.Example:
bpmClient.start().process(startElement).executeAndIgnoreBpmError();- Returns:
- execution result
- See Also:
ExecutionResult.bpmError(),execute()- API:
- This public API is available in Java.
-
-