wfm.GetRunningActivities

Returns only activities currently in the started state for the given user. Activities that are merely personalised but not yet started are not included — for the full tray, see wfm.GetWorkItemList.

1. Input Parameters

Name Type Required Description

OrganisationId

STRING (GUID)

Yes

ID of the organisation. Must be set — an empty value yields error -1043267169 with the message GUID 'OrganisationId' is not set.

UserId

STRING (GUID)

Yes

Workflow-organisation user object ID (NOT the user ID — resolve via wfm.GetOrganisationObjects filtered by the user class ID). Must be set — an empty value yields error -1043267169 with the message GUID 'UserId' is not set.

ClientTypeId

STRING (GUID)

Yes

ID of the client type used. Must be set — an empty value yields error -1043267169 with the message GUID 'ClientTypeId' is not set.

2. Output Parameters

Name Type Dependency Description

RunningActivities

BASE64

List of data for all running activities of the user in XML format (see note)

3. Return Value

(INT): 0 = Job successful, otherwise error code.

4. Note

Structure of RunningActivities
<RunningActivities>
  <RunningActivity>
    <Activity Id="" RActivityId="" Name="" State="" ClosureTime="" OverTime=""
      ReminderTime="" CanCancel=""/>
    <User Name=""/>
    <Process Id="" Name="" WorkflowId="" Subject="" CreationTime="" IconId="" ObjectId=""/>
    <Columns>
      <Column DisplayName="" Value="" Position=""/>
    </Columns>
  </RunningActivity>
  <Resources/>
</RunningActivities>

RunningActivity — structure with the following elements:

  • Activity: describes a running activity

    • Id (STRING): ID of the activity in the model

    • RActivityId (STRING): instance ID of the activity

    • Name (STRING): name of the activity

    • State (INT): status of the activity

    • ClosureTime (INT): lock period — indicates how long the activity is still locked

    • OverTime (INT): flag indicating whether the activity should have been completed (1)

    • ReminderTime (INT): reminder period — indicates until when the activity should be completed

    • CanCancel (INT): currently not supported — pass 0.

  • User:

    • Name (STRING): name of the user who personalized

  • Process: describes the associated process

    • Id (STRING): ID of the process

    • Name (STRING): name of the process

    • WorkflowId (STRING): ID of the workflow

    • Subject (STRING): subject of the process

    • CreationTime (INT): creation time of the process

    • IconId (INT): icon ID of the workflow model

    • ObjectId (STRING): ID of the document to be displayed in preview by clients

  • Columns: list of elements of type Column

    • Column: used for displaying workflow variables

      • DisplayName (STRING): the variable should be displayed under this name

      • Value: value of the variable

      • Position (INT): determines the order of the elements

  • Resources: carries localisations for ResId references (e.g. column names). Present even when the result list is empty — a response containing only <Resources/> as a child of <RunningActivities> means "no hits" and is not an error indication.

5. Edge Cases

  • Empty value in any of the three GUID parameters (OrganisationId, UserId, ClientTypeId) → error code -1043267169 with message "GUID '<parameter name>' is not set" (see Error Codes).

  • Distinction from wfm.GetWorkItemList: GetRunningActivities returns a strict subset — only activities in the started state. A work item that sits in the inbox and is personalised (Activity.State includes bit 128) but has not yet been started will not appear here.

  • An empty response still contains a <Resources/> element next to the root element — that is expected behaviour.