Writing Adapter Methods
Adapter methods provide an interface between application layer functionality and BPM service calls.
The use of adapter methods is recommended, because they insulate the application layer from the implementation details of the service calls.
Note: Connection and security requirements can also be handled at this layer, as described in the preceding sections.
The Adapter class (in Adapter.cs) implements the following methods to call specific BPM service operations.
Method | Description | Invokes... |
---|---|---|
CancelWorkItem | Cancels a work item | cancelWorkItem operation from the WorkPresentationService |
CloseWorkItem | Closes a work item | closeWorkItem operation from the WorkPresentationService |
GetWorkList | Gets the worklist of a user identified by their GUID | getWorkListItems operation from the WorkListService |
OpenItem | Allocates and opens a selected work item | openWorkItem operation from the WorkPresentationService |
SubmitWorkItem | Completes a work item | completeWorkItem operation from the WorkPresentationService |
GetGUID | Gets the GUID for the username specified in the LoginForm dialog. (See Obtaining the Calling User’s GUID for more information about this method.) | lookupUser operation from the EntityResolverService . |
Each method uses a similar structure to provide its interface. For example, the GetWorkList method.
Procedure
Result
if (response != null) { if (response.workItems != null) { WorkItem[] items = response.workItems; return items; } } throw new Exception("Failed to get WorkList - call returned null"); } |
The Adapter class also includes the GetBOMJSP, GetFormURL and GetJSURL methods. See Rendering a Form for a Work Item for more information about the use of these methods.
Copyright © Cloud Software Group, Inc. All rights reserved.