GetProcessActivities#
Overview#
Retrieves the Process Activities and Process activity definitions related to a given Material and Flow.
Applies multiple filters, validates flowpaths, paginates results, and prepares data for display in the Operator View GUI.
Input Object#
| Name | Type | Description |
|---|---|---|
| Material | IMaterial | The selected material (mandatory). |
| CurrentFlowpath | string | The flowpath of the currently selected step. |
| FilterByMainFlowpath | bool | If true, filter results to only the main flowpath. |
| FilterByMyActivities | bool | If true, only return activities executable by the current Employee/User. |
| ProcessActivityType | string | Filter by Process Activity type. |
| ProcessActivitySystemStates | List | Filter by specific PA system states. |
| ActiveProcessActivitiesFromDatetime | DateTime? | Returns only PAs in progress after this datetime. |
| ActiveProcessActivitiesToDatetime | DateTime? | Returns only PAs in progress before this datetime. |
| TextSearch | string | Case-insensitive search by PA/PAD display name. |
| PageNumber | int | Page index (1-based). |
| PageSize | int | Number of records per page. |
Output Object#
| Name | Type | Description |
|---|---|---|
| ProcessActivities | IIndEqProcessActivityCollection | PAs that match the filters. |
| ProcessActivityDefinitions | IIndEqProcessActivityDefinitionCollection | PADs that match the filters. |
| OperatorData | INgpDataSet | Dataset containing PA/PADs data useful for the GUI. |
| TotalRows | int | Total number of records before pagination. |
Pre Conditions#
- A valid
Materialmust be provided.
How it works#
-
Validation & Setup
EnsuresMaterialis provided and valid, then loads current user and employee. -
Fetch Activities & Definitions
- Loads all PAs for the material.
- Loads PADs from the flow.
-
Excludes PADs already linked to existing PAs.
-
Flowpath Validation
- Detects if the current flowpath is top flow, subflow, or specific step.
- Adds only the activities related to that flowpath.
-
Throws an exception if the flowpath does not exist.
-
Filtering
- Applied to both PAs and PADs: flowpath, type, text search, and "Only My Activities".
-
Applied to PAs only: system state and date ranges.
-
Pagination
UsesPageNumberandPageSizeto slice results. -
Operator Data Construction
Builds a dataset with fields for GUI display, including: - Action button permissions (
CanBegin,CanPerform,CanComplete) - Checklist durations, remaining time, slack and time spent
- Flowpath details (Earliest, Main, Latest)
- Check-in status and employee names
Assumptions#
- Checklist-related times (duration, remaining, slack, spent) can be derived from active checklist instances.