跳转至

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 Material must be provided.

How it works#

  1. Validation & Setup
    Ensures Material is provided and valid, then loads current user and employee.

  2. Fetch Activities & Definitions

  3. Loads all PAs for the material.
  4. Loads PADs from the flow.
  5. Excludes PADs already linked to existing PAs.

  6. Flowpath Validation

  7. Detects if the current flowpath is top flow, subflow, or specific step.
  8. Adds only the activities related to that flowpath.
  9. Throws an exception if the flowpath does not exist.

  10. Filtering

  11. Applied to both PAs and PADs: flowpath, type, text search, and "Only My Activities".
  12. Applied to PAs only: system state and date ranges.

  13. Pagination
    Uses PageNumber and PageSize to slice results.

  14. Operator Data Construction
    Builds a dataset with fields for GUI display, including:

  15. Action button permissions (CanBegin, CanPerform, CanComplete)
  16. Checklist durations, remaining time, slack and time spent
  17. Flowpath details (Earliest, Main, Latest)
  18. Check-in status and employee names

Assumptions#

  • Checklist-related times (duration, remaining, slack, spent) can be derived from active checklist instances.