---
title: "oapProcessActions"
slug: "api/basket/operations/oapprocessactions"
sidebar:
  order: 516
---

<a id="ref-1bcfe83bde93"></a>
<a id="ref-73e67c1daa6b"></a>
<a id="ref-50883331335a"></a>

## Synopsis

```text
OAPActionResult[] oapProcessActions(SessionId sessionId,
    string[]        actionIds,
    boolean exec,
    OAPActionContext context)
throws BasketServiceFault;
```

See also: [`SessionId`](/pCon/configuratorOnline/specs/api/session/types/sessionid#ref-02e397c8fdb4), [OAPActionContext](/pCon/configuratorOnline/specs/api/basket/types/oapactioncontext#ref-8d682fce8160), [`BasketServiceFault`](/pCon/configuratorOnline/specs/api/basket/faults/basketservicefault#ref-d5adb74faa1b)

Query for process actions. Depending on parameter `exec` the operation behaves as follows:

**`false`**

Process list of actions and return information up to and including first active action.

**`true`**

Process list of actions and return information about inactive and active actions up to and including first active action that can not be executed by the server.

`context.self` must always contain the basket item ID of the article whose actions are to be queried or executed.

`context.interactor` must be set to the ID of the interactor if the list of actions has been obtained from an interactor.

`context.dpr` holds the display pixel ratio. The default value is 1.0. The display pixel ratio is used to select images returned with actions suitable for the client’s display.

The fields of [OAPActionResult](/pCon/configuratorOnline/specs/api/basket/types/oapactionresult#ref-9e9078227cff) are defined as follows:

**`id`**

the ID of the action

**`state`**

the state of the action; possible values are:

`Disabled`: The action is disabled. This state may be returned with execution of actions enabled or disabled.

`Enabled`: The action is enabled. No attempt has been made to execute the action. This state may be returned only with execution of actions disabled.

`Success`: The action was executed successfully. This state may be returned only with execution of actions enabled.

`Failure`: Execution of the action failed. <a id="ref-d8edaa4ca897"></a>This state may be returned only with execution of actions enabled.

`NotResponsible`: The server does not feel responsible to execute the action. This may be because the action must be implemented by the client, or because execution of the action by the server is not implemented. This state may be returned only with execution of actions enabled.

An [`OAPActionResult`](/pCon/configuratorOnline/specs/api/basket/types/oapactionresult) with state `Enabled`, `Failure` or `NotResponsible` will always be the last returned action result.

**`actionData`**

The OAP action data. No action data is returned if the action state is `Disabled`. See OAP specification for more information.

**`objects`**

A list of basket item IDs that contains the result of resolution of object definitions contained in `actionData.objects`.<a id="ref-b4e07617361a"></a>

**`addedItems`**

The basket item IDs of items added during execution of this action.

**`removedItems`**

The basket item IDs of items removed during execution of this action.

**`movedItems`**

The basket item IDs of items moved during execution of this action. Moved items are items whose position within the basket item tree has changed.

**`updatedItems`**

The basket item IDs of items updated during execution of this action. Updated items are items whose article data has changed.

`referenceObject`, `newObjectPosition` and `newObjectRotation`

Fields `referenceObject`, `newObjectPosition` and `newObjectRotation` are used in instances of [`OAPActionResult`](/pCon/configuratorOnline/specs/api/basket/types/oapactionresult) holding the result of `CreateObj` actions with placement mode `AttachAreas`. Clients must use these fields to determine the position and rotation of the newly created object, and adjust its position and rotation accordingly, if all of the following conditions are met:

- Field `actionData` of the corresponding instance of [`OAPActionResult`](/pCon/configuratorOnline/specs/api/basket/types/oapactionresult) contains an action of type [`OAPCreateObjectAction`](/pCon/configuratorOnline/specs/api/basket/types/oapcreateobjectaction).

- Field `parent` of this action is missing.

- Field `initialPlacement` of this action contains a placement of type [`OAPAttachAreasPlacement`](/pCon/configuratorOnline/specs/api/basket/types/oapattachareasplacement).

**`referenceObject`**

This field contains the basket item ID of the reference object.

**`newObjectPosition`**

This field contains the position of the origin of the local coordinate system of the newly created object within the local coordinate system of the reference object.

**`newObjectRotation`**

This field contains the rotation of the newly created object relative to its own local coordinate system. The rotation axis[^1] runs through the origin of the local coordinate system. The angle is given in radian with positive magnitudes representing counterclockwise rotations[^2].

The current version of EAIWS will execute the following actions:

`CreateObjectAction` if the initial placement is of type [`OAPDataDefinedPlacement`](/pCon/configuratorOnline/specs/api/basket/types/oapdatadefinedplacement), the application placement specifies a parent, and the parent resolves to an item of [`BasketItemType`](/pCon/configuratorOnline/specs/api/basket/types/basketitemtype) `Aggregate` or `PartialPlanning`.

`MethodCallAction` if all selected items are OFML article items.

`DeleteObjectAction` if all selected items are sub-article items of basket composite articles.

`TranslateObjectAction` and `RotateObjectAction` if all selected items are OFML article items.[^3]

The fields of [OAPPropEditAction](/pCon/configuratorOnline/specs/api/basket/types/oappropeditaction#ref-f0f248dc216a) are defined as following:

**`visibleOnly`**

**`editableOnly`**

If `true`, these fields restrict the visibility of properties in OAP property editors. If `visible` and `editable` are the property-specific flags reported for individual properties (type [`Property`](/pCon/configuratorOnline/specs/api/basket/types/property)), then the property must be visible if and only if the expression

```text
(visible || !visibleOnly) && (editable || !editableOnly)
```

is `true`. Or, perhaps more intuitive, they must be hidden if

```text
(visibleOnly && !visible) || (editableOnly && !editable)
```

is `false`.

[^1]: The euclidean norm of the rotation axis is one unless the angle is zero, in which case it is zero.

[^2]: The current implementation returns angles with magnitudes ranging from 0 to 2π. Nevertheless, clients should at least support angles with magnitudes ranging from 2π to -π.

[^3]: The semantics of these actions is not well defined right now. The current implementation treats translations as extrinsic (along the axes of the coordinate system of the parent) and rotations as intrinsic (around the axes of the local coordinate system). Rotations are converted to up to three elementary rotations around y, x and y. Translation and rotation along/around disabled axes is disabled, and rules are evaluated. Future implementations will probably ignore disabled translation and rotation axes and will not evaluate rules. Translations will probably be intrinsic, or there will be a parameter to select between extrinsic and intrinsic translations.
