Package ch.ivyteam.ivy.bpm.engine.client
Class Workflow
- java.lang.Object
-
- ch.ivyteam.ivy.bpm.engine.client.Workflow
-
public class Workflow extends Object
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ICase
activeCase()
Provides the case of the executiod process.TaskSelector
activeTask()
Provides methods to select an active task.List<ITask>
activeTasks()
List of active tasks which could be executed next.Optional<ITask>
anyActiveTask()
Get any next active task that can be executed.ITask
executedTask()
Provides the executed task.IWorkflowSession
session()
Provides the current workflow session.
-
-
-
Method Detail
-
activeCase
public ICase 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
public ITask 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
public List<ITask> 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
public Optional<ITask> 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
public TaskSelector 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
public IWorkflowSession 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.
-
-