Package ch.ivyteam.ivy.bpm.engine.client
Class Workflow
java.lang.Object
ch.ivyteam.ivy.bpm.engine.client.Workflow
Workflow data like task, case and session
Example:
var startElement = BpmElement.processName("processUnderTest").name("start.ivp");
var result = bpmClient.start().process(startElement).as().anonymous().execute();
assertThat(result.workflow().session().isSessionUserUnknown()).isTrue();
assertThat(result.workflow().executedTask().getState()).isEqualTo(TaskState.DONE);
- Since:
- 9.1
- API:
- This is a public API.
-
Method Summary
Modifier and TypeMethodDescriptionProvides the case of the executiod process.Provides methods to select an active task.List of active tasks which could be executed next.Get any next active task that can be executed.Provides the executed task.session()
Provides the current workflow session.
-
Method Details
-
activeCase
Provides the case of the executiod process.Example:
var startElement = BpmElement.processName("processUnderTest").name("start.ivp"); var result = bpmClient.start().process(startElement).execute(); assertThat(result.workflow().activeCase().getState()).isEqualTo(CaseState.DONE);
- Returns:
- case access
- API:
- This public API is available in Java.
-
executedTask
Provides the executed task.Example:
var startElement = BpmElement.processName("processUnderTest").name("start.ivp"); var result = bpmClient.start().process(startElement).execute(); assertThat(result.workflow().executedTask().getState()).isEqualTo(TaskState.DONE);
- Returns:
- latest workflow task
- API:
- This public API is available in Java.
-
activeTasks
List of active tasks which could be executed next.Example:
var startElement = BpmElement.processName("processUnderTest").name("start.ivp"); var result = bpmClient.start().process(startElement).execute(); assertThat(result.workflow().activeTasks()).hasSize(2);
- Returns:
- list of tasks
- API:
- This public API is available in Java.
-
anyActiveTask
Get any next active task that can be executed.Example:
var startElement = BpmElement.processName("processUnderTest").name("start.ivp"); var result = bpmClient.start().process(startElement).execute(); assertThat(result.workflow().anyNextTask()).isPresent();
- Returns:
- next executable task or empty
- API:
- This public API is available in Java.
-
activeTask
Provides methods to select an active task.Example:
var startElement = BpmElement.processName("processUnderTest").name("start.ivp"); var result = bpmClient.start().process(startElement).execute(); assertThat(result.workflow().nextTask().name("Task")).isPresent(); assertThat(result.workflow().nextTask().activatorRole("Manager")).isPresent();
- Returns:
- active task selector
- API:
- This public API is available in Java.
-
session
Provides the current workflow session.Example:
var startElement = BpmElement.processName("processUnderTest").name("start.ivp"); var result = bpmClient.start().process(startElement).as().anonymous().execute(); assertThat(result.workflow().session().isSessionUserUnknown()).isTrue();
- Returns:
- workflow session
- API:
- This public API is available in Java.
-