Skip to content
pCon.configurator onlineDocumentation
Esc
↑↓navigate↵open⌘Jpreview
On this page

oapProcessActions

Synopsis

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

See also: SessionId, OAPActionContext, BasketServiceFault

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 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. 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 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.

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 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:

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 axis1 runs through the origin of the local coordinate system. The angle is given in radian with positive magnitudes representing counterclockwise rotations2.

The current version of EAIWS will execute the following actions:

CreateObjectAction if the initial placement is of type OAPDataDefinedPlacement, the application placement specifies a parent, and the parent resolves to an item of 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 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), then the property must be visible if and only if the expression

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

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

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

is false.

Footnotes

  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. ↩